Commit 01397bc4 authored by Nick Alexander's avatar Nick Alexander
Browse files

Bug 1667276 - Pre: Disable extension manager in background tasks mode. r=mossop

parent deb11ffd
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -285,3 +285,6 @@ if CONFIG["MOZ_IPDL_TESTS"]:

if CONFIG["ENABLE_TESTS"]:
    DIRS += ["test/gtest"]

if CONFIG["MOZ_BACKGROUNDTASKS"]:
    DEFINES["MOZ_BACKGROUNDTASKS"] = True
+18 −7
Original line number Diff line number Diff line
@@ -39,6 +39,9 @@
#include "mozilla/dom/ScriptSettings.h"

#include "mozilla/AutoRestore.h"
#ifdef MOZ_BACKGROUNDTASKS
#  include "mozilla/BackgroundTasks.h"
#endif
#include "mozilla/Components.h"
#include "mozilla/Services.h"
#include "mozilla/Omnijar.h"
@@ -966,6 +969,13 @@ nsXREDirProvider::DoStartup() {
    mozilla::SandboxBroker::GeckoDependentInitialize();
#endif

    bool initExtensionManager =
#ifdef MOZ_BACKGROUNDTASKS
        !mozilla::BackgroundTasks::IsBackgroundTaskMode();
#else
        true;
#endif
    if (initExtensionManager) {
      // Init the Extension Manager
      nsCOMPtr<nsIObserver> em =
          do_GetService("@mozilla.org/addons/integration;1");
@@ -974,6 +984,7 @@ nsXREDirProvider::DoStartup() {
      } else {
        NS_WARNING("Failed to create Addons Manager.");
      }
    }

    obsSvc->NotifyObservers(nullptr, "profile-after-change", kStartup);