Bug 916576 - Follow the com rules when calling LoadURI. r=bz, a=bajaj
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Thu, 10 Oct 2013 23:28:07 +0300
changeset 119956 41c15ddb7216618b562ceee175695bbf3b7b1c78
parent 119955 0c3b698a2bfda01e0a1341e3fe684f4c41b3feda
child 119957 6b412d620325010626c9f92aaa941475c3bf7f8c
push id1093
push userryanvm@gmail.com
push dateSun, 27 Oct 2013 01:55:35 +0000
reviewersbz, bajaj
bugs916576
milestone18.1
Bug 916576 - Follow the com rules when calling LoadURI. r=bz, a=bajaj
content/base/src/nsFrameLoader.cpp
--- a/content/base/src/nsFrameLoader.cpp
+++ b/content/base/src/nsFrameLoader.cpp
@@ -493,17 +493,18 @@ nsFrameLoader::ReallyStartLoadingInterna
   if (OwnerIsBrowserFrame()) {
     flags = nsIWebNavigation::LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP |
             nsIWebNavigation::LOAD_FLAGS_DISALLOW_INHERIT_OWNER;
   }
 
   // Kick off the load...
   bool tmpState = mNeedsAsyncDestroy;
   mNeedsAsyncDestroy = true;
-  rv = mDocShell->LoadURI(mURIToLoad, loadInfo, flags, false);
+  nsCOMPtr<nsIURI> uriToLoad = mURIToLoad;
+  rv = mDocShell->LoadURI(uriToLoad, loadInfo, flags, false);
   mNeedsAsyncDestroy = tmpState;
   mURIToLoad = nullptr;
   NS_ENSURE_SUCCESS(rv, rv);
 
   return NS_OK;
 }
 
 nsresult