Back out changeset 1b201503737b (Bug 883729) for landing on wrong branch
authorChris Peterson <cpeterson@mozilla.com>
Mon, 17 Jun 2013 22:43:59 -0700
changeset 146815 3dca4337889fc66f4d48af8092e4e1c61b425823
parent 146814 1b201503737b0c97302cd8a04cd1022c8012945e
child 146816 4e5983de6e3b832f20829887b70278d35d1d01c8
push id2697
push userbbajaj@mozilla.com
push dateMon, 05 Aug 2013 18:49:53 +0000
treeherdermozilla-beta@dfec938c7b63 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs883729
milestone24.0a1
backs out1b201503737b0c97302cd8a04cd1022c8012945e
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
Back out changeset 1b201503737b (Bug 883729) for landing on wrong branch
xpcom/build/FileLocation.cpp
xpcom/components/nsComponentManager.cpp
xpcom/glue/nsInterfaceHashtable.h
--- a/xpcom/build/FileLocation.cpp
+++ b/xpcom/build/FileLocation.cpp
@@ -68,17 +68,17 @@ FileLocation::GetURIString(nsACString &r
 
 already_AddRefed<nsIFile>
 FileLocation::GetBaseFile()
 {
   if (IsZip() && mBaseZip) {
     nsRefPtr<nsZipHandle> handler = mBaseZip->GetFD();
     if (handler)
       return handler->mFile.GetBaseFile();
-    return nullptr;
+    return NULL;
   }
 
   nsCOMPtr<nsIFile> file = mBaseFile;
   return file.forget();
 }
 
 bool
 FileLocation::Equals(const FileLocation &file) const
--- a/xpcom/components/nsComponentManager.cpp
+++ b/xpcom/components/nsComponentManager.cpp
@@ -242,35 +242,35 @@ static already_AddRefed<nsIFile>
 GetLocationFromDirectoryService(const char* prop)
 {
     nsCOMPtr<nsIProperties> directoryService;
     nsDirectoryService::Create(nullptr,
                                NS_GET_IID(nsIProperties),
                                getter_AddRefs(directoryService));
 
     if (!directoryService)
-        return nullptr;
+        return NULL;
 
     nsCOMPtr<nsIFile> file;
     nsresult rv = directoryService->Get(prop,
                                         NS_GET_IID(nsIFile),
                                         getter_AddRefs(file));
     if (NS_FAILED(rv))
-        return nullptr;
+        return NULL;
 
     return file.forget();
 }
 
 static already_AddRefed<nsIFile>
 CloneAndAppend(nsIFile* aBase, const nsACString& append)
 {
     nsCOMPtr<nsIFile> f;
     aBase->Clone(getter_AddRefs(f));
     if (!f)
-        return nullptr;
+        return NULL;
 
     f->AppendNative(append);
     return f.forget();
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsComponentManagerImpl
 ////////////////////////////////////////////////////////////////////////////////
@@ -381,20 +381,20 @@ nsresult nsComponentManagerImpl::Init()
            ("nsComponentManager: Initialized."));
 
     nsresult rv = mNativeModuleLoader.Init();
     if (NS_FAILED(rv))
         return rv;
 
     nsCategoryManager::GetSingleton()->SuppressNotifications(true);
 
-    RegisterModule(&kXPCOMModule, nullptr);
+    RegisterModule(&kXPCOMModule, NULL);
 
     for (uint32_t i = 0; i < sStaticModules->Length(); ++i)
-        RegisterModule((*sStaticModules)[i], nullptr);
+        RegisterModule((*sStaticModules)[i], NULL);
 
     nsRefPtr<nsZipArchive> appOmnijar = mozilla::Omnijar::GetReader(mozilla::Omnijar::APP);
     if (appOmnijar) {
         cl = sModuleLocations->InsertElementAt(1); // Insert after greDir
         cl->type = NS_COMPONENT_LOCATION;
         cl->location.Init(appOmnijar, "chrome.manifest");
     }
     nsRefPtr<nsZipArchive> greOmnijar = mozilla::Omnijar::GetReader(mozilla::Omnijar::GRE);
@@ -863,28 +863,28 @@ nsComponentManagerImpl::GetFactoryEntry(
     return mFactories.Get(aClass);
 }
 
 already_AddRefed<nsIFactory>
 nsComponentManagerImpl::FindFactory(const nsCID& aClass)
 {
     nsFactoryEntry* e = GetFactoryEntry(aClass);
     if (!e)
-        return nullptr;
+        return NULL;
 
     return e->GetFactory();
 }
 
 already_AddRefed<nsIFactory>
 nsComponentManagerImpl::FindFactory(const char *contractID,
                                     uint32_t aContractIDLen)
 {
     nsFactoryEntry *entry = GetFactoryEntry(contractID, aContractIDLen);
     if (!entry)
-        return nullptr;
+        return NULL;
 
     return entry->GetFactory();
 }
 
 /**
  * GetClassObject()
  *
  * Given a classID, this finds the singleton ClassObject that implements the CID.
@@ -1108,30 +1108,30 @@ nsComponentManagerImpl::CreateInstanceBy
     return rv;
 }
 
 static PLDHashOperator
 FreeFactoryEntries(const nsID& aCID,
                    nsFactoryEntry* aEntry,
                    void* arg)
 {
-    aEntry->mFactory = nullptr;
-    aEntry->mServiceObject = nullptr;
+    aEntry->mFactory = NULL;
+    aEntry->mServiceObject = NULL;
     return PL_DHASH_NEXT;
 }
 
 nsresult
 nsComponentManagerImpl::FreeServices()
 {
     NS_ASSERTION(gXPCOMShuttingDown, "Must be shutting down in order to free all services");
 
     if (!gXPCOMShuttingDown)
         return NS_ERROR_FAILURE;
 
-    mFactories.EnumerateRead(FreeFactoryEntries, nullptr);
+    mFactories.EnumerateRead(FreeFactoryEntries, NULL);
     return NS_OK;
 }
 
 // This should only ever be called within the monitor!
 nsComponentManagerImpl::PendingServiceInfo*
 nsComponentManagerImpl::AddPendingService(const nsCID& aServiceCID,
                                           PRThread* aThread)
 {
@@ -1479,17 +1479,17 @@ nsComponentManagerImpl::GetServiceByCont
 already_AddRefed<mozilla::ModuleLoader>
 nsComponentManagerImpl::LoaderForExtension(const nsACString& aExt)
 {
     nsCOMPtr<mozilla::ModuleLoader> loader = mLoaderMap.Get(aExt);
     if (!loader) {
         loader = do_GetServiceFromCategory("module-loader",
                                            PromiseFlatCString(aExt).get());
         if (!loader)
-            return nullptr;
+            return NULL;
 
         mLoaderMap.Put(aExt, loader);
     }
 
     return loader.forget();
 }
 
 NS_IMETHODIMP
@@ -1668,17 +1668,17 @@ nsComponentManagerImpl::ContractIDToCID(
         SafeMutexAutoLock lock(mLock);
         nsFactoryEntry* entry = mContractIDs.Get(nsDependentCString(aContractID));
         if (entry) {
             *_retval = (nsCID*) NS_Alloc(sizeof(nsCID));
             **_retval = *entry->mCIDEntry->cid;
             return NS_OK;
         }
     }
-    *_retval = nullptr;
+    *_retval = NULL;
     return NS_ERROR_FACTORY_NOT_REGISTERED;
 }
 
 static size_t
 SizeOfFactoriesEntryExcludingThis(nsIDHashKey::KeyType aKey,
                                   nsFactoryEntry* const &aData,
                                   nsMallocSizeOfFun aMallocSizeOf,
                                   void* aUserArg)
@@ -1735,26 +1735,26 @@ nsComponentManagerImpl::SizeOfIncludingT
 nsFactoryEntry::nsFactoryEntry(const mozilla::Module::CIDEntry* entry,
                                nsComponentManagerImpl::KnownModule* module)
     : mCIDEntry(entry)
     , mModule(module)
 {
 }
 
 nsFactoryEntry::nsFactoryEntry(const nsCID& aCID, nsIFactory* factory)
-    : mCIDEntry(nullptr)
-    , mModule(nullptr)
+    : mCIDEntry(NULL)
+    , mModule(NULL)
     , mFactory(factory)
 {
     mozilla::Module::CIDEntry* e = new mozilla::Module::CIDEntry();
     nsCID* cid = new nsCID;
     *cid = aCID;
     e->cid = cid;
     mCIDEntry = e;
-}
+}        
 
 nsFactoryEntry::~nsFactoryEntry()
 {
     // If this was a RegisterFactory entry, we own the CIDEntry/CID
     if (!mModule) {
         delete mCIDEntry->cid;
         delete mCIDEntry;
     }
@@ -1764,37 +1764,37 @@ already_AddRefed<nsIFactory>
 nsFactoryEntry::GetFactory()
 {
     nsComponentManagerImpl::gComponentManager->mLock.AssertNotCurrentThreadOwns();
 
     if (!mFactory) {
         // RegisterFactory then UnregisterFactory can leave an entry in mContractIDs
         // pointing to an unusable nsFactoryEntry.
         if (!mModule)
-            return nullptr;
+            return NULL;
 
         if (!mModule->Load())
-            return nullptr;
+            return NULL;
 
         // Don't set mFactory directly, it needs to be locked
         nsCOMPtr<nsIFactory> factory;
 
         if (mModule->Module()->getFactoryProc) {
             factory = mModule->Module()->getFactoryProc(*mModule->Module(),
                                                         *mCIDEntry);
         }
         else if (mCIDEntry->getFactoryProc) {
             factory = mCIDEntry->getFactoryProc(*mModule->Module(), *mCIDEntry);
         }
         else {
             NS_ASSERTION(mCIDEntry->constructorProc, "no getfactory or constructor");
             factory = new mozilla::GenericFactory(mCIDEntry->constructorProc);
         }
         if (!factory)
-            return nullptr;
+            return NULL;
 
         SafeMutexAutoLock lock(nsComponentManagerImpl::gComponentManager->mLock);
         // Threads can race to set mFactory
         if (!mFactory) {
             factory.swap(mFactory);
         }
     }
     nsCOMPtr<nsIFactory> factory = mFactory;
@@ -1854,17 +1854,17 @@ NS_GetComponentRegistrar(nsIComponentReg
 EXPORT_XPCOM_API(nsresult)
 XRE_AddStaticComponent(const mozilla::Module* aComponent)
 {
     nsComponentManagerImpl::InitializeStaticModules();
     nsComponentManagerImpl::sStaticModules->AppendElement(aComponent);
 
     if (nsComponentManagerImpl::gComponentManager &&
         nsComponentManagerImpl::NORMAL == nsComponentManagerImpl::gComponentManager->mStatus)
-        nsComponentManagerImpl::gComponentManager->RegisterModule(aComponent, nullptr);
+        nsComponentManagerImpl::gComponentManager->RegisterModule(aComponent, NULL);
 
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsComponentManagerImpl::AddBootstrappedManifestLocation(nsIFile* aLocation)
 {
   nsString path;
--- a/xpcom/glue/nsInterfaceHashtable.h
+++ b/xpcom/glue/nsInterfaceHashtable.h
@@ -130,17 +130,17 @@ nsInterfaceHashtable<KeyClass,Interface>
 }
 
 template<class KeyClass, class Interface>
 already_AddRefed<Interface>
 nsInterfaceHashtable<KeyClass,Interface>::Get(KeyType aKey) const
 {
   typename base_type::EntryType* ent = this->GetEntry(aKey);
   if (!ent)
-    return nullptr;
+    return NULL;
 
   nsCOMPtr<Interface> copy = ent->mData;
   return copy.forget();
 }
 
 template<class KeyClass,class Interface>
 Interface*
 nsInterfaceHashtable<KeyClass,Interface>::GetWeak