Bug 820067 - Check that mTiming is still around in case the beforeunload handler killed it. r=smaug,bz

This commit is contained in:
Benjamin Peterson 2012-12-10 15:34:01 -05:00
Родитель 489fed5530
Коммит 0b24745372
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -8982,8 +8982,8 @@ nsDocShell::InternalLoad(nsIURI * aURI,
if (!bIsJavascript) {
MaybeInitTiming();
}
bool timeBeforeUnload = mTiming && aFileName.IsVoid();
if (timeBeforeUnload) {
bool timeBeforeUnload = aFileName.IsVoid();
if (mTiming && timeBeforeUnload) {
mTiming->NotifyBeforeUnload();
}
// Check if the page doesn't want to be unloaded. The javascript:
@ -8999,7 +8999,7 @@ nsDocShell::InternalLoad(nsIURI * aURI,
}
}
if (timeBeforeUnload) {
if (mTiming && timeBeforeUnload) {
mTiming->NotifyUnloadAccepted(mCurrentURI);
}