Bug 748276. Don't record a navigationStart for javascript: URI loads that don't produce a document. r=smaug

This commit is contained in:
Boris Zbarsky 2012-05-23 12:44:48 -04:00
Родитель 7aa408ae9b
Коммит b7c5ecd2dd
1 изменённых файлов: 12 добавлений и 1 удалений

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

@ -8595,7 +8595,18 @@ nsDocShell::InternalLoad(nsIURI * aURI,
// (bug#331040)
nsCOMPtr<nsIDocShell> kungFuDeathGrip(this);
rv = MaybeInitTiming();
// Don't init timing for javascript:, since it generally doesn't
// actually start a load or anything. If it does, we'll init
// timing then, from OnStateChange.
// XXXbz mTiming should know what channel it's for, so we don't
// need this hackery. Note that this is still broken in cases
// when we're loading something that's not javascript: and the
// beforeunload handler denies the load. That will screw up
// timing for the next load!
if (!bIsJavascript) {
MaybeInitTiming();
}
if (mTiming) {
mTiming->NotifyBeforeUnload();
}