Skip to content

Commit

Permalink
only call Stop when DistillerPageWebContents::CreateNewWebContents is…
Browse files Browse the repository at this point in the history
  • Loading branch information
bridiver committed Jan 16, 2019
1 parent bde566a commit b60f894
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 b60f894

Please sign in to comment.