Backout Bug 818559 to fix Bug 820067, a=me

This commit is contained in:
Olli Pettay
2012-12-10 21:52:01 +02:00
parent e309e8e4b6
commit ad7992a9d5
4 changed files with 8 additions and 18 deletions

View File

@@ -8982,13 +8982,12 @@ nsDocShell::InternalLoad(nsIURI * aURI,
if (!bIsJavascript) {
MaybeInitTiming();
}
bool timeBeforeUnload = mTiming && aFileName.IsVoid();
if (timeBeforeUnload) {
if (mTiming) {
mTiming->NotifyBeforeUnload();
}
// Check if the page doesn't want to be unloaded. The javascript:
// protocol handler deals with this for javascript: URLs.
if (!bIsJavascript && aFileName.IsVoid() && mContentViewer) {
if (!bIsJavascript && mContentViewer) {
bool okToUnload;
rv = mContentViewer->PermitUnload(false, &okToUnload);
@@ -8999,7 +8998,7 @@ nsDocShell::InternalLoad(nsIURI * aURI,
}
}
if (timeBeforeUnload) {
if (mTiming) {
mTiming->NotifyUnloadAccepted(mCurrentURI);
}