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

Unified Diff: components/dom_distiller/content/browser/dom_distiller_viewer_source.cc

Issue 2369923003: Fix assert with distiller code caused by r419635. (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/dom_distiller/content/browser/dom_distiller_viewer_source.cc
diff --git a/components/dom_distiller/content/browser/dom_distiller_viewer_source.cc b/components/dom_distiller/content/browser/dom_distiller_viewer_source.cc
index 0669e214b03631cfa70e60ee9c342f868a7a7a44..0058d6881072d43b55129c03dca9a7cd4c984690 100644
--- a/components/dom_distiller/content/browser/dom_distiller_viewer_source.cc
+++ b/components/dom_distiller/content/browser/dom_distiller_viewer_source.cc
@@ -132,6 +132,9 @@ void DomDistillerViewerSource::RequestViewerHandle::SendJavaScript(
void DomDistillerViewerSource::RequestViewerHandle::DidFinishNavigation(
content::NavigationHandle* navigation_handle) {
+ if (!navigation_handle->IsInMainFrame() || !navigation_handle->HasCommitted())
+ return;
+
const GURL& navigation = navigation_handle->GetURL();
bool expected_main_view_request =
navigation.SchemeIs(expected_scheme_.c_str()) &&
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698