Bug 916576 - Follow the com rules when calling LoadURI. r=bz, a=abillings
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Sat, 12 Oct 2013 14:54:08 -0400
changeset 110281 a71af2682ff545bdb0bcdfc3a1f52cb8c601c0c3
parent 110280 9b028c33edb5abda1cb56c97fc791ce8521f352c
child 110282 bb79968b80e36e2b98301eef6c1e23e851c5ff68
push id301
push userryanvm@gmail.com
push dateSat, 12 Oct 2013 18:54:15 +0000
reviewersbz, abillings
bugs916576
milestone17.0.9esrpre
Bug 916576 - Follow the com rules when calling LoadURI. r=bz, a=abillings
content/base/src/nsFrameLoader.cpp
--- a/content/base/src/nsFrameLoader.cpp
+++ b/content/base/src/nsFrameLoader.cpp
@@ -487,17 +487,18 @@ nsFrameLoader::ReallyStartLoadingInterna
   rv = mOwnerContent->NodePrincipal()->GetURI(getter_AddRefs(referrer));
   NS_ENSURE_SUCCESS(rv, rv);
 
   loadInfo->SetReferrer(referrer);
 
   // Kick off the load...
   bool tmpState = mNeedsAsyncDestroy;
   mNeedsAsyncDestroy = true;
-  rv = mDocShell->LoadURI(mURIToLoad, loadInfo,
+  nsCOMPtr<nsIURI> uriToLoad = mURIToLoad;
+  rv = mDocShell->LoadURI(uriToLoad, loadInfo,
                           nsIWebNavigation::LOAD_FLAGS_NONE, false);
   mNeedsAsyncDestroy = tmpState;
   mURIToLoad = nullptr;
   NS_ENSURE_SUCCESS(rv, rv);
 
   return NS_OK;
 }