Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(280)

Unified Diff: Source/core/dom/Document.cpp

Issue 916273002: Make DocumentLoader::timing return a reference (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase against ToT Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/animation/AnimationTimeline.cpp ('k') | Source/core/dom/ScriptedAnimationController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 77af681885b1f70c236bc486fe9e733a5ce68ab0..4bd2b1ec605672d4ee1c1df30ab85abdc44518a4 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -2618,12 +2618,12 @@ void Document::dispatchUnloadEvents()
RefPtr<DocumentLoader> documentLoader = m_frame->loader().provisionalDocumentLoader();
m_loadEventProgress = UnloadEventInProgress;
RefPtrWillBeRawPtr<Event> unloadEvent(Event::create(EventTypeNames::unload));
- if (documentLoader && !documentLoader->timing()->unloadEventStart() && !documentLoader->timing()->unloadEventEnd()) {
- DocumentLoadTiming* timing = documentLoader->timing();
- ASSERT(timing->navigationStart());
- timing->markUnloadEventStart();
+ if (documentLoader && !documentLoader->timing().unloadEventStart() && !documentLoader->timing().unloadEventEnd()) {
+ DocumentLoadTiming& timing = documentLoader->timing();
+ ASSERT(timing.navigationStart());
+ timing.markUnloadEventStart();
m_frame->localDOMWindow()->dispatchEvent(unloadEvent, this);
- timing->markUnloadEventEnd();
+ timing.markUnloadEventEnd();
} else {
m_frame->localDOMWindow()->dispatchEvent(unloadEvent, m_frame->document());
}
« no previous file with comments | « Source/core/animation/AnimationTimeline.cpp ('k') | Source/core/dom/ScriptedAnimationController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698