From f8bc3463c624d85a9282d11c2e2b4273cb5b1a4e Mon Sep 17 00:00:00 2001 From: "Olli.Pettay%helsinki.fi" Date: Tue, 17 Mar 2009 13:25:04 +0000 Subject: [PATCH] Backout bug 462517 git-svn-id: svn://10.0.0.236/trunk@256550 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/content/base/src/nsObjectLoadingContent.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/mozilla/content/base/src/nsObjectLoadingContent.cpp b/mozilla/content/base/src/nsObjectLoadingContent.cpp index bdfc26bd436..8aa88bf3624 100644 --- a/mozilla/content/base/src/nsObjectLoadingContent.cpp +++ b/mozilla/content/base/src/nsObjectLoadingContent.cpp @@ -99,12 +99,12 @@ public: // This stores both the content and the frame so that Instantiate calls can be // avoided if the frame changed in the meantime. nsObjectLoadingContent *mContent; - nsWeakFrame mFrame; + nsIObjectFrame* mFrame; nsCString mContentType; nsCOMPtr mURI; nsAsyncInstantiateEvent(nsObjectLoadingContent* aContent, - nsIFrame* aFrame, + nsIObjectFrame* aFrame, const nsCString& aType, nsIURI* aURI) : mContent(aContent), mFrame(aFrame), mContentType(aType), mURI(aURI) @@ -134,7 +134,7 @@ nsAsyncInstantiateEvent::Run() // Also make sure that we still refer to the same data. nsIObjectFrame* frame = mContent-> GetExistingFrame(nsObjectLoadingContent::eFlushContent); - if (mFrame.IsAlive() && + if (frame == mFrame && mContent->mURI == mURI && mContent->mContentType.Equals(mContentType)) { if (LOG_ENABLED()) { @@ -790,10 +790,8 @@ nsObjectLoadingContent::HasNewFrame(nsIObjectFrame* aFrame) return NS_OK; } - nsIFrame* frame = nsnull; - CallQueryInterface(aFrame, &frame); nsCOMPtr event = - new nsAsyncInstantiateEvent(this, frame, mContentType, mURI); + new nsAsyncInstantiateEvent(this, aFrame, mContentType, mURI); if (!event) { return NS_ERROR_OUT_OF_MEMORY; }