Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

only call Stop when DistillerPageWebContents::CreateNewWebContents is… #1362

Merged
merged 1 commit into from
Jan 16, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/components/dom_distiller/content/browser/distiller_page_web_contents.cc b/components/dom_distiller/content/browser/distiller_page_web_contents.cc
index 9dd3a81fea2797c06db85868f0da94612b2a362d..9de2e23743c44deffafa96c7a2bdaabda046de87 100644
--- a/components/dom_distiller/content/browser/distiller_page_web_contents.cc
+++ b/components/dom_distiller/content/browser/distiller_page_web_contents.cc
@@ -182,7 +182,9 @@ void DistillerPageWebContents::ExecuteJavaScript() {
content::WebContentsObserver::Observe(nullptr);
// Stop any pending navigation since the intent is to distill the current
// page.
+ if (source_page_handle_->web_contents()->GetDelegate() == this)
source_page_handle_->web_contents()->Stop();
+
DVLOG(1) << "Beginning distillation";
RunIsolatedJavaScript(
frame, script_,