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