Bug 1021312 - use a fresh zone for xpcshell. r=mccr8
authorBobby Holley <bobbyholley@gmail.com>
Thu, 05 Jun 2014 22:32:36 -0700
changeset 207321 08045ba9192ff0c932fb0f7b07d937384e18036d
parent 207320 1ab8174e097f25b69c81fd9d9113014e88a7cf56
child 207322 340e016163edcf0fb2b9c1183d4ecda7b6707cf4
push id494
push userraliiev@mozilla.com
push dateMon, 25 Aug 2014 18:42:16 +0000
treeherdermozilla-release@a3cc3e46b571 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmccr8
bugs1021312
milestone32.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 1021312 - use a fresh zone for xpcshell. r=mccr8
js/xpconnect/src/XPCShellImpl.cpp
--- a/js/xpconnect/src/XPCShellImpl.cpp
+++ b/js/xpconnect/src/XPCShellImpl.cpp
@@ -1524,18 +1524,20 @@ XRE_XPCShellMain(int argc, char **argv, 
         nsRefPtr<BackstagePass> backstagePass;
         rv = NS_NewBackstagePass(getter_AddRefs(backstagePass));
         if (NS_FAILED(rv)) {
             fprintf(gErrFile, "+++ Failed to create BackstagePass: %8x\n",
                     static_cast<uint32_t>(rv));
             return 1;
         }
 
+        // Make the default XPCShell global use a fresh zone (rather than the
+        // System Zone) to improve cross-zone test coverage.
         JS::CompartmentOptions options;
-        options.setZone(JS::SystemZone)
+        options.setZone(JS::FreshZone)
                .setVersion(JSVERSION_LATEST);
         nsCOMPtr<nsIXPConnectJSObjectHolder> holder;
         rv = xpc->InitClassesWithNewWrappedGlobal(cx,
                                                   static_cast<nsIGlobalObject *>(backstagePass),
                                                   systemprincipal,
                                                   0,
                                                   options,
                                                   getter_AddRefs(holder));