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