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()); |