Bug 788252 - Cleanup frame loader when aborting a recursive load in object/embed tags. r=josh
authorJohn Schoenick <jschoenick@mozilla.com>
Fri, 05 Oct 2012 15:30:13 -0700
changeset 113848 d08aa6a12f1a1f6a09a2c04c4f0afcc5e3811bb5
parent 113847 2cfe4e2ada97693451a663406d2dbd5a94154d1c
child 113849 2f30020727e9eb4b1b800d437ea33c9df81f35ba
push id23891
push useremorley@mozilla.com
push dateWed, 21 Nov 2012 15:30:36 +0000
treeherdermozilla-central@905492e644e3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjosh
bugs788252
milestone20.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 788252 - Cleanup frame loader when aborting a recursive load in object/embed tags. r=josh
content/base/src/nsObjectLoadingContent.cpp
--- a/content/base/src/nsObjectLoadingContent.cpp
+++ b/content/base/src/nsObjectLoadingContent.cpp
@@ -1758,16 +1758,19 @@ nsObjectLoadingContent::LoadObject(bool 
       if (!mFrameLoader) {
         NS_NOTREACHED("nsFrameLoader::Create failed");
         mType = eType_Null;
         break;
       }
       
       rv = mFrameLoader->CheckForRecursiveLoad(mURI);
       if (NS_FAILED(rv)) {
+        LOG(("OBJLC [%p]: Aborting recursive load", this));
+        mFrameLoader->Destroy();
+        mFrameLoader = nullptr;
         mType = eType_Null;
         break;
       }
 
       // We're loading a document, so we have to set LOAD_DOCUMENT_URI
       // (especially important for firing onload)
       nsLoadFlags flags = 0;
       mChannel->GetLoadFlags(&flags);