зеркало из https://github.com/mozilla/gecko-dev.git
Make sure to remove our mOnloadBlocker from the loadgroup when we're removed
from the window. Bug 305639, r+sr=dbaron
This commit is contained in:
Родитель
6dfeabd466
Коммит
7ede6d7070
|
@ -2035,6 +2035,14 @@ nsDocument::SetScriptGlobalObject(nsIScriptGlobalObject *aScriptGlobalObject)
|
||||||
// We're detaching from the window. We need to grab a pointer to
|
// We're detaching from the window. We need to grab a pointer to
|
||||||
// our layout history state now.
|
// our layout history state now.
|
||||||
mLayoutHistoryState = GetLayoutHistoryState();
|
mLayoutHistoryState = GetLayoutHistoryState();
|
||||||
|
|
||||||
|
// Also make sure to remove our onload blocker now if we haven't done it yet
|
||||||
|
if (mOnloadBlockCount != 0) {
|
||||||
|
nsCOMPtr<nsILoadGroup> loadGroup = GetDocumentLoadGroup();
|
||||||
|
if (loadGroup) {
|
||||||
|
loadGroup->RemoveRequest(mOnloadBlocker, nsnull, NS_OK);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mScriptGlobalObject = aScriptGlobalObject;
|
mScriptGlobalObject = aScriptGlobalObject;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче