зеркало из https://github.com/mozilla/gecko-dev.git
bug #37434. Stop() is now called on the content viewer, before the old document is destroyed. This allows the old document to release some stuff :-)
This commit is contained in:
Родитель
81b816da2e
Коммит
5bb3054ba7
|
@ -2618,6 +2618,12 @@ NS_IMETHODIMP nsDocShell::SetupNewViewer(nsIContentViewer* aNewViewer)
|
|||
NS_ERROR_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
// Stop any activity that may be happening in the old document before
|
||||
// releasing it...
|
||||
if (mContentViewer) {
|
||||
mContentViewer->Stop();
|
||||
}
|
||||
mContentViewer = nsnull;
|
||||
// End copying block (Don't hold content/document viewer ref beyond here!!)
|
||||
|
||||
|
|
|
@ -1162,22 +1162,6 @@ NS_IMETHODIMP
|
|||
nsWebShell::OnStartURLLoad(nsIDocumentLoader* loader,
|
||||
nsIChannel* channel)
|
||||
{
|
||||
nsresult rv;
|
||||
|
||||
nsCOMPtr<nsIURI> aURL;
|
||||
rv = channel->GetURI(getter_AddRefs(aURL));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
|
||||
// Stop loading of the earlier document completely when the document url
|
||||
// load starts. Now we know that this url is valid and available.
|
||||
nsLoadFlags loadFlags = 0;
|
||||
channel -> GetLoadAttributes (&loadFlags);
|
||||
|
||||
PRBool equals = PR_FALSE;
|
||||
if (NS_SUCCEEDED(aURL->Equals(mCurrentURI, &equals)) && equals && !(loadFlags & nsIChannel::LOAD_REPLACE))
|
||||
Stop();
|
||||
|
||||
/*
|
||||
*Fire the OnStartDocumentLoad of the webshell observer
|
||||
*/
|
||||
|
|
Загрузка…
Ссылка в новой задаче