| Index: Source/core/loader/FrameLoader.cpp
|
| diff --git a/Source/core/loader/FrameLoader.cpp b/Source/core/loader/FrameLoader.cpp
|
| index d30381816e394784adbab83d4f7480a317701995..48b35718bc36b31513aed6f04ca7d43348a2aedd 100644
|
| --- a/Source/core/loader/FrameLoader.cpp
|
| +++ b/Source/core/loader/FrameLoader.cpp
|
| @@ -471,22 +471,15 @@ void FrameLoader::didBeginDocument(bool dispatch)
|
|
|
| void FrameLoader::finishedParsing()
|
| {
|
| - if (m_stateMachine.creatingInitialEmptyDocument())
|
| + if (m_stateMachine.creatingInitialEmptyDocument() || !m_documentLoader)
|
| return;
|
|
|
| - // This can be called from the LocalFrame's destructor, in which case we shouldn't protect ourselves
|
| - // because doing so will cause us to re-enter the destructor when protector goes out of scope.
|
| - // Null-checking the FrameView indicates whether or not we're in the destructor.
|
| - RefPtrWillBeRawPtr<LocalFrame> protect(m_frame->view() ? m_frame.get() : nullptr);
|
| -
|
| + RefPtrWillBeRawPtr<LocalFrame> protect(m_frame);
|
| m_progressTracker->finishedParsing();
|
| -
|
| - if (client())
|
| - client()->dispatchDidFinishDocumentLoad(m_documentLoader->isCommittedButEmpty());
|
| -
|
| + client()->dispatchDidFinishDocumentLoad(m_documentLoader->isCommittedButEmpty());
|
| checkCompleted();
|
|
|
| - if (!m_frame->view())
|
| + if (!m_documentLoader)
|
| return; // We are being destroyed by something checkCompleted called.
|
|
|
| // Check if the scrollbars are really needed for the content.
|
|
|