Fix crash when using fastback to go to pages that use SVG in an <object> tag, and bulletproof a little bit. Bug 299153, r+sr=dbaron, a=bsmedberg

git-svn-id: svn://10.0.0.236/trunk@175421 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bryner%brianryner.com
2005-06-30 20:58:33 +00:00
parent b528d8f9e4
commit 579f24fd9d
2 changed files with 29 additions and 14 deletions

View File

@@ -5006,20 +5006,22 @@ nsDocShell::FinishRestore()
}
}
nsCOMPtr<nsIDOMDocument> domDoc;
mContentViewer->GetDOMDocument(getter_AddRefs(domDoc));
if (mContentViewer) {
nsCOMPtr<nsIDOMDocument> domDoc;
mContentViewer->GetDOMDocument(getter_AddRefs(domDoc));
nsCOMPtr<nsIDocument> doc = do_QueryInterface(domDoc);
if (doc) {
// Finally, we remove the request from the loadgroup. This will cause
// onStateChange(STATE_STOP) to fire, which will fire the PageShow
// event to the chrome.
nsCOMPtr<nsIDocument> doc = do_QueryInterface(domDoc);
if (doc) {
// Finally, we remove the request from the loadgroup. This will
// cause onStateChange(STATE_STOP) to fire, which will fire the
// PageShow event to the chrome.
nsIChannel *channel = doc->GetChannel();
if (channel) {
mIsRestoringDocument = PR_TRUE;
mLoadGroup->RemoveRequest(channel, nsnull, NS_OK);
mIsRestoringDocument = PR_FALSE;
nsIChannel *channel = doc->GetChannel();
if (channel) {
mIsRestoringDocument = PR_TRUE;
mLoadGroup->RemoveRequest(channel, nsnull, NS_OK);
mIsRestoringDocument = PR_FALSE;
}
}
}