Follow-up fix 2 for bug 590325.
authorAndreas Gal <gal@mozilla.com>
Fri, 21 Jan 2011 00:59:00 -0800
changeset 61206 143179160c52221606233644bdf50e189b6edc39
parent 61205 6852eeba1dd52ea9f8ddff36909d395037bce0b9
child 61207 e63f5adc428007495c5fa32d9ccfbcfcac149317
push id1
push userroot
push dateTue, 10 Dec 2013 15:46:25 +0000
bugs590325
milestone2.0b10pre
Follow-up fix 2 for bug 590325.
extensions/pref/autoconfig/src/nsJSConfigTriggers.cpp
--- a/extensions/pref/autoconfig/src/nsJSConfigTriggers.cpp
+++ b/extensions/pref/autoconfig/src/nsJSConfigTriggers.cpp
@@ -158,17 +158,17 @@ nsresult CentralizedAdminPrefManagerInit
     // Create a new Security Manger and set it for the new JS context
     nsCOMPtr<nsIXPCSecurityManager> secman =
         static_cast<nsIXPCSecurityManager*>(new AutoConfigSecMan());
     xpc->SetSecurityManagerForJSContext(autoconfig_cx, secman, 0);
 
     autoconfig_glob = JS_NewCompartmentAndGlobalObject(autoconfig_cx, &global_class, NULL);
     if (autoconfig_glob) {
         JSAutoEnterCompartment ac;
-        if(!ac.enter(ccx, autoconfig_glob))
+        if(!ac.enter(autoconfig_cx, autoconfig_glob))
             return NS_ERROR_FAILURE;
         if (JS_InitStandardClasses(autoconfig_cx, autoconfig_glob)) {
             // XPCONNECT enable this JS context
             rv = xpc->InitClasses(autoconfig_cx, autoconfig_glob);
             if (NS_SUCCEEDED(rv)) 
                 return NS_OK;
         }
     }