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

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

Issue 2393773002: Fix devtools unable to start a shared workers. (Closed)
Patch Set: Created 4 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 | « chrome/browser/ui/webui/ntp/new_tab_ui.cc ('k') | content/browser/webui/url_data_manager_backend.h » ('j') | 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 0058d6881072d43b55129c03dca9a7cd4c984690..e28e11d50eaa6070278cd4f2d88a02681dac9f15 100644
--- a/components/dom_distiller/content/browser/dom_distiller_viewer_source.cc
+++ b/components/dom_distiller/content/browser/dom_distiller_viewer_source.cc
@@ -231,6 +231,8 @@ void DomDistillerViewerSource::StartDataRequest(
const content::ResourceRequestInfo::WebContentsGetter& wc_getter,
const content::URLDataSource::GotDataCallback& callback) {
content::WebContents* web_contents = wc_getter.Run();
+ if (!web_contents)
+ return;
if (kViewerCssPath == path) {
std::string css = viewer::GetCss();
callback.Run(base::RefCountedString::TakeString(&css));
« no previous file with comments | « chrome/browser/ui/webui/ntp/new_tab_ui.cc ('k') | content/browser/webui/url_data_manager_backend.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698