Bug 1445025: Part 3 - Change blocklist init flags for browser process so that they can be modified by launcher process; r=mhowell
authorAaron Klotz <aklotz@mozilla.com>
Tue, 05 Jun 2018 15:21:51 -0600
changeset 805575 92ef8aaaa0f24280431472b11c611461104e41cd
parent 805574 2c97e6fe6c3de829c4972239e9de3b0701d7c939
child 805576 b12029c4cbf21226e60f9097f2f827954cd982b6
push id112702
push userbmo:mh+mozilla@glandium.org
push dateFri, 08 Jun 2018 01:32:47 +0000
reviewersmhowell
bugs1445025
milestone62.0a1
Bug 1445025: Part 3 - Change blocklist init flags for browser process so that they can be modified by launcher process; r=mhowell
browser/app/nsBrowserApp.cpp
--- a/browser/app/nsBrowserApp.cpp
+++ b/browser/app/nsBrowserApp.cpp
@@ -249,16 +249,21 @@ InitXPCOMGlue()
   }
 
   // This will set this thread as the main thread.
   gBootstrap->NS_LogInit();
 
   return NS_OK;
 }
 
+#ifdef HAS_DLL_BLOCKLIST
+// NB: This must be extern, as this value is checked elsewhere
+uint32_t gBlocklistInitFlags = eDllBlocklistInitFlagDefault;
+#endif
+
 int main(int argc, char* argv[], char* envp[])
 {
   mozilla::TimeStamp start = mozilla::TimeStamp::Now();
 
 #ifdef MOZ_BROWSER_CAN_BE_CONTENTPROC
   // We are launching as a content process, delegate to the appropriate
   // main
   if (argc > 1 && IsArg(argv[1], "contentproc")) {
@@ -284,17 +289,17 @@ int main(int argc, char* argv[], char* e
     // InitXPCOMGlue calls NS_LogInit, so we need to balance it here.
     gBootstrap->NS_LogTerm();
 
     return result;
   }
 #endif
 
 #ifdef HAS_DLL_BLOCKLIST
-  DllBlocklist_Initialize();
+  DllBlocklist_Initialize(gBlocklistInitFlags);
 #endif
 
   nsresult rv = InitXPCOMGlue();
   if (NS_FAILED(rv)) {
     return 255;
   }
 
   gBootstrap->XRE_StartupTimelineRecord(mozilla::StartupTimeline::START, start);