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:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user