Bug 1607068 - Don't assert that the timing object isn't set for about:blank load. r=mattwoodrow

about:blank gets loaded into the new docshell before ResumeRedirectedLoad get called for the 'real' load
Under some circumstances, it is sometimes possible that we got far enough with the about:blank load to initialize a timing.
Under these conditions, it is safe to disregard the existing timing information and replace it with the one carried over.

Differential Revision: https://phabricator.services.mozilla.com/D58733
This commit is contained in:
Jean-Yves Avenard
2020-01-06 02:47:42 +00:00
parent cb017aa87d
commit e17a2ef796

View File

@@ -12776,7 +12776,10 @@ nsDocShell::ResumeRedirectedLoad(uint64_t aIdentifier, int32_t aHistoryIndex) {
previousFlags, aRedirects);
}
MOZ_ASSERT(!self->mTiming, "timing object can't already exists");
MOZ_ASSERT(
(self->mCurrentURI && NS_IsAboutBlank(self->mCurrentURI)) ||
!self->mTiming,
"timing object can't already exists in non-about:blank loads");
self->mTiming = new nsDOMNavigationTiming(self, aTiming);
// If we're performing a history load, locate the correct history entry,