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

Unified Diff: Source/core/frame/LocalDOMWindow.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/dom/ScriptedAnimationController.cpp ('k') | Source/core/inspector/InspectorResourceAgent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/LocalDOMWindow.cpp
diff --git a/Source/core/frame/LocalDOMWindow.cpp b/Source/core/frame/LocalDOMWindow.cpp
index 2d84951bead700acfccc160b9f3e06cd50b9b9d6..4d17b39bbe5a74428e9386763e548b7b9acc8f66 100644
--- a/Source/core/frame/LocalDOMWindow.cpp
+++ b/Source/core/frame/LocalDOMWindow.cpp
@@ -1565,14 +1565,14 @@ bool LocalDOMWindow::removeEventListener(const AtomicString& eventType, PassRefP
void LocalDOMWindow::dispatchLoadEvent()
{
RefPtrWillBeRawPtr<Event> loadEvent(Event::create(EventTypeNames::load));
- if (frame() && frame()->loader().documentLoader() && !frame()->loader().documentLoader()->timing()->loadEventStart()) {
+ if (frame() && frame()->loader().documentLoader() && !frame()->loader().documentLoader()->timing().loadEventStart()) {
// The DocumentLoader (and thus its DocumentLoadTiming) might get destroyed while dispatching
// the event, so protect it to prevent writing the end time into freed memory.
RefPtr<DocumentLoader> documentLoader = frame()->loader().documentLoader();
- DocumentLoadTiming* timing = documentLoader->timing();
- timing->markLoadEventStart();
+ DocumentLoadTiming& timing = documentLoader->timing();
+ timing.markLoadEventStart();
dispatchEvent(loadEvent, document());
- timing->markLoadEventEnd();
+ timing.markLoadEventEnd();
} else
dispatchEvent(loadEvent, document());
« no previous file with comments | « Source/core/dom/ScriptedAnimationController.cpp ('k') | Source/core/inspector/InspectorResourceAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698