REGRESSION(r216119): DocumentLoader::detachFromFrame still encounters nullptr frame
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 31 May 2018 20:54:24 +0000 (20:54 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 31 May 2018 20:54:24 +0000 (20:54 +0000)
commit02a6edfb11780456f7808f1651c503216a96e9c7
treeb545c77e7aa81de67adcf253fc91380c427728a9
parent7e57d3ba995c02ca555983fa4a840c3d4c198332
REGRESSION(r216119): DocumentLoader::detachFromFrame still encounters nullptr frame
https://bugs.webkit.org/show_bug.cgi?id=186081
<rdar://problem/34918109>

Reviewed by David Kilzer.

The nullptr check that was removed in r216119 was still needed because when the DocumentLoader
is in 'm_waitingForNavigationPolicy' or in 'm_waitingForContentPolicy', a call to the policy checker
to stopCheck we will clear the frame as part of the cleanup phase.

If m_frame is nullptr after cancelPolicyCheckIfNeeded, our work is already done so just return.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::detachFromFrame):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@232370 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/loader/DocumentLoader.cpp