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

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

Issue 1122173002: App launcher: Avoid a browser crash if the custom page renderer crashes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2357
Patch Set: Created 5 years, 7 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 b2fae696b7ea251042dbd4f6b88fd9f270615271..b60fd13f1a3c84d2aec379bcb25671dd04b677e3 100644
--- a/chrome/browser/ui/app_list/app_list_view_delegate.cc
+++ b/chrome/browser/ui/app_list/app_list_view_delegate.cc
@@ -757,8 +757,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