Index: third_party/WebKit/Source/core/dom/Document.cpp |
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp |
index 5ad6519b0a8ccde51adb6569053021d32a347a89..722a28b9feb78753752a8d177eb6fe6d5fe5ea8b 100644 |
--- a/third_party/WebKit/Source/core/dom/Document.cpp |
+++ b/third_party/WebKit/Source/core/dom/Document.cpp |
@@ -2725,9 +2725,15 @@ void Document::open() { |
} |
} |
- // PlzNavigate: We should abort ongoing navigations handled by the client. |
- if (m_frame->loader().hasProvisionalNavigation()) |
+ if (m_frame->loader().hasProvisionalNavigation()) { |
m_frame->loader().stopAllLoaders(); |
+ // PlzNavigate: navigations handled by the client should also be |
+ // cancelled. |
+ if (m_frame->loader().client() && |
+ m_frame->settings()->getBrowserSideNavigationEnabled()) { |
+ m_frame->loader().client()->abortClientNavigation(); |
+ } |
+ } |
} |
removeAllEventListenersRecursively(); |