Backed out changeset 926aeca75e6c (bug 949108) due to request asserts on a CLOSED TREE.
authorSteve Fink <sfink@mozilla.com>
Wed, 11 Dec 2013 14:02:54 -0800
changeset 177011 f015670e357367c1d5d958dac1e1db9fa0c9bc2a
parent 177010 9e6bdc10cf33f0d165b3597ebcb3c10536e21f02
child 177012 31e30e41f853ae00ff09cdbb9eb302be1cdc483e
push id462
push userraliiev@mozilla.com
push dateTue, 22 Apr 2014 00:22:30 +0000
treeherdermozilla-release@ac5db8c74ac0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs949108
milestone29.0a1
backs out926aeca75e6c493a2fc55232e9dc62bcab6ff01c
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
Backed out changeset 926aeca75e6c (bug 949108) due to request asserts on a CLOSED TREE.
content/base/src/nsScriptLoader.cpp
--- a/content/base/src/nsScriptLoader.cpp
+++ b/content/base/src/nsScriptLoader.cpp
@@ -784,20 +784,18 @@ nsScriptLoader::AttemptAsyncScriptParse(
     return NS_ERROR_FAILURE;
   }
 
   JSObject *unrootedGlobal;
   nsCOMPtr<nsIScriptContext> context = GetScriptContext(&unrootedGlobal);
   if (!context) {
     return NS_ERROR_FAILURE;
   }
-
-  JSContext* unpushedCx = context->GetNativeContext();
-  JS::Rooted<JSObject*> global(unpushedCx, unrootedGlobal);
-  AutoPushJSContext cx(unpushedCx);
+  AutoPushJSContext cx(context->GetNativeContext());
+  JS::Rooted<JSObject*> global(cx, unrootedGlobal);
 
   JS::CompileOptions options(cx);
   FillCompileOptionsForRequest(aRequest, global, &options);
 
   if (!JS::CanCompileOffThread(cx, options)) {
     return NS_ERROR_FAILURE;
   }
 
@@ -999,20 +997,18 @@ nsScriptLoader::EvaluateScript(nsScriptL
   // Make sure context is a strong reference since we access it after
   // we've executed a script, which may cause all other references to
   // the context to go away.
   JSObject *unrootedGlobal;
   nsCOMPtr<nsIScriptContext> context = GetScriptContext(&unrootedGlobal);
   if (!context) {
     return NS_ERROR_FAILURE;
   }
-
-  JSContext* unpushedCx = context->GetNativeContext();
-  JS::Rooted<JSObject*> global(unpushedCx, unrootedGlobal);
-  AutoPushJSContext cx(unpushedCx);
+  AutoPushJSContext cx(context->GetNativeContext());
+  JS::Rooted<JSObject*> global(cx, unrootedGlobal);
 
   bool oldProcessingScriptTag = context->GetProcessingScriptTag();
   context->SetProcessingScriptTag(true);
 
   // Update our current script.
   nsCOMPtr<nsIScriptElement> oldCurrent = mCurrentScript;
   mCurrentScript = aRequest->mElement;