Bug 881237: mLock released before logging the warning. r=bsmedberg
☠☠ backed out by 20855adc0ef1 ☠ ☠
authorArun <arunsun4048@gmail.com>
Fri, 27 Sep 2013 02:19:16 +0530
changeset 163669 9cc4d49b29b055a0fe87f82ad0e9a6e7840731cc
parent 163619 c3fd83b98898bc9ae8e2f743f6f8901cdf5d7c59
child 163670 cb2e8c9f373b9fb8b9b112a5a3807ab481941b97
push id428
push userbbajaj@mozilla.com
push dateTue, 28 Jan 2014 00:16:25 +0000
treeherdermozilla-release@cd72a7ff3a75 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg
bugs881237
milestone27.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 881237: mLock released before logging the warning. r=bsmedberg
xpcom/components/nsComponentManager.cpp
xpcom/tests/component/TestComponent.cpp
--- a/xpcom/components/nsComponentManager.cpp
+++ b/xpcom/components/nsComponentManager.cpp
@@ -489,16 +489,17 @@ nsComponentManagerImpl::RegisterCIDEntry
         aEntry->cid->ToProvidedString(idstr);
 
         nsCString existing;
         if (f->mModule)
             existing = f->mModule->Description();
         else
             existing = "<unknown module>";
 
+        mLock.Unlock();
         LogMessage("While registering XPCOM module %s, trying to re-register CID '%s' already registered by %s.",
                    aModule->Description().get(),
                    idstr,
                    existing.get());
         return;
     }
 
     f = new nsFactoryEntry(aEntry, aModule);
--- a/xpcom/tests/component/TestComponent.cpp
+++ b/xpcom/tests/component/TestComponent.cpp
@@ -14,19 +14,18 @@ NS_DEFINE_NAMED_CID(NS_TESTING_CID);
 static nsresult
 DummyConstructorFunc(nsISupports* aOuter, const nsIID& aIID, void** aResult)
 {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 static const mozilla::Module::CIDEntry kTestCIDs[] = {
   { &kNS_TESTING_CID, false, NULL, DummyConstructorFunc },
+  { &kNS_TESTING_CID, false, NULL, DummyConstructorFunc },
   { NULL }
 };
 
 static const mozilla::Module kTestModule = {
   mozilla::Module::kVersion,
   kTestCIDs
 };
 
 NSMODULE_DEFN(dummy) = &kTestModule;
-
-