Address review comments from bug 568691 comment 13/14/17:
authorBenjamin Smedberg <benjamin@smedbergs.us>
Mon, 21 Jun 2010 12:46:26 -0400
changeset 47009 34a044089fae65c9c51d83bfbb058bf12a792e46
parent 47008 79ae7224e6273199d0db9638043e531942bc10fd
child 47010 de2fe50057e7e16ba29b297ea4de4c8304f5b0a0
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [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
Address review comments from bug 568691 comment 13/14/17: * rename mozilla::Module struct entries to be clearer * change Module documentation so that the last entry is { NULL } in all cases (the compiler will 0-expand the structure) * remove NS_XPCOM_COMPONENT_REGISTRY_FILE * add MOZ_MEDIA/MOZ_OGG/MOZ_WAVE/MOZ_WEBM ifdefs to nsHTMLMediaElement.h and nsContentUtils.cpp
content/base/src/nsContentUtils.cpp
content/html/content/public/nsHTMLMediaElement.h
js/src/xpconnect/loader/mozJSComponentLoader.h
toolkit/xre/nsAppRunner.cpp
toolkit/xre/nsXREDirProvider.cpp
xpcom/build/nsXPComInit.cpp
xpcom/components/GenericFactory.h
xpcom/components/Module.h
xpcom/components/nsComponentManager.cpp
xpcom/components/nsComponentManager.h
xpcom/io/nsDirectoryService.cpp
xpcom/io/nsDirectoryServiceAtomList.h
xpcom/io/nsDirectoryServiceDefs.h
--- a/content/base/src/nsContentUtils.cpp
+++ b/content/base/src/nsContentUtils.cpp
@@ -6091,28 +6091,47 @@ nsIContentUtils::FindInternalContentView
   if (NS_SUCCEEDED(rv)) {
     docFactory = do_GetService(contractID);
     if (docFactory && aLoaderType) {
       *aLoaderType = contractID.EqualsLiteral(CONTENT_DLF_CONTRACTID) ? TYPE_CONTENT : TYPE_UNKNOWN;
     }   
     return docFactory.forget();
   }
 
+#ifdef MOZ_MEDIA
+#ifdef MOZ_OGG
   if (nsHTMLMediaElement::IsOggEnabled()) {
     for (int i = 0; i < NS_ARRAY_LENGTH(nsHTMLMediaElement::gOggTypes); ++i) {
       const char* type = nsHTMLMediaElement::gOggTypes[i];
       if (!strcmp(aType, type)) {
         docFactory = do_GetService("@mozilla.org/content/document-loader-factory;1");
         if (docFactory && aLoaderType) {
           *aLoaderType = TYPE_CONTENT;
         }
         return docFactory.forget();
       }
     }
   }
+#endif
+
+#ifdef MOZ_WEBM
+  if (nsHTMLMediaElement::IsWebMEnabled()) {
+    for (int i = 0; i < NS_ARRAY_LENGTH(nsHTMLMediaElement::gWebMTypes); ++i) {
+      const char* type = nsHTMLMediaElement::gWebMTypes[i];
+      if (!strcmp(aType, type)) {
+        docFactory = do_GetService("@mozilla.org/content/document-loader-factory;1");
+        if (docFactory && aLoaderType) {
+          *aLoaderType = TYPE_CONTENT;
+        }
+        return docFactory.forget();
+      }
+    }
+  }
+#endif
+#endif // MOZ_MEDIA
 
   if (AVAILABLE == pluginEnabled) {
     docFactory = do_GetService(PLUGIN_DLF_CONTRACTID);
     if (docFactory && aLoaderType) {
       *aLoaderType = TYPE_PLUGIN;
     }
     return docFactory.forget();
   }
--- a/content/html/content/public/nsHTMLMediaElement.h
+++ b/content/html/content/public/nsHTMLMediaElement.h
@@ -245,30 +245,36 @@ public:
   static CanPlayStatus GetCanPlay(const nsAString& aType);
 
   // Returns true if we should handle this MIME type when it appears
   // as an <object> or as a toplevel page. If, in practice, our support
   // for the type is more limited than appears in the wild, we should return
   // false here even if CanHandleMediaType would return true.
   static PRBool ShouldHandleMediaType(const char* aMIMEType);
 
+#ifdef MOZ_OGG
   static bool IsOggEnabled();
   static bool IsOggType(const nsACString& aType);
   static const char gOggTypes[3][16];
   static char const *const gOggCodecs[3];
+#endif
 
+#ifdef MOZ_WAVE
   static bool IsWaveEnabled();
   static bool IsWaveType(const nsACString& aType);
   static const char gWaveTypes[4][16];
   static char const *const gWaveCodecs[2];
+#endif
 
+#ifdef MOZ_WEBM
   static bool IsWebMEnabled();
   static bool IsWebMType(const nsACString& aType);
   static const char gWebMTypes[2][17];
   static char const *const gWebMCodecs[4];
+#endif
 
   /**
    * Called when a child source element is added to this media element. This
    * may queue a load() task if appropriate.
    */
   void NotifyAddedSource();
 
   /**
--- a/js/src/xpconnect/loader/mozJSComponentLoader.h
+++ b/js/src/xpconnect/loader/mozJSComponentLoader.h
@@ -153,19 +153,19 @@ class mozJSComponentLoader : public mozi
     class ModuleEntry : public mozilla::Module
     {
     public:
         ModuleEntry() : mozilla::Module() {
             mVersion = mozilla::Module::kVersion;
             mCIDs = NULL;
             mContractIDs = NULL;
             mCategoryEntries = NULL;
-            getfactory = GetFactory;
-            loaded = NULL;
-            unloaded = NULL;
+            getFactoryProc = GetFactory;
+            loadProc = NULL;
+            unloadProc = NULL;
 
             global = nsnull;
             location = nsnull;
         }
 
         ~ModuleEntry() {
             Clear();
         }
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -2435,19 +2435,16 @@ WriteVersion(nsIFile* aProfileDir, const
 static void RemoveComponentRegistries(nsIFile* aProfileDir, nsIFile* aLocalProfileDir,
                                       PRBool aRemoveEMFiles)
 {
   nsCOMPtr<nsIFile> file;
   aProfileDir->Clone(getter_AddRefs(file));
   if (!file)
     return;
 
-  file->AppendNative(NS_LITERAL_CSTRING("compreg.dat"));
-  file->Remove(PR_FALSE);
-
   if (aRemoveEMFiles) {
     file->SetNativeLeafName(NS_LITERAL_CSTRING("extensions.ini"));
     file->Remove(PR_FALSE);
   }
 
   aLocalProfileDir->Clone(getter_AddRefs(file));
   if (!file)
     return;
@@ -3271,41 +3268,41 @@ XRE_main(int argc, char* argv[], const n
     // fastload caches, like an extension upgrade or installation.
     PRBool cachesOK;
     PRBool versionOK = CheckCompatibility(profD, version, osABI, 
                                           dirProvider.GetGREDir(),
                                           gAppData->directory, &cachesOK);
 
     // Every time a profile is loaded by a build with a different version,
     // it updates the compatibility.ini file saying what version last wrote
-    // the compreg.dat.  On subsequent launches if the version matches, 
+    // the fastload caches.  On subsequent launches if the version matches, 
     // there is no need for re-registration.  If the user loads the same
     // profile in different builds the component registry must be
     // re-generated to prevent mysterious component loading failures.
     //
     if (gSafeMode) {
       RemoveComponentRegistries(profD, profLD, PR_FALSE);
       WriteVersion(profD, NS_LITERAL_CSTRING("Safe Mode"), osABI,
                    dirProvider.GetGREDir(), gAppData->directory);
     }
     else if (versionOK) {
       if (!cachesOK) {
-        // Remove compreg.dat, forcing component re-registration.
+        // Remove caches, forcing component re-registration.
         // The new list of additional components directories is derived from
         // information in "extensions.ini".
         RemoveComponentRegistries(profD, profLD, PR_FALSE);
         
         // Rewrite compatibility.ini to remove the flag
         WriteVersion(profD, version, osABI,
                      dirProvider.GetGREDir(), gAppData->directory);
       }
       // Nothing need be done for the normal startup case.
     }
     else {
-      // Remove compreg.dat, forcing component re-registration
+      // Remove caches, forcing component re-registration
       // with the default set of components (this disables any potentially
       // troublesome incompatible XPCOM components). 
       RemoveComponentRegistries(profD, profLD, PR_TRUE);
 
       // Tell the Extension Manager it should check for incompatible 
       // Extensions and re-write the "extensions.ini" file with a list of 
       // directories for compatible extensions
       upgraded = PR_TRUE;
--- a/toolkit/xre/nsXREDirProvider.cpp
+++ b/toolkit/xre/nsXREDirProvider.cpp
@@ -329,20 +329,17 @@ nsXREDirProvider::GetFile(const char* aP
   }
 #endif
   else if (!strcmp(aProperty, XRE_USER_SYS_EXTENSION_DIR)) {
     return GetSysUserExtensionsDirectory((nsILocalFile**)(nsIFile**) aFile);
   }
   else if (NS_SUCCEEDED(GetProfileStartupDir(getter_AddRefs(file)))) {
     // We need to allow component, xpt, and chrome registration to
     // occur prior to the profile-after-change notification.
-    if (!strcmp(aProperty, NS_XPCOM_COMPONENT_REGISTRY_FILE)) {
-      rv = file->AppendNative(NS_LITERAL_CSTRING("compreg.dat"));
-    }
-    else if (!strcmp(aProperty, NS_APP_USER_CHROME_DIR)) {
+    if (!strcmp(aProperty, NS_APP_USER_CHROME_DIR)) {
       rv = file->AppendNative(NS_LITERAL_CSTRING("chrome"));
     }
   }
 
   if (NS_SUCCEEDED(rv) && file) {
     NS_ADDREF(*aFile = file);
     return NS_OK;
   }
--- a/xpcom/build/nsXPComInit.cpp
+++ b/xpcom/build/nsXPComInit.cpp
@@ -503,18 +503,17 @@ NS_InitXPCOM2(nsIServiceManager* *result
     NS_TIME_FUNCTION_MARK("Next: cycle collector startup");
 
     rv = nsCycleCollector_startup();
     if (NS_FAILED(rv)) return rv;
 
     NS_TIME_FUNCTION_MARK("Next: interface info manager init");
 
     // The iimanager constructor searches and registers XPT files.
-    nsIInterfaceInfoManager* iim =
-        xptiInterfaceInfoManager::GetSingleton();
+    xptiInterfaceInfoManager::GetSingleton();
 
     NS_TIME_FUNCTION_MARK("Next: register category providers");
 
     // After autoreg, but before we actually instantiate any components,
     // add any services listed in the "xpcom-directory-providers" category
     // to the directory service.
     nsDirectoryService::gService->RegisterCategoryProviders();
 
--- a/xpcom/components/GenericFactory.h
+++ b/xpcom/components/GenericFactory.h
@@ -44,26 +44,26 @@ namespace mozilla {
 
 /**
  * A generic factory which uses a constructor function to create instances.
  * This class is intended solely for internal use by the component manager.
  */
 class GenericFactory : public nsIFactory
 {
 public:
-  typedef Module::ConstructorProc ConstructorProc;
+  typedef Module::ConstructorProcPtr ConstructorProcPtr;
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSIFACTORY
 
-  GenericFactory(ConstructorProc ctor)
+  GenericFactory(ConstructorProcPtr ctor)
     : mCtor(ctor)
   {
     NS_ASSERTION(mCtor, "GenericFactory with no constructor");
   }
 
 private:
-  ConstructorProc mCtor;
+  ConstructorProcPtr mCtor;
 };
 
 } // namespace mozilla
 
 #endif // mozilla_GenericFactory_h
--- a/xpcom/components/Module.h
+++ b/xpcom/components/Module.h
@@ -52,36 +52,36 @@ namespace mozilla {
  * via a module loader.
  */
 struct Module
 {
   static const int kVersion = 1;
 
   struct CIDEntry;
 
-  typedef already_AddRefed<nsIFactory> (*GetFactoryProc)
+  typedef already_AddRefed<nsIFactory> (*GetFactoryProcPtr)
     (const Module& module, const CIDEntry& entry);
 
-  typedef nsresult (*ConstructorProc)(nsISupports* aOuter,
-                                      const nsIID& aIID,
-                                      void** aResult);
+  typedef nsresult (*ConstructorProcPtr)(nsISupports* aOuter,
+                                         const nsIID& aIID,
+                                         void** aResult);
 
-  typedef nsresult (*LoadedFunc)();
-  typedef void (*UnloadedFunc)();
+  typedef nsresult (*LoadFuncPtr)();
+  typedef void (*UnloadFuncPtr)();
 
   /**
    * The constructor callback is an implementation detail of the default binary
    * loader and may be null.
    */
   struct CIDEntry
   {
     const nsCID* cid;
     bool service;
-    GetFactoryProc getfactory;
-    ConstructorProc constructor;
+    GetFactoryProcPtr getFactoryProc;
+    ConstructorProcPtr constructorProc;
   };
 
   struct ContractIDEntry
   {
     const char* contractid;
     nsID const * cid;
   };
 
@@ -94,48 +94,48 @@ struct Module
 
   /**
    * Binary compatibility check, should be kModuleVersion.
    */
   unsigned int mVersion;
 
   /**
    * An array of CIDs (class IDs) implemented by this module. The final entry
-   * should be { NULL, false }
+   * should be { NULL }.
    */
   const CIDEntry* mCIDs;
 
   /**
    * An array of mappings from contractid to CID. The final entry should
-   * be { NULL, NULL }
+   * be { NULL }.
    */
   const ContractIDEntry* mContractIDs;
 
   /**
    * An array of category manager entries. The final entry should be
-   * { NULL, NULL, NULL }
+   * { NULL }.
    */
   const CategoryEntry* mCategoryEntries;
 
   /**
    * When the component manager tries to get the factory for a CID, it first
    * checks for this module-level getfactory callback. If this function is
    * not implemented, it checks the CIDEntry getfactory callback. If that is
    * also NULL, a generic factory is generated using the CIDEntry constructor
    * callback which must be non-NULL.
    */
-  GetFactoryProc getfactory;
+  GetFactoryProcPtr getFactoryProc;
 
   /**
    * Optional Function which are called when this module is loaded and
    * at shutdown. These are not C++ constructor/destructors to avoid
    * calling them too early in startup or too late in shutdown.
    */
-  LoadedFunc loaded;
-  UnloadedFunc unloaded;
+  LoadFuncPtr loadProc;
+  UnloadFuncPtr unloadProc;
 };
 
 } // namespace
 
 #if defined(XPCOM_TRANSLATE_NSGM_ENTRY_POINT)
 #  define NSMODULE_NAME(_name) _name##_NSModule
 #  define NSMODULE_DECL(_name) extern mozilla::Module const *const NSMODULE_NAME(_name)
 #  define NSMODULE_DEFN(_name) NSMODULE_DECL(_name)
--- a/xpcom/components/nsComponentManager.cpp
+++ b/xpcom/components/nsComponentManager.cpp
@@ -163,26 +163,16 @@ static const char gIDFormat[] =
     {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} \
 }
 
 NS_DEFINE_CID(kEmptyCID, NS_EMPTY_IID);
 NS_DEFINE_CID(kCategoryManagerCID, NS_CATEGORYMANAGER_CID);
 
 #define UID_STRING_LENGTH 39
 
-static void GetIDString(const nsID& aCID, char buf[UID_STRING_LENGTH])
-{
-    PR_snprintf(buf, UID_STRING_LENGTH, gIDFormat,
-                aCID.m0, (PRUint32) aCID.m1, (PRUint32) aCID.m2,
-                (PRUint32) aCID.m3[0], (PRUint32) aCID.m3[1],
-                (PRUint32) aCID.m3[2], (PRUint32) aCID.m3[3],
-                (PRUint32) aCID.m3[4], (PRUint32) aCID.m3[5],
-                (PRUint32) aCID.m3[6], (PRUint32) aCID.m3[7]);
-}
-
 #ifdef NS_FUNCTION_TIMER
 #define COMPMGR_TIME_FUNCTION_CID(cid)                                          \
   char cid_buf__[NSID_LENGTH] = { '\0' };                                      \
   cid.ToProvidedString(cid_buf__);                                             \
   NS_TIME_FUNCTION_MIN_FMT(5, "%s (line %d) (cid: %s)", MOZ_FUNCTION_NAME, \
                            __LINE__, cid_buf__)
 #define COMPMGR_TIME_FUNCTION_CONTRACTID(cid)                                  \
   NS_TIME_FUNCTION_MIN_FMT(5, "%s (line %d) (contractid: %s)", MOZ_FUNCTION_NAME, \
@@ -742,18 +732,18 @@ nsComponentManagerImpl::KnownModule::Loa
             return false;
         mModule = mLoader->LoadModule(mFile);
         if (!mModule) {
             mFailed = true;
             return false;
         }
     }
     if (!mLoaded) {
-        if (mModule->loaded) {
-            nsresult rv = mModule->loaded();
+        if (mModule->loadProc) {
+            nsresult rv = mModule->loadProc();
             if (NS_FAILED(rv)) {
                 mFailed = true;
                 return rv;
             }
         }
         mLoaded = true;
     }
     return true;
@@ -1486,27 +1476,36 @@ nsComponentManagerImpl::RegisterFactory(
     mContractIDs.Put(nsDependentCString(aContractID), f);
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsComponentManagerImpl::UnregisterFactory(const nsCID& aClass,
                                           nsIFactory* aFactory)
 {
-    nsAutoMonitor mon(mMon);
-    nsFactoryEntry* f = mFactories.Get(aClass);
-    if (!f || f->mFactory != aFactory)
-        return NS_ERROR_FACTORY_NOT_REGISTERED;
+    // Don't release the dying factory or service object until releasing
+    // the component manager monitor.
+    nsCOMPtr<nsIFactory> dyingFactory;
+    nsCOMPtr<nsISupports> dyingServiceObject;
 
-    mFactories.Remove(aClass);
+    {
+        nsAutoMonitor mon(mMon);
+        nsFactoryEntry* f = mFactories.Get(aClass);
+        if (!f || f->mFactory != aFactory)
+            return NS_ERROR_FACTORY_NOT_REGISTERED;
+
+        mFactories.Remove(aClass);
 
-    // This might leave a stale contractid -> factory mapping in place, so null
-    // out the factory entry (see nsFactoryEntry::GetFactory)
-    f->mFactory = NULL;
-    
+        // This might leave a stale contractid -> factory mapping in
+        // place, so null out the factory entry (see
+        // nsFactoryEntry::GetFactory)
+        f->mFactory.swap(dyingFactory);
+        f->mServiceObject.swap(dyingServiceObject);
+    }
+
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsComponentManagerImpl::IsCIDRegistered(const nsCID & aClass,
                                         PRBool *_retval)
 {
     *_retval = (nsnull != GetFactoryEntry(aClass));
@@ -1624,26 +1623,26 @@ nsFactoryEntry::GetFactory()
         // RegisterFactory then UnregisterFactory can leave an entry in mContractIDs
         // pointing to an unusable nsFactoryEntry.
         if (!mModule)
             return NULL;
 
         if (!mModule->Load())
             return NULL;
 
-        if (mModule->Module()->getfactory) {
-            mFactory = mModule->Module()->getfactory(*mModule->Module(),
-                                                    *mCIDEntry);
+        if (mModule->Module()->getFactoryProc) {
+            mFactory = mModule->Module()->getFactoryProc(*mModule->Module(),
+                                                         *mCIDEntry);
         }
-        else if (mCIDEntry->getfactory) {
-            mFactory = mCIDEntry->getfactory(*mModule->Module(), *mCIDEntry);
+        else if (mCIDEntry->getFactoryProc) {
+            mFactory = mCIDEntry->getFactoryProc(*mModule->Module(), *mCIDEntry);
         }
         else {
-            NS_ASSERTION(mCIDEntry->constructor, "no getfactory or constructor");
-            mFactory = new mozilla::GenericFactory(mCIDEntry->constructor);
+            NS_ASSERTION(mCIDEntry->constructorProc, "no getfactory or constructor");
+            mFactory = new mozilla::GenericFactory(mCIDEntry->constructorProc);
         }
         if (!mFactory)
             return NULL;
     }
     NS_ADDREF(mFactory);
     return mFactory.get();
 }
 
--- a/xpcom/components/nsComponentManager.h
+++ b/xpcom/components/nsComponentManager.h
@@ -189,18 +189,18 @@ public:
             , mFile(aFile)
             , mLoader(NULL)
             , mLoaded(false)
             , mFailed(false)
         { }
 
         ~KnownModule()
         {
-            if (mLoaded && mModule->unloaded)
-                mModule->unloaded();
+            if (mLoaded && mModule->unloadProc)
+                mModule->unloadProc();
         }
 
         bool EnsureLoader();
         bool Load();
 
         const mozilla::Module* Module() const
         {
             return mModule;
--- a/xpcom/io/nsDirectoryService.cpp
+++ b/xpcom/io/nsDirectoryService.cpp
@@ -76,17 +76,16 @@
 #include <OS.h>
 #include <image.h>
 #include "prenv.h"
 #endif
 
 #include "SpecialSystemDirectory.h"
 #include "nsAppFileLocationProvider.h"
 
-#define COMPONENT_REGISTRY_NAME NS_LITERAL_CSTRING("compreg.dat")
 #define COMPONENT_DIRECTORY     NS_LITERAL_CSTRING("components")
 
 // define home directory
 // For Windows platform, We are choosing Appdata folder as HOME
 #if defined (XP_WIN)
 #define HOME_DIR NS_WIN_APPDATA_DIR
 #elif defined (XP_MACOSX)
 #define HOME_DIR NS_OSX_HOME_DIR
@@ -617,25 +616,16 @@ nsDirectoryService::GetFile(const char *
 
     // check to see if it is one of our defaults
         
     if (inAtom == nsDirectoryService::sCurrentProcess || 
         inAtom == nsDirectoryService::sOS_CurrentProcessDirectory )
     {
         rv = GetCurrentProcessDirectory(getter_AddRefs(localFile));
     }
-    else if (inAtom == nsDirectoryService::sComponentRegistry)
-    {
-        rv = GetCurrentProcessDirectory(getter_AddRefs(localFile));
-        if (!localFile)
-            return NS_ERROR_FAILURE;
-
-        localFile->AppendNative(COMPONENT_DIRECTORY);           
-        localFile->AppendNative(COMPONENT_REGISTRY_NAME);           
-    }
     
     // Unless otherwise set, the core pieces of the GRE exist
     // in the current process directory.
     else if (inAtom == nsDirectoryService::sGRE_Directory)
     {
         rv = GetCurrentProcessDirectory(getter_AddRefs(localFile));
     }
     else if (inAtom == nsDirectoryService::sOS_DriveDirectory)
--- a/xpcom/io/nsDirectoryServiceAtomList.h
+++ b/xpcom/io/nsDirectoryServiceAtomList.h
@@ -32,17 +32,16 @@
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 DIR_ATOM(sCurrentProcess, NS_XPCOM_CURRENT_PROCESS_DIR)
-DIR_ATOM(sComponentRegistry, NS_XPCOM_COMPONENT_REGISTRY_FILE)
 DIR_ATOM(sGRE_Directory, NS_GRE_DIR)
 DIR_ATOM(sOS_DriveDirectory, NS_OS_DRIVE_DIR)
 DIR_ATOM(sOS_TemporaryDirectory, NS_OS_TEMP_DIR)
 DIR_ATOM(sOS_CurrentProcessDirectory, NS_OS_CURRENT_PROCESS_DIR)
 DIR_ATOM(sOS_CurrentWorkingDirectory, NS_OS_CURRENT_WORKING_DIR)
 DIR_ATOM(sOS_HomeDirectory, NS_OS_HOME_DIR)
 DIR_ATOM(sOS_DesktopDirectory, NS_OS_DESKTOP_DIR)
 DIR_ATOM(sInitCurrentProcess_dummy, NS_XPCOM_INIT_CURRENT_PROCESS_DIR)
--- a/xpcom/io/nsDirectoryServiceDefs.h
+++ b/xpcom/io/nsDirectoryServiceDefs.h
@@ -69,21 +69,16 @@
 #define NS_OS_CURRENT_PROCESS_DIR               "CurProcD"
                                                                                                                        
 /* This location is similar to NS_OS_CURRENT_PROCESS_DIR, however, 
  * NS_XPCOM_CURRENT_PROCESS_DIR can be overriden by passing a "bin
  * directory" to NS_InitXPCOM2(). 
  */
 #define NS_XPCOM_CURRENT_PROCESS_DIR            "XCurProcD"
 
-/* Property will return the location of the application components
- * registry file.
- */
-#define NS_XPCOM_COMPONENT_REGISTRY_FILE        "ComRegF"
-
 /* Property will return the location of the the XPCOM Shared Library.
  */
 #define NS_XPCOM_LIBRARY_FILE                   "XpcomLib"
 
 /* Property will return the current location of the the GRE directory.  
  * If no GRE is used, this propery will behave like 
  * NS_XPCOM_CURRENT_PROCESS_DIR.
  */