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

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: 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
Index: Source/core/frame/LocalDOMWindow.cpp
diff --git a/Source/core/frame/LocalDOMWindow.cpp b/Source/core/frame/LocalDOMWindow.cpp
index 4c418fe7af9bad03d3bcf06d6fabc33475395ba9..e9b3aa5f31e5fb1569076e38dafd2460a69144bf 100644
--- a/Source/core/frame/LocalDOMWindow.cpp
+++ b/Source/core/frame/LocalDOMWindow.cpp
@@ -1571,14 +1571,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());

Powered by Google App Engine
This is Rietveld 408576698