Bug 919429 - [Message manager] We must not force weak listeners to implement Ci.nsIMessageListener. r=smaug, a=koi+
authorFernando Jiménez <ferjmoreno@gmail.com>
Wed, 25 Sep 2013 21:08:04 +0200
changeset 160529 772abe4f65ec0bd2c6dc2e112b438df2acf03ea5
parent 160528 5689e4237ab7e2ad291e4c9ff249399318e01076
child 160530 eb1b2309837f84503c899be922f0a2d2ca4f3c5d
push id2961
push userlsblakk@mozilla.com
push dateMon, 28 Oct 2013 21:59:28 +0000
treeherdermozilla-beta@73ef4f13486f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug, koi
bugs919429
milestone26.0a2
Bug 919429 - [Message manager] We must not force weak listeners to implement Ci.nsIMessageListener. r=smaug, a=koi+
content/base/src/nsFrameMessageManager.cpp
--- a/content/base/src/nsFrameMessageManager.cpp
+++ b/content/base/src/nsFrameMessageManager.cpp
@@ -752,17 +752,17 @@ nsFrameMessageManager::ReceiveMessage(ns
   AutoSafeJSContext ctx;
 
   if (mListeners.Length()) {
     nsCOMPtr<nsIAtom> name = do_GetAtom(aMessage);
     MMListenerRemover lr(this);
 
     for (uint32_t i = 0; i < mListeners.Length(); ++i) {
       // Remove mListeners[i] if it's an expired weak listener.
-      nsCOMPtr<nsIMessageListener> weakListener;
+      nsCOMPtr<nsISupports> weakListener;
       if (mListeners[i].mWeakListener) {
         weakListener = do_QueryReferent(mListeners[i].mWeakListener);
         if (!weakListener) {
           mListeners.RemoveElementAt(i--);
           continue;
         }
       }