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

Unified Diff: chrome/browser/ui/webui/ntp/new_tab_ui.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
Index: chrome/browser/ui/webui/ntp/new_tab_ui.cc
diff --git a/chrome/browser/ui/webui/ntp/new_tab_ui.cc b/chrome/browser/ui/webui/ntp/new_tab_ui.cc
index cfe8470e6755ad5bbf912dd9b19226ec12cfbf06..8a9faccb7bf70b89846d67947d3771a600dc195f 100644
--- a/chrome/browser/ui/webui/ntp/new_tab_ui.cc
+++ b/chrome/browser/ui/webui/ntp/new_tab_ui.cc
@@ -205,8 +205,9 @@ void NewTabUI::NewTabHTMLSource::StartDataRequest(
return;
}
+ content::WebContents* web_contents = wc_getter.Run();
content::RenderProcessHost* render_host =
- wc_getter.Run()->GetRenderProcessHost();
+ web_contents ? web_contents->GetRenderProcessHost() : nullptr;
NTPResourceCache::WindowType win_type = NTPResourceCache::GetWindowType(
profile_, render_host);
scoped_refptr<base::RefCountedMemory> html_bytes(

Powered by Google App Engine
This is Rietveld 408576698