Index: third_party/WebKit/Source/core/loader/FrameLoader.cpp |
diff --git a/third_party/WebKit/Source/core/loader/FrameLoader.cpp b/third_party/WebKit/Source/core/loader/FrameLoader.cpp |
index da7e510ebd2a3daab476a994525e08db3564450d..36dc8cd6cb2576e8d06c3ba25eba95f5786d993e 100644 |
--- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp |
+++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp |
@@ -1419,7 +1419,10 @@ void FrameLoader::startLoad(FrameLoadRequest& frameLoadRequest, FrameLoadType ty |
return; |
m_frame->document()->cancelParsing(); |
- detachDocumentLoader(m_provisionalDocumentLoader); |
+ if (m_provisionalDocumentLoader) { |
+ FrameNavigationDisabler navigationDisabler(*m_frame); |
+ detachDocumentLoader(m_provisionalDocumentLoader); |
+ } |
// beforeunload fired above, and detaching a DocumentLoader can fire |
// events, which can detach this frame. |