Merge m-c to autoland. a=merge
authorRyan VanderMeulen <ryanvm@gmail.com>
Thu, 14 Sep 2017 10:51:57 -0400
changeset 430407 9cff81ada79469b69384bc4f8e5a1e7c94e9a1a9
parent 430406 e1cdf9566f460ec744390218fea97a4b1486c9b5 (current diff)
parent 430350 ef0f1085d54eae99d62bbf039952b0deb84f396d (diff)
child 430408 45a470fd009745f4048e3ed39bc698b9f0784031
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Merge m-c to autoland. a=merge
--- a/js/xpconnect/loader/mozJSSubScriptLoader.cpp
+++ b/js/xpconnect/loader/mozJSSubScriptLoader.cpp
@@ -206,19 +206,21 @@ EvalScript(JSContext* cx,
         if (!loadScope) {
             // A null loadScope means we are cross-compartment. In this case, we
             // should check the target isn't in the JSM loader shared-global or
             // we will contaiminate all JSMs in the compartment.
             //
             // NOTE: If loadScope is already a shared-global JSM, we can't
             // determine which JSM the target belongs to and have to assume it
             // is in our JSM.
+#ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED
             JSObject* targetGlobal = js::GetGlobalForObjectCrossCompartment(targetObj);
             MOZ_DIAGNOSTIC_ASSERT(!mozJSComponentLoader::Get()->IsLoaderGlobal(targetGlobal),
                                   "Don't load subscript into target in a shared-global JSM");
+#endif
             if (!JS::CloneAndExecuteScript(cx, envChain, script, retval)) {
                 return false;
             }
         } else if (JS_IsGlobalObject(loadScope)) {
             if (!JS::CloneAndExecuteScript(cx, envChain, script, retval)) {
                 return false;
             }
         } else {