mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-26 19:55:39 +00:00
Bug 840263, make sure to notify the right navigation timing about page load, r=hsivonen
--HG-- extra : rebase_source : fedfbc41e787117e941fd4d5c12807002dfbe64a
This commit is contained in:
parent
c798e1d9b7
commit
87022e0fa8
@ -989,7 +989,7 @@ nsDocumentViewer::LoadComplete(nsresult aStatus)
|
||||
NS_ENSURE_TRUE(mDocument, NS_ERROR_NOT_AVAILABLE);
|
||||
|
||||
// First, get the window from the document...
|
||||
nsPIDOMWindow *window = mDocument->GetWindow();
|
||||
nsCOMPtr<nsPIDOMWindow> window = mDocument->GetWindow();
|
||||
|
||||
mLoaded = true;
|
||||
|
||||
@ -1025,9 +1025,10 @@ nsDocumentViewer::LoadComplete(nsresult aStatus)
|
||||
nsIDocument::READYSTATE_UNINITIALIZED &&
|
||||
NS_IsAboutBlank(mDocument->GetDocumentURI())),
|
||||
"Bad readystate");
|
||||
nsCOMPtr<nsIDocument> d = mDocument;
|
||||
mDocument->SetReadyStateInternal(nsIDocument::READYSTATE_COMPLETE);
|
||||
|
||||
nsRefPtr<nsDOMNavigationTiming> timing(mDocument->GetNavigationTiming());
|
||||
nsRefPtr<nsDOMNavigationTiming> timing(d->GetNavigationTiming());
|
||||
if (timing) {
|
||||
timing->NotifyLoadEventStart();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user