Bug 1492095 - Replace the XPCOM component registration for nsAppStartupNotifier removed in bug 1491741. rs=bustage-fix DONTBUILD
☠☠ backed out by cfc817da7111 ☠ ☠
authorJorg K <jorgk@jorgk.com>
Tue, 18 Sep 2018 12:58:11 +0200
changeset 33178 b656dcc776f99be78749d34ff1b6bcbc2a129762
parent 33177 5d2710bb0b4e33787c9ff135ce472c7af6e5177a
child 33179 cfc817da711194fab8fd0c4aaa4c26fbc7a81f30
push id387
push userclokep@gmail.com
push dateMon, 10 Dec 2018 21:30:47 +0000
reviewersbustage-fix
bugs1492095, 1491741
Bug 1492095 - Replace the XPCOM component registration for nsAppStartupNotifier removed in bug 1491741. rs=bustage-fix DONTBUILD
common/public/nsCommonBaseCID.h
common/src/moz.build
common/src/nsCommonModule.cpp
--- a/common/public/nsCommonBaseCID.h
+++ b/common/public/nsCommonBaseCID.h
@@ -17,9 +17,13 @@
 #define NS_BASECOMMANDCONTROLLER_CONTRACTID "@mozilla.org/embedcomp/base-command-controller;1"
 #define NS_BASECOMMANDCONTROLLER_CID \
   { 0xbf88b48c, 0xfd8e, 0x40b4, { 0xba, 0x36, 0xc7, 0xc3, 0xad, 0x6d, 0x8a, 0xc9 } }
 
 #define NS_TRANSACTIONMANAGER_CONTRACTID "@mozilla.org/transactionmanager;1"
 #define NS_TRANSACTIONMANAGER_CID \
   { 0x9c8f9601, 0x801a, 0x11d2, { 0x98, 0xba, 0x0, 0x80, 0x5f, 0x29, 0x7d, 0x89 } }
 
+#define NS_APPSTARTUPNOTIFIER_CONTRACTID "@mozilla.org/embedcomp/appstartup-notifier;1"
+#define NS_APPSTARTUPNOTIFIER_CID \
+   { 0x1f59b001, 0x2c9, 0x11d5, { 0xae, 0x76, 0xcc, 0x92, 0xf7, 0xdb, 0x9e, 0x3 } }
+
 #endif // nsCommonBaseCID_h__
--- a/common/src/moz.build
+++ b/common/src/moz.build
@@ -8,10 +8,12 @@ EXTRA_JS_MODULES += [
     'extensionSupport.jsm',
     'Overlays.jsm'
 ]
 
 SOURCES += [
     'nsCommonModule.cpp',
     'nsComponentManagerExtra.cpp',
 ]
-
+LOCAL_INCLUDES += [
+    '/%s/toolkit/xre' % CONFIG['mozreltopsrcdir'],
+]
 FINAL_LIBRARY = 'xul'
--- a/common/src/nsCommonModule.cpp
+++ b/common/src/nsCommonModule.cpp
@@ -1,40 +1,46 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "mozilla/ModuleUtils.h"
 #include "mozilla/TransactionManager.h"
+#include "nsAppStartupNotifier.h"
 #include "nsBaseCommandController.h"
 #include "nsCommonBaseCID.h"
 #include "nsComponentManagerExtra.h"
 
 using mozilla::TransactionManager;
 
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsComponentManagerExtra)
 NS_DEFINE_NAMED_CID(NS_COMPONENTMANAGEREXTRA_CID);
 
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsBaseCommandController)
 NS_DEFINE_NAMED_CID(NS_BASECOMMANDCONTROLLER_CID);
 
 NS_GENERIC_FACTORY_CONSTRUCTOR(TransactionManager)
 NS_DEFINE_NAMED_CID(NS_TRANSACTIONMANAGER_CID);
 
+NS_GENERIC_FACTORY_CONSTRUCTOR(nsAppStartupNotifier)
+NS_DEFINE_NAMED_CID(NS_APPSTARTUPNOTIFIER_CID);
+
 const mozilla::Module::CIDEntry kCommonCIDs[] = {
   { &kNS_COMPONENTMANAGEREXTRA_CID, false, nullptr, nsComponentManagerExtraConstructor },
   { &kNS_BASECOMMANDCONTROLLER_CID, false, nullptr, nsBaseCommandControllerConstructor },
   { &kNS_TRANSACTIONMANAGER_CID, false, nullptr, TransactionManagerConstructor },
+  { &kNS_APPSTARTUPNOTIFIER_CID, false, nullptr, nsAppStartupNotifierConstructor },
   { nullptr }
 };
 
 const mozilla::Module::ContractIDEntry kCommonContracts[] = {
   { NS_COMPONENTMANAGEREXTRA_CONTRACTID, &kNS_COMPONENTMANAGEREXTRA_CID },
   { NS_BASECOMMANDCONTROLLER_CONTRACTID, &kNS_BASECOMMANDCONTROLLER_CID },
   { NS_TRANSACTIONMANAGER_CONTRACTID, &kNS_TRANSACTIONMANAGER_CID },
+  { NS_APPSTARTUPNOTIFIER_CONTRACTID, &kNS_APPSTARTUPNOTIFIER_CID },
   { nullptr }
 };
 
 static const mozilla::Module kCommonModule = {
   mozilla::Module::kVersion,
   kCommonCIDs,
   kCommonContracts,
   nullptr,