Put our load into the newly-created loadgroup when we go and create one. Bug 383961, r+sr=biesi, a=bzbarsky
authorbzbarsky@mit.edu
Thu, 23 Aug 2007 10:37:40 -0700
changeset 5204 09dca34ee3908c4d063d20fa17d87d8804c91a8b
parent 5203 c40bc9fa50d456a2a899b100557350f8f7e6cc65
child 5205 8781afe7e4ab3d63a71574f21800602ff9143905
push id1
push userbsmedberg@mozilla.com
push dateThu, 20 Mar 2008 16:49:24 +0000
treeherderautoland@61007906a1f8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbzbarsky
bugs383961
milestone1.9a8pre
Put our load into the newly-created loadgroup when we go and create one. Bug 383961, r+sr=biesi, a=bzbarsky
uriloader/base/nsURILoader.cpp
--- a/uriloader/base/nsURILoader.cpp
+++ b/uriloader/base/nsURILoader.cpp
@@ -909,18 +909,20 @@ nsresult nsURILoader::OpenChannel(nsICha
         if (!newDocLoader)
           return NS_ERROR_OUT_OF_MEMORY;
         nsresult rv = newDocLoader->Init();
         if (NS_FAILED(rv))
           return rv;
         rv = nsDocLoader::AddDocLoaderAsChildOfRoot(newDocLoader);
         if (NS_FAILED(rv))
           return rv;
-        listener->SetLoadCookie(nsDocLoader::GetAsSupports(newDocLoader));
+        cookie = nsDocLoader::GetAsSupports(newDocLoader);
+        listener->SetLoadCookie(cookie);
       }
+      loadGroup = do_GetInterface(cookie);
     }
   }
 
   // If the channel is pending, then we need to remove it from its current
   // loadgroup
   nsCOMPtr<nsILoadGroup> oldGroup;
   channel->GetLoadGroup(getter_AddRefs(oldGroup));
   if (aChannelIsOpen && !SameCOMIdentity(oldGroup, loadGroup)) {