Bug 1066718 - Get sIOService before invoking ReadPrefs. r=bz, a=sledru
authorBobby Holley <bobbyholley@gmail.com>
Tue, 16 Sep 2014 21:30:32 +0200
changeset 216763 262de5944a01
parent 216762 025117f71163
child 216764 c0ba357c4c89
push id3905
push userryanvm@gmail.com
push date2014-09-17 14:39 +0000
treeherdermozilla-beta@262de5944a01 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz, sledru
bugs1066718
milestone33.0
Bug 1066718 - Get sIOService before invoking ReadPrefs. r=bz, a=sledru
caps/nsScriptSecurityManager.cpp
--- a/caps/nsScriptSecurityManager.cpp
+++ b/caps/nsScriptSecurityManager.cpp
@@ -1203,21 +1203,21 @@ nsScriptSecurityManager::nsScriptSecurit
 {
     static_assert(sizeof(intptr_t) == sizeof(void*),
                   "intptr_t and void* have different lengths on this platform. "
                   "This may cause a security failure with the SecurityLevel union.");
 }
 
 nsresult nsScriptSecurityManager::Init()
 {
-    InitPrefs();
-
     nsresult rv = CallGetService(NS_IOSERVICE_CONTRACTID, &sIOService);
     NS_ENSURE_SUCCESS(rv, rv);
 
+    InitPrefs();
+
     nsCOMPtr<nsIStringBundleService> bundleService =
         mozilla::services::GetStringBundleService();
     if (!bundleService)
         return NS_ERROR_FAILURE;
 
     rv = bundleService->CreateBundle("chrome://global/locale/security/caps.properties", &sStrBundle);
     NS_ENSURE_SUCCESS(rv, rv);