Bug 568691 - Add CID data back to classinfo because it's required for fastload to work correctly.
authorBenjamin Smedberg <benjamin@smedbergs.us>
Tue, 22 Jun 2010 12:59:57 -0400
changeset 47016 21d8bc633dfae548bdbdc5d3c1f538cec582c152
parent 47015 90afd1e80d77886ae95fc83c2f0385ad59b2e687
child 47017 f1181e8c11e3e1a9c1f6e3eddc902361d14986b3
push id14223
push userbsmedberg@mozilla.com
push dateThu, 01 Jul 2010 18:30:48 +0000
treeherdermozilla-central@836fd3f8feba [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs568691
milestone1.9.3a6pre
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 568691 - Add CID data back to classinfo because it's required for fastload to work correctly.
caps/src/nsNullPrincipal.cpp
caps/src/nsPrincipal.cpp
caps/src/nsSystemPrincipal.cpp
js/src/xpconnect/src/xpcexception.cpp
js/src/xpconnect/src/xpcjsid.cpp
js/src/xpconnect/src/xpcmodule.h
js/src/xpconnect/src/xpcprivate.h
js/src/xpconnect/src/xpcvariant.cpp
netwerk/base/src/nsProtocolProxyService.cpp
toolkit/components/commandlines/src/nsCommandLine.cpp
toolkit/components/places/src/nsNavHistory.cpp
toolkit/mozapps/extensions/amInstallTrigger.cpp
uriloader/exthandler/nsDBusHandlerApp.cpp
xpcom/base/nsConsoleService.cpp
xpcom/glue/nsClassInfoImpl.cpp
xpcom/glue/nsIClassInfoImpl.h
xpcom/io/nsStringStream.cpp
xpcom/sample/nsSample.cpp
xpcom/threads/nsThreadManager.cpp
xpcom/threads/nsThreadPool.cpp
--- a/caps/src/nsNullPrincipal.cpp
+++ b/caps/src/nsNullPrincipal.cpp
@@ -48,17 +48,18 @@
 #include "nsIUUIDGenerator.h"
 #include "nsID.h"
 #include "nsNetUtil.h"
 #include "nsIClassInfoImpl.h"
 #include "nsNetCID.h"
 #include "nsDOMError.h"
 #include "nsScriptSecurityManager.h"
 
-NS_IMPL_CLASSINFO(nsNullPrincipal, NULL, nsIClassInfo::MAIN_THREAD_ONLY)
+NS_IMPL_CLASSINFO(nsNullPrincipal, NULL, nsIClassInfo::MAIN_THREAD_ONLY,
+                  NS_NULLPRINCIPAL_CID)
 NS_IMPL_QUERY_INTERFACE2_CI(nsNullPrincipal,
                             nsIPrincipal,
                             nsISerializable)
 NS_IMPL_CI_INTERFACE_GETTER2(nsNullPrincipal,
                              nsIPrincipal,
                              nsISerializable)
 
 NS_IMETHODIMP_(nsrefcnt) 
--- a/caps/src/nsPrincipal.cpp
+++ b/caps/src/nsPrincipal.cpp
@@ -135,17 +135,18 @@ static PRBool URIIsImmutable(nsIURI* aUR
     !isMutable;                               
 }
 
 // Static member variables
 PRInt32 nsPrincipal::sCapabilitiesOrdinal = 0;
 const char nsPrincipal::sInvalid[] = "Invalid";
 
 
-NS_IMPL_CLASSINFO(nsPrincipal, NULL, nsIClassInfo::MAIN_THREAD_ONLY)
+NS_IMPL_CLASSINFO(nsPrincipal, NULL, nsIClassInfo::MAIN_THREAD_ONLY,
+                  NS_PRINCIPAL_CID)
 NS_IMPL_QUERY_INTERFACE2_CI(nsPrincipal,
                             nsIPrincipal,
                             nsISerializable)
 NS_IMPL_CI_INTERFACE_GETTER2(nsPrincipal,
                              nsIPrincipal,
                              nsISerializable)
 
 NS_IMETHODIMP_(nsrefcnt)
--- a/caps/src/nsSystemPrincipal.cpp
+++ b/caps/src/nsSystemPrincipal.cpp
@@ -45,17 +45,18 @@
 #include "nsCOMPtr.h"
 #include "nsXPIDLString.h"
 #include "nsReadableUtils.h"
 #include "nsCRT.h"
 #include "nsString.h"
 #include "nsIClassInfoImpl.h"
 
 NS_IMPL_CLASSINFO(nsSystemPrincipal, NULL,
-                  nsIClassInfo::SINGLETON | nsIClassInfo::MAIN_THREAD_ONLY)
+                  nsIClassInfo::SINGLETON | nsIClassInfo::MAIN_THREAD_ONLY,
+                  NS_SYSTEMPRINCIPAL_CID)
 NS_IMPL_QUERY_INTERFACE2_CI(nsSystemPrincipal,
                             nsIPrincipal,
                             nsISerializable)
 NS_IMPL_CI_INTERFACE_GETTER2(nsSystemPrincipal,
                              nsIPrincipal,
                              nsISerializable)
 
 NS_IMETHODIMP_(nsrefcnt) 
--- a/js/src/xpconnect/src/xpcexception.cpp
+++ b/js/src/xpconnect/src/xpcexception.cpp
@@ -114,17 +114,18 @@ nsXPCException::IterateNSResults(nsresul
 PRUint32
 nsXPCException::GetNSResultCount()
 {
     return RESULT_COUNT;
 }
 
 /***************************************************************************/
 
-NS_IMPL_CLASSINFO(nsXPCException, NULL, nsIClassInfo::DOM_OBJECT)
+NS_IMPL_CLASSINFO(nsXPCException, NULL, nsIClassInfo::DOM_OBJECT,
+                  NS_XPCEXCEPTION_CID)
 NS_INTERFACE_MAP_BEGIN(nsXPCException)
   NS_INTERFACE_MAP_ENTRY(nsIException)
   NS_INTERFACE_MAP_ENTRY(nsIXPCException)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIException)
   NS_IMPL_QUERY_CLASSINFO(nsXPCException)
 NS_INTERFACE_MAP_END_THREADSAFE
 
 NS_IMPL_THREADSAFE_ADDREF(nsXPCException)
--- a/js/src/xpconnect/src/xpcjsid.cpp
+++ b/js/src/xpconnect/src/xpcjsid.cpp
@@ -281,21 +281,26 @@ NS_METHOD GetSharedScriptableHelperForJS
         *helper = nsnull;
     return NS_OK;
 }
 
 /******************************************************/
 
 static JSBool gClassObjectsWereInited = JS_FALSE;
 
+#define NULL_CID \
+{ 0x00000000, 0x0000, 0x0000, \
+  { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } }
+
 NS_DECL_CI_INTERFACE_GETTER(nsJSIID)
-NS_IMPL_CLASSINFO(nsJSIID, GetSharedScriptableHelperForJSIID, nsIClassInfo::THREADSAFE)
+NS_IMPL_CLASSINFO(nsJSIID, GetSharedScriptableHelperForJSIID,
+                  nsIClassInfo::THREADSAFE, NULL_CID)
 
 NS_DECL_CI_INTERFACE_GETTER(nsJSCID)
-NS_IMPL_CLASSINFO(nsJSCID, NULL, nsIClassInfo::THREADSAFE)
+NS_IMPL_CLASSINFO(nsJSCID, NULL, nsIClassInfo::THREADSAFE, NULL_CID)
 
 void xpc_InitJSxIDClassObjects()
 {
     if(!gClassObjectsWereInited) {
         gSharedScriptableHelperForJSIID = new SharedScriptableHelperForJSIID();
         NS_ADDREF(gSharedScriptableHelperForJSIID);
     }
     gClassObjectsWereInited = JS_TRUE;
--- a/js/src/xpconnect/src/xpcmodule.h
+++ b/js/src/xpconnect/src/xpcmodule.h
@@ -38,21 +38,16 @@
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "xpcprivate.h"
 #include "mozJSLoaderConstructors.h"
 
 /* Module implementation for the xpconnect library. */
 
-// {DC524540-487E-4501-9AC7-AAA784B17C1C}
-#define XPCVARIANT_CID                                                        \
-    {0xdc524540, 0x487e, 0x4501,                                              \
-      { 0x9a, 0xc7, 0xaa, 0xa7, 0x84, 0xb1, 0x7c, 0x1c } }
-
 #define XPCVARIANT_CONTRACTID "@mozilla.org/xpcvariant;1"
 #define XPC_JSCONTEXT_STACK_ITERATOR_CONTRACTID                               \
     "@mozilla.org/js/xpc/ContextStackIterator;1"
 
 // {FE4F7592-C1FC-4662-AC83-538841318803}
 #define SCRIPTABLE_INTERFACES_CID                                             \
     {0xfe4f7592, 0xc1fc, 0x4662,                                              \
       { 0xac, 0x83, 0x53, 0x88, 0x41, 0x31, 0x88, 0x3 } }
--- a/js/src/xpconnect/src/xpcprivate.h
+++ b/js/src/xpconnect/src/xpcprivate.h
@@ -4214,16 +4214,21 @@ extern char * xpc_CheckAccessList(const 
 /***************************************************************************/
 // in xpcvariant.cpp...
 
 // {1809FD50-91E8-11d5-90F9-0010A4E73D9A}
 #define XPCVARIANT_IID \
     {0x1809fd50, 0x91e8, 0x11d5, \
       { 0x90, 0xf9, 0x0, 0x10, 0xa4, 0xe7, 0x3d, 0x9a } }
 
+// {DC524540-487E-4501-9AC7-AAA784B17C1C}
+#define XPCVARIANT_CID                                                        \
+    {0xdc524540, 0x487e, 0x4501,                                              \
+      { 0x9a, 0xc7, 0xaa, 0xa7, 0x84, 0xb1, 0x7c, 0x1c } }
+
 class XPCVariant : public nsIVariant
 {
 public:
     NS_DECL_CYCLE_COLLECTING_ISUPPORTS
     NS_DECL_NSIVARIANT
     NS_DECL_CYCLE_COLLECTION_CLASS(XPCVariant)
 
     // If this class ever implements nsIWritableVariant, take special care with
--- a/js/src/xpconnect/src/xpcvariant.cpp
+++ b/js/src/xpconnect/src/xpcvariant.cpp
@@ -39,17 +39,17 @@
  * ***** END LICENSE BLOCK ***** */
 
 /* nsIVariant implementation for xpconnect. */
 
 #include "xpcprivate.h"
 
 NS_IMPL_CYCLE_COLLECTION_CLASS(XPCVariant)
 
-NS_IMPL_CLASSINFO(XPCVariant, NULL, 0)
+NS_IMPL_CLASSINFO(XPCVariant, NULL, 0, XPCVARIANT_CID)
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(XPCVariant)
   NS_INTERFACE_MAP_ENTRY(XPCVariant)
   NS_INTERFACE_MAP_ENTRY(nsIVariant)
   NS_INTERFACE_MAP_ENTRY(nsISupports)
   NS_IMPL_QUERY_CLASSINFO(XPCVariant)
 NS_INTERFACE_MAP_END
 NS_IMPL_CI_INTERFACE_GETTER2(XPCVariant, XPCVariant, nsIVariant)
 
--- a/netwerk/base/src/nsProtocolProxyService.cpp
+++ b/netwerk/base/src/nsProtocolProxyService.cpp
@@ -51,16 +51,17 @@
 #include "nsICancelable.h"
 #include "nsIDNSService.h"
 #include "nsIPrefService.h"
 #include "nsIPrefBranch2.h"
 #include "nsReadableUtils.h"
 #include "nsThreadUtils.h"
 #include "nsString.h"
 #include "nsNetUtil.h"
+#include "nsNetCID.h"
 #include "nsCRT.h"
 #include "prnetdb.h"
 #include "nsPACMan.h"
 
 //----------------------------------------------------------------------------
 
 #include "prlog.h"
 #if defined(PR_LOGGING)
@@ -286,17 +287,18 @@ proxy_GetBoolPref(nsIPrefBranch *aPrefBr
 
 //----------------------------------------------------------------------------
 
 static const PRInt32 PROXYCONFIG_DIRECT4X = 3;
 static const PRInt32 PROXYCONFIG_COUNT = 6;
 
 NS_IMPL_ADDREF(nsProtocolProxyService)
 NS_IMPL_RELEASE(nsProtocolProxyService)
-NS_IMPL_CLASSINFO(nsProtocolProxyService, NULL, nsIClassInfo::SINGLETON)
+NS_IMPL_CLASSINFO(nsProtocolProxyService, NULL, nsIClassInfo::SINGLETON,
+                  NS_PROTOCOLPROXYSERVICE_CID)
 NS_IMPL_QUERY_INTERFACE3_CI(nsProtocolProxyService,
                             nsIProtocolProxyService,
                             nsIProtocolProxyService2,
                             nsIObserver)
 NS_IMPL_CI_INTERFACE_GETTER2(nsProtocolProxyService,
                              nsIProtocolProxyService,
                              nsIProtocolProxyService2)
 
--- a/toolkit/components/commandlines/src/nsCommandLine.cpp
+++ b/toolkit/components/commandlines/src/nsCommandLine.cpp
@@ -70,16 +70,19 @@
 #elif defined(XP_OS2)
 #include <os2.h>
 #endif
 
 #ifdef DEBUG_bsmedberg
 #define DEBUG_COMMANDLINE
 #endif
 
+#define NS_COMMANDLINE_CID \
+  { 0x23bcc750, 0xdc20, 0x460b, { 0xb2, 0xd4, 0x74, 0xd8, 0xf5, 0x8d, 0x36, 0x15 } }
+
 class nsCommandLine : public nsICommandLineRunner
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSICOMMANDLINE
   NS_DECL_NSICOMMANDLINERUNNER
 
   nsCommandLine();
@@ -109,17 +112,17 @@ protected:
 nsCommandLine::nsCommandLine() :
   mState(STATE_INITIAL_LAUNCH),
   mPreventDefault(PR_FALSE)
 {
 
 }
 
 
-NS_IMPL_CLASSINFO(nsCommandLine, NULL, 0)
+NS_IMPL_CLASSINFO(nsCommandLine, NULL, 0, NS_COMMANDLINE_CID)
 NS_IMPL_ISUPPORTS2_CI(nsCommandLine,
                       nsICommandLine,
                       nsICommandLineRunner)
 
 NS_IMETHODIMP
 nsCommandLine::GetLength(PRInt32 *aResult)
 {
   *aResult = PRInt32(mArgs.Length());
@@ -705,19 +708,16 @@ nsCommandLine::GetHelpText(nsACString& a
 {
   EnumerateHandlers(EnumHelp, &aResult);
 
   return NS_OK;
 }
 
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsCommandLine)
 
-#define NS_COMMANDLINE_CID \
-  { 0x23bcc750, 0xdc20, 0x460b, { 0xb2, 0xd4, 0x74, 0xd8, 0xf5, 0x8d, 0x36, 0x15 } }
-
 NS_DEFINE_NAMED_CID(NS_COMMANDLINE_CID);
 
 static const mozilla::Module::CIDEntry kCommandLineCIDs[] = {
   { &kNS_COMMANDLINE_CID, false, NULL, nsCommandLineConstructor },
   { NULL }
 };
 
 static const mozilla::Module::ContractIDEntry kCommandLineContracts[] = {
--- a/toolkit/components/places/src/nsNavHistory.cpp
+++ b/toolkit/components/places/src/nsNavHistory.cpp
@@ -205,17 +205,18 @@ static const PRInt64 USECS_PER_DAY = LL_
 #endif
 #define TOPIC_IDLE_DAILY "idle-daily"
 #define TOPIC_PREF_CHANGED "nsPref:changed"
 #define TOPIC_GLOBAL_SHUTDOWN "profile-before-change"
 
 NS_IMPL_THREADSAFE_ADDREF(nsNavHistory)
 NS_IMPL_THREADSAFE_RELEASE(nsNavHistory)
 
-NS_IMPL_CLASSINFO(nsNavHistory, NULL, nsIClassInfo::SINGLETON)
+NS_IMPL_CLASSINFO(nsNavHistory, NULL, nsIClassInfo::SINGLETON,
+                  NS_NAVHISTORYSERVICE_CID)
 NS_INTERFACE_MAP_BEGIN(nsNavHistory)
   NS_INTERFACE_MAP_ENTRY(nsINavHistoryService)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsIGlobalHistory2, nsIGlobalHistory3)
   NS_INTERFACE_MAP_ENTRY(nsIGlobalHistory3)
   NS_INTERFACE_MAP_ENTRY(nsIDownloadHistory)
   NS_INTERFACE_MAP_ENTRY(nsIBrowserHistory)
   NS_INTERFACE_MAP_ENTRY(nsIObserver)
   NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
--- a/toolkit/mozapps/extensions/amInstallTrigger.cpp
+++ b/toolkit/mozapps/extensions/amInstallTrigger.cpp
@@ -76,17 +76,18 @@ CheckLoadURIFromScript(JSContext *aCx, c
   NS_ENSURE_SUCCESS(rv, rv);
 
   // are we allowed to load this one?
   rv = secman->CheckLoadURIWithPrincipal(principal, uri,
                   nsIScriptSecurityManager::DISALLOW_INHERIT_PRINCIPAL);
   return rv;
 }
 
-NS_IMPL_CLASSINFO(amInstallTrigger, NULL, nsIClassInfo::DOM_OBJECT)
+NS_IMPL_CLASSINFO(amInstallTrigger, NULL, nsIClassInfo::DOM_OBJECT,
+                  AM_InstallTrigger_CID)
 NS_IMPL_ISUPPORTS1_CI(amInstallTrigger, amIInstallTrigger)
 
 amInstallTrigger::amInstallTrigger()
 {
   mManager = do_GetService("@mozilla.org/addons/integration;1");
 }
 
 amInstallTrigger::~amInstallTrigger()
--- a/uriloader/exthandler/nsDBusHandlerApp.cpp
+++ b/uriloader/exthandler/nsDBusHandlerApp.cpp
@@ -37,28 +37,29 @@
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include  <dbus/dbus.h>
 #include "nsDBusHandlerApp.h"
 #include "nsIURI.h"
 #include "nsIClassInfoImpl.h"
 #include "nsCOMPtr.h"
+#include "nsCExternalHandlerService.h"
 
 #if (MOZ_PLATFORM_MAEMO == 5)
 #define APP_LAUNCH_BANNER_SERVICE           "com.nokia.hildon-desktop"
 #define APP_LAUNCH_BANNER_METHOD_INTERFACE  "com.nokia.hildon.hdwm.startupnotification"
 #define APP_LAUNCH_BANNER_METHOD_PATH       "/com/nokia/hildon/hdwm"
 #define APP_LAUNCH_BANNER_METHOD            "starting"
 #endif
 
 
 // XXX why does nsMIMEInfoImpl have a threadsafe nsISupports?  do we need one 
 // here too?
-NS_IMPL_CLASSINFO(nsDBusHandlerApp, NULL, 0)
+NS_IMPL_CLASSINFO(nsDBusHandlerApp, NULL, 0, NS_DBUSHANDLERAPP_CID)
 NS_IMPL_ISUPPORTS2_CI(nsDBusHandlerApp, nsIDBusHandlerApp, nsIHandlerApp)
 
 ////////////////////////////////////////////////////////////////////////////////
 //// nsIHandlerApp
 
 NS_IMETHODIMP nsDBusHandlerApp::GetName(nsAString& aName)
 {
   aName.Assign(mName);
--- a/xpcom/base/nsConsoleService.cpp
+++ b/xpcom/base/nsConsoleService.cpp
@@ -50,17 +50,17 @@
 #include "nsThreadUtils.h"
 
 #include "nsConsoleService.h"
 #include "nsConsoleMessage.h"
 #include "nsIClassInfoImpl.h"
 
 NS_IMPL_THREADSAFE_ADDREF(nsConsoleService)
 NS_IMPL_THREADSAFE_RELEASE(nsConsoleService)
-NS_IMPL_CLASSINFO(nsConsoleService, NULL, nsIClassInfo::THREADSAFE | nsIClassInfo::SINGLETON)
+NS_IMPL_CLASSINFO(nsConsoleService, NULL, nsIClassInfo::THREADSAFE | nsIClassInfo::SINGLETON, NS_CONSOLESERVICE_CID)
 NS_IMPL_QUERY_INTERFACE1_CI(nsConsoleService, nsIConsoleService)
 NS_IMPL_CI_INTERFACE_GETTER1(nsConsoleService, nsIConsoleService)
 
 nsConsoleService::nsConsoleService()
     : mMessages(nsnull), mCurrent(0), mFull(PR_FALSE), mListening(PR_FALSE), mLock(nsnull)
 {
     // XXX grab this from a pref!
     // hm, but worry about circularity, bc we want to be able to report
--- a/xpcom/glue/nsClassInfoImpl.cpp
+++ b/xpcom/glue/nsClassInfoImpl.cpp
@@ -65,10 +65,11 @@ GenericClassInfo::GetFlags(PRUint32* fla
 {
   *flags = mData->flags;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 GenericClassInfo::GetClassIDNoAlloc(nsCID* aClassIDNoAlloc)
 {
-  return NS_ERROR_NOT_IMPLEMENTED;
+  *aClassIDNoAlloc = mData->cid;
+  return NS_OK;
 }
--- a/xpcom/glue/nsIClassInfoImpl.h
+++ b/xpcom/glue/nsIClassInfoImpl.h
@@ -47,16 +47,17 @@ public:
     typedef NS_CALLBACK(GetInterfacesProc)(PRUint32* NS_OUTPARAM countp,
                                            nsIID*** NS_OUTPARAM array);
     typedef NS_CALLBACK(GetLanguageHelperProc)(PRUint32 language,
                                                nsISupports** helper);
 
     GetInterfacesProc getinterfaces;
     GetLanguageHelperProc getlanguagehelper;
     PRUint32 flags;
+    nsCID cid;
   };
 
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSICLASSINFO
 
   GenericClassInfo(const ClassInfoData* data)
     : mData(data)
   { }
@@ -66,24 +67,23 @@ private:
 };
 
 #define NS_CLASSINFO_NAME(_class) g##_class##_classInfoGlobal
 #define NS_CI_INTERFACE_GETTER_NAME(_class) _class##_GetInterfacesHelper
 #define NS_DECL_CI_INTERFACE_GETTER(_class)                                   \
   extern NS_IMETHODIMP NS_CI_INTERFACE_GETTER_NAME(_class)                    \
      (PRUint32 * NS_OUTPARAM, nsIID *** NS_OUTPARAM);
 
-#define NS_DECL_CLASSINFO(_class) foobarstopcompilinghere;
-
-#define NS_IMPL_CLASSINFO(_class, _getlanguagehelper, _flags)           \
+#define NS_IMPL_CLASSINFO(_class, _getlanguagehelper, _flags, _cid)     \
   NS_DECL_CI_INTERFACE_GETTER(_class)                                   \
   static const GenericClassInfo::ClassInfoData k##_class##ClassInfoData = { \
     NS_CI_INTERFACE_GETTER_NAME(_class),                                \
     _getlanguagehelper,                                                 \
-    _flags                                                              \
+    _flags,                                                             \
+    _cid,                                                               \
   };                                                                    \
   nsIClassInfo* NS_CLASSINFO_NAME(_class) = NULL;
 
 #define NS_IMPL_QUERY_CLASSINFO(_class)                                           \
   if ( aIID.Equals(NS_GET_IID(nsIClassInfo)) ) {                                  \
     if (!NS_CLASSINFO_NAME(_class))                                               \
       NS_CLASSINFO_NAME(_class) = new GenericClassInfo(&k##_class##ClassInfoData); \
     foundInterface = NS_CLASSINFO_NAME(_class);                                   \
--- a/xpcom/io/nsStringStream.cpp
+++ b/xpcom/io/nsStringStream.cpp
@@ -114,17 +114,18 @@ private:
     PRPackedBool   mOwned;
 };
 
 // This class needs to support threadsafe refcounting since people often
 // allocate a string stream, and then read it from a background thread.
 NS_IMPL_THREADSAFE_ADDREF(nsStringInputStream)
 NS_IMPL_THREADSAFE_RELEASE(nsStringInputStream)
 
-NS_IMPL_CLASSINFO(nsStringInputStream, NULL, nsIClassInfo::THREADSAFE)
+NS_IMPL_CLASSINFO(nsStringInputStream, NULL, nsIClassInfo::THREADSAFE,
+                  NS_STRINGINPUTSTREAM_CID)
 NS_IMPL_QUERY_INTERFACE4_CI(nsStringInputStream,
                             nsIStringInputStream,
                             nsIInputStream,
                             nsISupportsCString,
                             nsISeekableStream)
 NS_IMPL_CI_INTERFACE_GETTER4(nsStringInputStream,
                              nsIStringInputStream,
                              nsIInputStream,
--- a/xpcom/sample/nsSample.cpp
+++ b/xpcom/sample/nsSample.cpp
@@ -72,17 +72,17 @@ nsSampleImpl::~nsSampleImpl()
  * simple stuff, but you would have to create QueryInterface on your own.
  * nsSampleFactory.cpp is an example of this approach.
  * Notice that the second parameter to the macro is name of the interface, and
  * NOT the #defined IID.
  *
  * The _CI variant adds support for nsIClassInfo, which permits introspection
  * and interface flattening.
  */
-NS_IMPL_CLASSINFO(nsSampleImpl, NULL, 0)
+NS_IMPL_CLASSINFO(nsSampleImpl, NULL, 0, NS_SAMPLE_CID)
 NS_IMPL_ISUPPORTS1_CI(nsSampleImpl, nsISample)
 /**
  * Notice that in the protoype for this function, the NS_IMETHOD macro was
  * used to declare the return type.  For the implementation, the return
  * type is declared by NS_IMETHODIMP
  */
 NS_IMETHODIMP
 nsSampleImpl::GetValue(char** aValue)
--- a/xpcom/threads/nsThreadManager.cpp
+++ b/xpcom/threads/nsThreadManager.cpp
@@ -71,17 +71,19 @@ AppendAndRemoveThread(const void *key, n
 
 //-----------------------------------------------------------------------------
 
 nsThreadManager nsThreadManager::sInstance;
 
 // statically allocated instance
 NS_IMETHODIMP_(nsrefcnt) nsThreadManager::AddRef() { return 2; }
 NS_IMETHODIMP_(nsrefcnt) nsThreadManager::Release() { return 1; }
-NS_IMPL_CLASSINFO(nsThreadManager, NULL, nsIClassInfo::THREADSAFE | nsIClassInfo::SINGLETON)
+NS_IMPL_CLASSINFO(nsThreadManager, NULL,
+                  nsIClassInfo::THREADSAFE | nsIClassInfo::SINGLETON,
+                  NS_THREADMANAGER_CID)
 NS_IMPL_QUERY_INTERFACE1_CI(nsThreadManager, nsIThreadManager)
 NS_IMPL_CI_INTERFACE_GETTER1(nsThreadManager, nsIThreadManager)
 
 //-----------------------------------------------------------------------------
 
 nsresult
 nsThreadManager::Init()
 {
--- a/xpcom/threads/nsThreadPool.cpp
+++ b/xpcom/threads/nsThreadPool.cpp
@@ -59,17 +59,18 @@ static PRLogModuleInfo *sLog = PR_NewLog
 //     pending events and rescheduling itself as an idle thread.
 
 #define DEFAULT_THREAD_LIMIT 4
 #define DEFAULT_IDLE_THREAD_LIMIT 1
 #define DEFAULT_IDLE_THREAD_TIMEOUT PR_SecondsToInterval(60)
 
 NS_IMPL_THREADSAFE_ADDREF(nsThreadPool)
 NS_IMPL_THREADSAFE_RELEASE(nsThreadPool)
-NS_IMPL_CLASSINFO(nsThreadPool, NULL, nsIClassInfo::THREADSAFE)
+NS_IMPL_CLASSINFO(nsThreadPool, NULL, nsIClassInfo::THREADSAFE,
+                  NS_THREADPOOL_CID)
 NS_IMPL_QUERY_INTERFACE3_CI(nsThreadPool, nsIThreadPool, nsIEventTarget,
                             nsIRunnable)
 NS_IMPL_CI_INTERFACE_GETTER2(nsThreadPool, nsIThreadPool, nsIEventTarget)
 
 nsThreadPool::nsThreadPool()
   : mThreadLimit(DEFAULT_THREAD_LIMIT)
   , mIdleThreadLimit(DEFAULT_IDLE_THREAD_LIMIT)
   , mIdleThreadTimeout(DEFAULT_IDLE_THREAD_TIMEOUT)