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

Unified Diff: chrome/browser/ui/app_list/app_list_view_delegate.cc

Issue 1115093002: App launcher: Avoid a browser crash if the custom page renderer crashes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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: chrome/browser/ui/app_list/app_list_view_delegate.cc
diff --git a/chrome/browser/ui/app_list/app_list_view_delegate.cc b/chrome/browser/ui/app_list/app_list_view_delegate.cc
index 2cc81ac29dd50406de6fe21d9854e527056afaab..7424f830fe251c202e1452a082d5f6c30ce11c40 100644
--- a/chrome/browser/ui/app_list/app_list_view_delegate.cc
+++ b/chrome/browser/ui/app_list/app_list_view_delegate.cc
@@ -714,8 +714,11 @@ std::vector<views::View*> AppListViewDelegate::CreateCustomPageWebViews(
DCHECK_EQ(profile_, web_contents->GetBrowserContext());
// Make the webview transparent.
- web_contents->GetRenderViewHost()->GetView()->SetBackgroundColor(
- SK_ColorTRANSPARENT);
+ content::RenderWidgetHostView* render_view_host_view =
+ web_contents->GetRenderViewHost()->GetView();
+ // The RenderWidgetHostView may be null if the renderer has crashed.
+ if (render_view_host_view)
+ render_view_host_view->SetBackgroundColor(SK_ColorTRANSPARENT);
views::WebView* web_view =
new views::WebView(web_contents->GetBrowserContext());
« 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