Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(165)

Unified Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2735183003: PlzNavigate: stop navigations when opening a document for write (Closed)
Patch Set: Rebase Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 e184fe385333a69833f7ddf0a12bd685793567e7..a70c9a73b8dda02d0ce29b1a0c96764fd27d249e 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();

Powered by Google App Engine
This is Rietveld 408576698