Bug 1489790 - Part 1: Remove the XPCOM component registration for nsControllerCommandTable as well as kHTMLEditorCommandTableCID and kHTMLEditorDocStateCommandTableCID; r=baku
authorEhsan Akhgari <ehsan@mozilla.com>
Thu, 06 Sep 2018 23:17:29 -0400
changeset 435698 5353a7ddf87ca567cfe4e1fb986b073a88624edc
parent 435697 285eb0ebe26fcadb05eba3d22bee42845548a4c1
child 435699 5ebefb4dfabab57c01fa7959afda0287b4d6bd23
push id34618
push userbtara@mozilla.com
push dateTue, 11 Sep 2018 22:13:11 +0000
treeherdermozilla-central@1169e8a4ca2b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1489790
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1489790 - Part 1: Remove the XPCOM component registration for nsControllerCommandTable as well as kHTMLEditorCommandTableCID and kHTMLEditorDocStateCommandTableCID; r=baku Differential Revision: https://phabricator.services.mozilla.com/D5356
dom/commandhandler/moz.build
dom/commandhandler/nsBaseCommandController.cpp
dom/commandhandler/nsControllerCommandTable.cpp
dom/commandhandler/nsControllerCommandTable.h
dom/commandhandler/nsIControllerCommandTable.idl
editor/composer/nsComposerRegistration.cpp
layout/build/nsLayoutModule.cpp
toolkit/xre/nsEmbeddingModule.cpp
--- a/dom/commandhandler/moz.build
+++ b/dom/commandhandler/moz.build
@@ -6,16 +6,17 @@
 
 with Files("**"):
     BUG_COMPONENT = ("Core", "Embedding: APIs")
 
 EXPORTS += [
     'nsBaseCommandController.h',
     'nsCommandManager.h',
     'nsCommandParams.h',
+    'nsControllerCommandTable.h',
 ]
 
 XPIDL_SOURCES += [
     'nsICommandManager.idl',
     'nsICommandParams.idl',
     'nsIControllerCommand.idl',
     'nsIControllerCommandTable.idl',
     'nsIControllerContext.idl',
--- a/dom/commandhandler/nsBaseCommandController.cpp
+++ b/dom/commandhandler/nsBaseCommandController.cpp
@@ -2,16 +2,17 @@
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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 "nsString.h"
 #include "nsIComponentManager.h"
 #include "nsBaseCommandController.h"
+#include "nsControllerCommandTable.h"
 
 #include "nsString.h"
 #include "nsWeakPtr.h"
 
 NS_IMPL_ADDREF(nsBaseCommandController)
 NS_IMPL_RELEASE(nsBaseCommandController)
 
 NS_INTERFACE_MAP_BEGIN(nsBaseCommandController)
@@ -29,26 +30,23 @@ nsBaseCommandController::nsBaseCommandCo
 
 nsBaseCommandController::~nsBaseCommandController()
 {
 }
 
 NS_IMETHODIMP
 nsBaseCommandController::Init(nsIControllerCommandTable* aCommandTable)
 {
-  nsresult rv = NS_OK;
-
   if (aCommandTable) {
     mCommandTable = aCommandTable;
   } else {
-    mCommandTable =
-      do_CreateInstance(NS_CONTROLLERCOMMANDTABLE_CONTRACTID, &rv);
+    mCommandTable = new nsControllerCommandTable();
   }
 
-  return rv;
+  return NS_OK;
 }
 
 NS_IMETHODIMP
 nsBaseCommandController::SetCommandContext(nsISupports* aCommandContext)
 {
   mCommandContextWeakPtr = nullptr;
   mCommandContextRawPtr = nullptr;
 
--- a/dom/commandhandler/nsControllerCommandTable.cpp
+++ b/dom/commandhandler/nsControllerCommandTable.cpp
@@ -2,16 +2,17 @@
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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 "nsString.h"
 #include "nsIControllerCommand.h"
 #include "nsControllerCommandTable.h"
+#include "mozilla/HTMLEditorController.h"
 
 nsresult NS_NewControllerCommandTable(nsIControllerCommandTable** aResult);
 
 // this value is used to size the hash table. Just a sensible upper bound
 #define NUM_COMMANDS_LENGTH 32
 
 nsControllerCommandTable::nsControllerCommandTable()
   : mCommandsTable(NUM_COMMANDS_LENGTH)
@@ -189,16 +190,49 @@ nsControllerCommandTable::GetSupportedCo
 
   for (auto iter = mCommandsTable.Iter(); !iter.Done(); iter.Next()) {
     *commands = ToNewCString(iter.Key());
     commands++;
   }
   return NS_OK;
 }
 
+// static
+already_AddRefed<nsIControllerCommandTable>
+nsControllerCommandTable::CreateHTMLEditorCommandTable()
+{
+  nsCOMPtr<nsIControllerCommandTable> commandTable =
+      new nsControllerCommandTable();
+
+  nsresult rv = mozilla::HTMLEditorController::RegisterHTMLEditorCommands(commandTable);
+  NS_ENSURE_SUCCESS(rv, nullptr);
+
+  // we don't know here whether we're being created as an instance,
+  // or a service, so we can't become immutable
+
+  return commandTable.forget();
+}
+
+// static
+already_AddRefed<nsIControllerCommandTable>
+nsControllerCommandTable::CreateHTMLEditorDocStateCommandTable()
+{
+  nsCOMPtr<nsIControllerCommandTable> commandTable =
+      new nsControllerCommandTable();
+
+  nsresult rv = mozilla::HTMLEditorController::RegisterEditorDocStateCommands(
+                                        commandTable);
+  NS_ENSURE_SUCCESS(rv, nullptr);
+
+  // we don't know here whether we're being created as an instance,
+  // or a service, so we can't become immutable
+
+  return commandTable.forget();
+}
+
 nsresult
 NS_NewControllerCommandTable(nsIControllerCommandTable** aResult)
 {
   MOZ_ASSERT(aResult != nullptr, "null ptr");
   if (!aResult) {
     return NS_ERROR_NULL_POINTER;
   }
 
--- a/dom/commandhandler/nsControllerCommandTable.h
+++ b/dom/commandhandler/nsControllerCommandTable.h
@@ -18,16 +18,19 @@ class nsControllerCommandTable final
   , public nsSupportsWeakReference
 {
 public:
   nsControllerCommandTable();
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSICONTROLLERCOMMANDTABLE
 
+  static already_AddRefed<nsIControllerCommandTable> CreateHTMLEditorCommandTable();
+  static already_AddRefed<nsIControllerCommandTable> CreateHTMLEditorDocStateCommandTable();
+
 protected:
   virtual ~nsControllerCommandTable();
 
   // Hash table of nsIControllerCommands, keyed by command name.
   nsInterfaceHashtable<nsCStringHashKey, nsIControllerCommand> mCommandsTable;
 
   // Are we mutable?
   bool mMutable;
--- a/dom/commandhandler/nsIControllerCommandTable.idl
+++ b/dom/commandhandler/nsIControllerCommandTable.idl
@@ -82,19 +82,8 @@ interface nsIControllerCommandTable : ns
 	void    doCommandParams(in string aCommandName, in nsICommandParams aParam, in nsISupports aCommandRefCon);
 
 	void    getCommandState(in string aCommandName, in nsICommandParams aParam, in nsISupports aCommandRefCon);
 
   void getSupportedCommands(out unsigned long count,
                             [array, size_is(count), retval] out string commands);
 };
 
-
-
-%{C++
-// {670ee5da-6ad5-11d7-9950-000393636592}
-#define NS_CONTROLLERCOMMANDTABLE_CID \
-  {0x670ee5da, 0x6ad5, 0x11d7, \
-    { 0x99, 0x50, 0x00, 0x03, 0x93, 0x63, 0x65, 0x92 }}
-
-#define NS_CONTROLLERCOMMANDTABLE_CONTRACTID \
- "@mozilla.org/embedcomp/controller-command-table;1"
-%}
--- a/editor/composer/nsComposerRegistration.cpp
+++ b/editor/composer/nsComposerRegistration.cpp
@@ -9,66 +9,56 @@
 #include "mozilla/ModuleUtils.h"
 #include "mozilla/mozalloc.h"           // for operator new
 #include "nsCOMPtr.h"                   // for nsCOMPtr, getter_AddRefs, etc
 #include "nsBaseCommandController.h"    // for nsBaseCommandController
 #include "nsComponentManagerUtils.h"    // for do_CreateInstance
 #include "nsDebug.h"                    // for NS_ENSURE_SUCCESS
 #include "nsError.h"                    // for NS_ERROR_NO_AGGREGATION, etc
 #include "nsIController.h"              // for nsIController
-#include "nsIControllerCommandTable.h"  // for nsIControllerCommandTable, etc
 #include "nsIControllerContext.h"       // for nsIControllerContext
 #include "nsID.h"                       // for NS_DEFINE_NAMED_CID, etc
 #include "nsISupportsImpl.h"
 #include "nsISupportsUtils.h"           // for NS_ADDREF, NS_RELEASE
+#include "nsControllerCommandTable.h"   // for nsControllerCommandTable, etc
 #include "nsServiceManagerUtils.h"      // for do_GetService
 #include "nscore.h"                     // for nsresult
 
 using mozilla::EditorSpellCheck;
 
 class nsISupports;
 
-#define NS_HTMLEDITOR_COMMANDTABLE_CID \
-{ 0x13e50d8d, 0x9cee, 0x4ad1, { 0xa3, 0xa2, 0x4a, 0x44, 0x2f, 0xdf, 0x7d, 0xfa } }
-
-#define NS_HTMLEDITOR_DOCSTATE_COMMANDTABLE_CID \
-{ 0xa33982d3, 0x1adf, 0x4162, { 0x99, 0x41, 0xf7, 0x34, 0xbc, 0x45, 0xe4, 0xed } }
-
-
-static NS_DEFINE_CID(kHTMLEditorCommandTableCID, NS_HTMLEDITOR_COMMANDTABLE_CID);
-static NS_DEFINE_CID(kHTMLEditorDocStateCommandTableCID, NS_HTMLEDITOR_DOCSTATE_COMMANDTABLE_CID);
-
-
 ////////////////////////////////////////////////////////////////////////
 // Define the contructor function for the objects
 //
 // NOTE: This creates an instance of objects by using the default constructor
 //
 
 NS_GENERIC_FACTORY_CONSTRUCTOR(EditorSpellCheck)
 
 // Constructor for a controller set up with a command table specified
 // by the CID passed in. This function uses do_GetService to get the
 // command table, so that every controller shares a single command
 // table, for space-efficiency.
 //
 // The only reason to go via the service manager for the command table
 // is that it holds onto the singleton for us, avoiding static variables here.
 static nsresult
-CreateControllerWithSingletonCommandTable(const nsCID& inCommandTableCID, nsIController **aResult)
+CreateControllerWithSingletonCommandTable(
+    already_AddRefed<nsIControllerCommandTable> aComposerCommandTable,
+    nsIController **aResult)
 {
   nsCOMPtr<nsIController> controller = new nsBaseCommandController();
 
-  nsresult rv;
-  nsCOMPtr<nsIControllerCommandTable> composerCommandTable = do_GetService(inCommandTableCID, &rv);
-  NS_ENSURE_SUCCESS(rv, rv);
+  nsCOMPtr<nsIControllerCommandTable> composerCommandTable(aComposerCommandTable);
 
   // this guy is a singleton, so make it immutable
   composerCommandTable->MakeImmutable();
 
+  nsresult rv;
   nsCOMPtr<nsIControllerContext> controllerContext = do_QueryInterface(controller, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   rv = controllerContext->Init(composerCommandTable);
   NS_ENSURE_SUCCESS(rv, rv);
 
   *aResult = controller;
   NS_ADDREF(*aResult);
@@ -78,85 +68,45 @@ CreateControllerWithSingletonCommandTabl
 
 // Here we make an instance of the controller that holds doc state commands.
 // We set it up with a singleton command table.
 static nsresult
 nsHTMLEditorDocStateControllerConstructor(nsISupports *aOuter, REFNSIID aIID,
                                               void **aResult)
 {
   nsCOMPtr<nsIController> controller;
-  nsresult rv = CreateControllerWithSingletonCommandTable(kHTMLEditorDocStateCommandTableCID, getter_AddRefs(controller));
+  nsresult rv = CreateControllerWithSingletonCommandTable(
+                  nsControllerCommandTable::CreateHTMLEditorDocStateCommandTable(),
+                  getter_AddRefs(controller));
   NS_ENSURE_SUCCESS(rv, rv);
 
   return controller->QueryInterface(aIID, aResult);
 }
 
 // Tere we make an instance of the controller that holds composer commands.
 // We set it up with a singleton command table.
 static nsresult
 nsHTMLEditorControllerConstructor(nsISupports *aOuter, REFNSIID aIID, void **aResult)
 {
   nsCOMPtr<nsIController> controller;
-  nsresult rv = CreateControllerWithSingletonCommandTable(kHTMLEditorCommandTableCID, getter_AddRefs(controller));
+  nsresult rv = CreateControllerWithSingletonCommandTable(
+                  nsControllerCommandTable::CreateHTMLEditorCommandTable(),
+                  getter_AddRefs(controller));
   NS_ENSURE_SUCCESS(rv, rv);
 
   return controller->QueryInterface(aIID, aResult);
 }
 
-// Constructor for a command table that is pref-filled with HTML editor commands
-static nsresult
-nsHTMLEditorCommandTableConstructor(nsISupports *aOuter, REFNSIID aIID,
-                                              void **aResult)
-{
-  nsresult rv;
-  nsCOMPtr<nsIControllerCommandTable> commandTable =
-      do_CreateInstance(NS_CONTROLLERCOMMANDTABLE_CONTRACTID, &rv);
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  rv = mozilla::HTMLEditorController::RegisterHTMLEditorCommands(commandTable);
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  // we don't know here whether we're being created as an instance,
-  // or a service, so we can't become immutable
-
-  return commandTable->QueryInterface(aIID, aResult);
-}
-
-
-// Constructor for a command table that is pref-filled with HTML editor doc state commands
-static nsresult
-nsHTMLEditorDocStateCommandTableConstructor(nsISupports *aOuter, REFNSIID aIID,
-                                              void **aResult)
-{
-  nsresult rv;
-  nsCOMPtr<nsIControllerCommandTable> commandTable =
-      do_CreateInstance(NS_CONTROLLERCOMMANDTABLE_CONTRACTID, &rv);
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  rv = mozilla::HTMLEditorController::RegisterEditorDocStateCommands(
-                                        commandTable);
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  // we don't know here whether we're being created as an instance,
-  // or a service, so we can't become immutable
-
-  return commandTable->QueryInterface(aIID, aResult);
-}
-
 NS_DEFINE_NAMED_CID(NS_HTMLEDITORCONTROLLER_CID);
 NS_DEFINE_NAMED_CID(NS_EDITORDOCSTATECONTROLLER_CID);
-NS_DEFINE_NAMED_CID(NS_HTMLEDITOR_COMMANDTABLE_CID);
-NS_DEFINE_NAMED_CID(NS_HTMLEDITOR_DOCSTATE_COMMANDTABLE_CID);
 NS_DEFINE_NAMED_CID(NS_EDITORSPELLCHECK_CID);
 
 static const mozilla::Module::CIDEntry kComposerCIDs[] = {
   { &kNS_HTMLEDITORCONTROLLER_CID, false, nullptr, nsHTMLEditorControllerConstructor },
   { &kNS_EDITORDOCSTATECONTROLLER_CID, false, nullptr, nsHTMLEditorDocStateControllerConstructor },
-  { &kNS_HTMLEDITOR_COMMANDTABLE_CID, false, nullptr, nsHTMLEditorCommandTableConstructor },
-  { &kNS_HTMLEDITOR_DOCSTATE_COMMANDTABLE_CID, false, nullptr, nsHTMLEditorDocStateCommandTableConstructor },
   { &kNS_EDITORSPELLCHECK_CID, false, nullptr, EditorSpellCheckConstructor },
   { nullptr }
 };
 
 static const mozilla::Module::ContractIDEntry kComposerContracts[] = {
   { "@mozilla.org/editor/htmleditorcontroller;1", &kNS_HTMLEDITORCONTROLLER_CID },
   { "@mozilla.org/editor/editordocstatecontroller;1", &kNS_EDITORDOCSTATECONTROLLER_CID },
   { "@mozilla.org/editor/editorspellchecker;1", &kNS_EDITORSPELLCHECK_CID },
--- a/layout/build/nsLayoutModule.cpp
+++ b/layout/build/nsLayoutModule.cpp
@@ -53,17 +53,16 @@
 
 // Transformiix stuff
 #include "mozilla/dom/XPathEvaluator.h"
 
 // view stuff
 #include "nsContentCreatorFunctions.h"
 
 #include "nsGlobalWindowCommands.h"
-#include "nsIControllerCommandTable.h"
 #include "nsJSProtocolHandler.h"
 #include "nsIControllerContext.h"
 #include "nsZipArchive.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/dom/BlobURL.h"
 #include "mozilla/dom/DOMRequest.h"
 #include "mozilla/dom/SDBConnection.h"
 #include "mozilla/dom/LocalStorageManager.h"
@@ -145,16 +144,17 @@ static void Shutdown();
 
 #include "GMPService.h"
 
 #include "mozilla/dom/PresentationDeviceManager.h"
 #include "mozilla/dom/PresentationTCPSessionTransport.h"
 
 #include "nsScriptError.h"
 #include "nsBaseCommandController.h"
+#include "nsControllerCommandTable.h"
 
 #include "mozilla/TextInputProcessor.h"
 
 using namespace mozilla;
 using namespace mozilla::dom;
 using namespace mozilla::net;
 using mozilla::dom::power::PowerManagerService;
 using mozilla::dom::quota::QuotaManagerService;
@@ -554,22 +554,21 @@ NS_DEFINE_NAMED_CID(PRESENTATION_TCP_SES
 NS_DEFINE_NAMED_CID(TEXT_INPUT_PROCESSOR_CID);
 
 NS_DEFINE_NAMED_CID(NS_SCRIPTERROR_CID);
 
 static nsresult
 CreateWindowCommandTableConstructor(nsISupports *aOuter,
                                     REFNSIID aIID, void **aResult)
 {
-  nsresult rv;
   nsCOMPtr<nsIControllerCommandTable> commandTable =
-      do_CreateInstance(NS_CONTROLLERCOMMANDTABLE_CONTRACTID, &rv);
-  if (NS_FAILED(rv)) return rv;
+      new nsControllerCommandTable();
 
-  rv = nsWindowCommandRegistration::RegisterWindowCommands(commandTable);
+  nsresult rv =
+    nsWindowCommandRegistration::RegisterWindowCommands(commandTable);
   if (NS_FAILED(rv)) return rv;
 
   return commandTable->QueryInterface(aIID, aResult);
 }
 
 static nsresult
 CreateWindowControllerWithSingletonCommandTable(nsISupports *aOuter,
                                       REFNSIID aIID, void **aResult)
@@ -639,41 +638,37 @@ nsEditingControllerConstructor(nsISuppor
   return controller->QueryInterface(aIID, aResult);
 }
 
 // Constructor for a command-table pre-filled with editor commands
 static nsresult
 nsEditorCommandTableConstructor(nsISupports *aOuter, REFNSIID aIID,
                                             void **aResult)
 {
-  nsresult rv;
   nsCOMPtr<nsIControllerCommandTable> commandTable =
-      do_CreateInstance(NS_CONTROLLERCOMMANDTABLE_CONTRACTID, &rv);
-  if (NS_FAILED(rv)) return rv;
+      new nsControllerCommandTable();
 
-  rv = EditorController::RegisterEditorCommands(commandTable);
+  nsresult rv = EditorController::RegisterEditorCommands(commandTable);
   if (NS_FAILED(rv)) return rv;
 
   // we don't know here whether we're being created as an instance,
   // or a service, so we can't become immutable
 
   return commandTable->QueryInterface(aIID, aResult);
 }
 
 // Constructor for a command-table pre-filled with editing commands
 static nsresult
 nsEditingCommandTableConstructor(nsISupports *aOuter, REFNSIID aIID,
                                               void **aResult)
 {
-  nsresult rv;
   nsCOMPtr<nsIControllerCommandTable> commandTable =
-      do_CreateInstance(NS_CONTROLLERCOMMANDTABLE_CONTRACTID, &rv);
-  if (NS_FAILED(rv)) return rv;
+      new nsControllerCommandTable();
 
-  rv = EditorController::RegisterEditingCommands(commandTable);
+  nsresult rv = EditorController::RegisterEditingCommands(commandTable);
   if (NS_FAILED(rv)) return rv;
 
   // we don't know here whether we're being created as an instance,
   // or a service, so we can't become immutable
 
   return commandTable->QueryInterface(aIID, aResult);
 }
 
--- a/toolkit/xre/nsEmbeddingModule.cpp
+++ b/toolkit/xre/nsEmbeddingModule.cpp
@@ -5,34 +5,32 @@
 
 #include "mozilla/ModuleUtils.h"
 #include "nsDialogParamBlock.h"
 #include "nsWindowWatcher.h"
 #include "nsAppStartupNotifier.h"
 #include "nsFind.h"
 #include "nsWebBrowserFind.h"
 #include "nsWebBrowserPersist.h"
-#include "nsControllerCommandTable.h"
 #include "nsCommandParams.h"
 #include "nsCommandGroup.h"
 #include "nsNetCID.h"
 #include "nsEmbedCID.h"
 
 #ifdef NS_PRINTING
 #include "nsPrintingPromptService.h"
 #include "nsPrintingProxy.h"
 #endif
 
 
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsWindowWatcher, Init)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsAppStartupNotifier)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsFind)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsWebBrowserFind)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsWebBrowserPersist)
-NS_GENERIC_FACTORY_CONSTRUCTOR(nsControllerCommandTable)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsCommandParams)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsControllerCommandGroup)
 
 #ifdef MOZ_XUL
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsDialogParamBlock)
 #ifdef NS_PRINTING
 NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsPrintingPromptService,
                                          nsPrintingPromptService::GetSingleton)
@@ -49,17 +47,16 @@ NS_DEFINE_NAMED_CID(NS_DIALOGPARAMBLOCK_
 NS_DEFINE_NAMED_CID(NS_PRINTINGPROMPTSERVICE_CID);
 #endif
 #endif
 NS_DEFINE_NAMED_CID(NS_WINDOWWATCHER_CID);
 NS_DEFINE_NAMED_CID(NS_FIND_CID);
 NS_DEFINE_NAMED_CID(NS_WEB_BROWSER_FIND_CID);
 NS_DEFINE_NAMED_CID(NS_APPSTARTUPNOTIFIER_CID);
 NS_DEFINE_NAMED_CID(NS_WEBBROWSERPERSIST_CID);
-NS_DEFINE_NAMED_CID(NS_CONTROLLERCOMMANDTABLE_CID);
 NS_DEFINE_NAMED_CID(NS_COMMAND_PARAMS_CID);
 NS_DEFINE_NAMED_CID(NS_CONTROLLER_COMMAND_GROUP_CID);
 
 static const mozilla::Module::CIDEntry kEmbeddingCIDs[] = {
 #ifdef MOZ_XUL
     { &kNS_DIALOGPARAMBLOCK_CID, false, nullptr, nsDialogParamBlockConstructor },
 #ifdef NS_PRINTING
 
@@ -73,17 +70,16 @@ static const mozilla::Module::CIDEntry k
 #endif
 #endif
 #endif
     { &kNS_WINDOWWATCHER_CID, false, nullptr, nsWindowWatcherConstructor },
     { &kNS_FIND_CID, false, nullptr, nsFindConstructor },
     { &kNS_WEB_BROWSER_FIND_CID, false, nullptr, nsWebBrowserFindConstructor },
     { &kNS_APPSTARTUPNOTIFIER_CID, false, nullptr, nsAppStartupNotifierConstructor },
     { &kNS_WEBBROWSERPERSIST_CID, false, nullptr, nsWebBrowserPersistConstructor },
-    { &kNS_CONTROLLERCOMMANDTABLE_CID, false, nullptr, nsControllerCommandTableConstructor },
     { &kNS_COMMAND_PARAMS_CID, false, nullptr, nsCommandParamsConstructor },
     { &kNS_CONTROLLER_COMMAND_GROUP_CID, false, nullptr, nsControllerCommandGroupConstructor },
     { nullptr }
 };
 
 static const mozilla::Module::ContractIDEntry kEmbeddingContracts[] = {
 #ifdef MOZ_XUL
     { NS_DIALOGPARAMBLOCK_CONTRACTID, &kNS_DIALOGPARAMBLOCK_CID },
@@ -91,17 +87,16 @@ static const mozilla::Module::ContractID
     { NS_PRINTINGPROMPTSERVICE_CONTRACTID, &kNS_PRINTINGPROMPTSERVICE_CID },
 #endif
 #endif
     { NS_WINDOWWATCHER_CONTRACTID, &kNS_WINDOWWATCHER_CID },
     { NS_FIND_CONTRACTID, &kNS_FIND_CID },
     { NS_WEB_BROWSER_FIND_CONTRACTID, &kNS_WEB_BROWSER_FIND_CID },
     { NS_APPSTARTUPNOTIFIER_CONTRACTID, &kNS_APPSTARTUPNOTIFIER_CID },
     { NS_WEBBROWSERPERSIST_CONTRACTID, &kNS_WEBBROWSERPERSIST_CID },
-    { NS_CONTROLLERCOMMANDTABLE_CONTRACTID, &kNS_CONTROLLERCOMMANDTABLE_CID },
     { NS_COMMAND_PARAMS_CONTRACTID, &kNS_COMMAND_PARAMS_CID },
     { NS_CONTROLLER_COMMAND_GROUP_CONTRACTID, &kNS_CONTROLLER_COMMAND_GROUP_CID },
     { nullptr }
 };
 
 static const mozilla::Module kEmbeddingModule = {
     mozilla::Module::kVersion,
     kEmbeddingCIDs,