Skip to content

Commit

Permalink
Merge pull request #1361 from /issues/2901
Browse files Browse the repository at this point in the history
only call Stop when DistillerPageWebContents::CreateNewWebContents is…
  • Loading branch information
bridiver authored Jan 16, 2019
2 parents cddd7e8 + cb1f929 commit 6eb028a
Showing 1 changed file with 14 additions and 0 deletions.
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_,

0 comments on commit 6eb028a

Please sign in to comment.