observerservice.unregisterObserver was incorrect
authorBenjamin Smedberg <benjamin@smedbergs.us>
Wed, 10 Aug 2011 14:36:53 -0400
changeset 3 c1b6d03f23840574cfa2a091a46f53c0e67d6dbc
parent 2 e614df952b2ce533d48bfa61cc6ed7ab76715707
child 4 ac5e38072658ef82b7c01909f95715174c521311
push id4
push userbsmedberg@mozilla.com
push dateWed, 10 Aug 2011 18:37:10 +0000
observerservice.unregisterObserver was incorrect
bug675221-partA-xpcom
trychooser-mostlyeverything
--- a/bug675221-partA-xpcom
+++ b/bug675221-partA-xpcom
@@ -1,10 +1,10 @@
 # HG changeset patch
-# Parent f5f1e38225404126875f536c2875ca6a70150bca
+# Parent fc0c60debaaea204df096d81668de3dac24ca070
 Bug 675221 part A: replace XPCOM proxies with runanble for code in XPCOM itself, r?bz
 
 diff --git a/xpcom/base/nsConsoleService.cpp b/xpcom/base/nsConsoleService.cpp
 --- a/xpcom/base/nsConsoleService.cpp
 +++ b/xpcom/base/nsConsoleService.cpp
 @@ -40,95 +40,118 @@
   * Maintains a circular buffer of recent messages, and notifies
   * listeners when new messages are logged.
@@ -257,17 +257,17 @@ diff --git a/xpcom/base/nsConsoleService
 +    }
 +
 +    nsCOMPtr<nsISupports> canonical = do_QueryInterface(listener);
 +
      MutexAutoLock lock(mLock);
  
 -    nsISupportsKey key(listener);
 -    mListeners.Remove(&key);
-+    if (mListeners.GetWeak(canonical)) {
++    if (!mListeners.GetWeak(canonical)) {
 +        // Unregistering a listener that was never registered?
 +        return NS_ERROR_FAILURE;
 +    }
 +    mListeners.Remove(canonical);
      return NS_OK;
  }
  
 -nsresult 
--- a/trychooser-mostlyeverything
+++ b/trychooser-mostlyeverything
@@ -1,5 +1,4 @@
 # HG changeset patch
-# Parent 549be9079b063eba629b84d40f55a2c191e3a427
-try: -b do -p linux,linuxqt,linux64,macosx64,win32,linux-android,linux-maemo5-gtk,linux-maemo5-qt -u all -t none --post-to-bugzilla Bug 675221
+# Parent 84dbb0050bcbe2954394eec0188afa0f618e53bf
+try: -b do -p linux,linuxqt,linux64,macosx64,win32,linux-android,linux-maemo5-gtk,linux-maemo5-qt -u xpcshell,mochitest-1,mochitest-3,mochitest-5,mochitest-o -t none
 
-