Bug 564702 Refresh attempted sends bogus state change notification r=biesi
authorNeil Rashbrook <neil@parkwaycc.co.uk>
Fri, 28 May 2010 10:08:24 +0100
changeset 42891 aa20e4f73d81e5cf9e7f2efb5f0e7b73084a24f2
parent 42890 61984c0c4e5ffa8112950b68aa6ae90d41177399
child 42892 cb8e43571769353f32bb3dae35e9fc4671283ddf
push id13501
push userneil@parkwaycc.co.uk
push dateFri, 28 May 2010 09:08:44 +0000
treeherdermozilla-central@aa20e4f73d81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbiesi
bugs564702
milestone1.9.3a5pre
first release with
nightly linux32
aa20e4f73d81 / 3.7a5pre / 20100528030025 / files
nightly linux64
aa20e4f73d81 / 3.7a5pre / 20100528030635 / files
nightly mac
aa20e4f73d81 / 3.7a5pre / 20100528030716 / files
nightly win32
aa20e4f73d81 / 3.7a5pre / 20100528040337 / files
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
Bug 564702 Refresh attempted sends bogus state change notification r=biesi
uriloader/base/nsDocLoader.cpp
--- a/uriloader/base/nsDocLoader.cpp
+++ b/uriloader/base/nsDocLoader.cpp
@@ -1295,22 +1295,23 @@ void nsDocLoader::FireOnStateChange(nsIW
   /*                                                                           
    * First notify any listeners of the new state info...
    *
    * Operate the elements from back to front so that if items get
    * get removed from the list it won't affect our iteration
    */
   nsCOMPtr<nsIWebProgressListener> listener;
   PRInt32 count = mListenerInfoList.Count();
+  PRInt32 notifyMask = (aStateFlags >> 16) & nsIWebProgress::NOTIFY_STATE_ALL;
 
   while (--count >= 0) {
     nsListenerInfo *info;
 
     info = static_cast<nsListenerInfo*>(mListenerInfoList.SafeElementAt(count));
-    if (!info || !(info->mNotifyMask & (aStateFlags >>16))) {
+    if (!info || !(info->mNotifyMask & notifyMask)) {
       continue;
     }
 
     listener = do_QueryReferent(info->mWeakListener);
     if (!listener) {
       // the listener went away. gracefully pull it out of the list.
       mListenerInfoList.RemoveElementAt(count);
       delete info;