Bug 1021312 - Use a fresh zone for xpcshell. r=mccr8, a=sledru
authorBobby Holley <bobbyholley@gmail.com>
Thu, 05 Jun 2014 22:32:36 -0700
changeset 199434 68ee1d33fc83c66ce03f3a5af98e2067e8d5df73
parent 199433 a5967705754e1441060acd7b7d73de1ee4f1e9d2
child 199435 b982a8afab523dac7cb63d6dcf92e526d0c765af
push id3624
push userasasaki@mozilla.com
push dateMon, 09 Jun 2014 21:49:01 +0000
treeherdermozilla-beta@b1a5da15899a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmccr8, sledru
bugs1021312
milestone31.0a2
Bug 1021312 - Use a fresh zone for xpcshell. r=mccr8, a=sledru
js/xpconnect/src/XPCShellImpl.cpp
--- a/js/xpconnect/src/XPCShellImpl.cpp
+++ b/js/xpconnect/src/XPCShellImpl.cpp
@@ -1527,18 +1527,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));