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

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

Issue 693053002: Fix issue with DOM Distiller viewer when renderer goes away. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/dom_distiller_viewer_source.cc
diff --git a/components/dom_distiller/content/dom_distiller_viewer_source.cc b/components/dom_distiller/content/dom_distiller_viewer_source.cc
index 5d6bb6ab55b1b795dda437b9681446ae4ecd8ff4..a3ae496db86455a07c886dfe45e3b366ece85493 100644
--- a/components/dom_distiller/content/dom_distiller_viewer_source.cc
+++ b/components/dom_distiller/content/dom_distiller_viewer_source.cc
@@ -268,7 +268,7 @@ void DomDistillerViewerSource::StartDataRequest(
const content::URLDataSource::GotDataCallback& callback) {
content::RenderFrameHost* render_frame_host =
content::RenderFrameHost::FromID(render_process_id, render_frame_id);
- DCHECK(render_frame_host);
+ if (!render_frame_host) return;
content::RenderViewHost* render_view_host =
render_frame_host->GetRenderViewHost();
DCHECK(render_view_host);
@@ -290,9 +290,7 @@ void DomDistillerViewerSource::StartDataRequest(
return;
}
content::WebContents* web_contents =
- content::WebContents::FromRenderFrameHost(
- content::RenderFrameHost::FromID(render_process_id,
- render_frame_id));
+ content::WebContents::FromRenderFrameHost(render_frame_host);
DCHECK(web_contents);
// An empty |path| is invalid, but guard against it. If not empty, assume
// |path| starts with '?', which is stripped away.
« 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