Bug 747749 - Remove call to JS_SetGlobalObject in mozJSComponentLoader. r=luke
authorBobby Holley <bobbyholley@gmail.com>
Thu, 26 Apr 2012 20:40:11 +0200
changeset 92548 d16a99a00743edb4565709efbf92c80c3ff431ed
parent 92547 cdb6c708164d1723565aea2e8a4f8f594e8d6ab8
child 92549 42ef0ce00b8c7338d8655add28d2b0ec5b6657e4
push id22544
push useremorley@mozilla.com
push dateFri, 27 Apr 2012 11:53:27 +0000
treeherdermozilla-central@d871849ac3a3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersluke
bugs747749
milestone15.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
Bug 747749 - Remove call to JS_SetGlobalObject in mozJSComponentLoader. r=luke
js/xpconnect/loader/mozJSComponentLoader.cpp
--- a/js/xpconnect/loader/mozJSComponentLoader.cpp
+++ b/js/xpconnect/loader/mozJSComponentLoader.cpp
@@ -665,20 +665,16 @@ mozJSComponentLoader::GlobalForLocation(
     NS_ENSURE_SUCCESS(rv, rv);
 
     JSCLAutoErrorReporterSetter aers(cx, mozJSLoaderErrorReporter);
 
     nsCOMPtr<nsIXPConnect> xpc =
         do_GetService(kXPConnectServiceContractID, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
 
-    // Make sure InitClassesWithNewWrappedGlobal() installs the
-    // backstage pass as the global in our compilation context.
-    JS_SetGlobalObject(cx, nsnull);
-
     nsCOMPtr<nsIXPConnectJSObjectHolder> holder;
     rv = xpc->InitClassesWithNewWrappedGlobal(cx, backstagePass,
                                               mSystemPrincipal,
                                               nsIXPConnect::
                                               FLAG_SYSTEM_GLOBAL_OBJECT,
                                               getter_AddRefs(holder));
     NS_ENSURE_SUCCESS(rv, rv);