48 lines
1.8 KiB
Diff
48 lines
1.8 KiB
Diff
diff --git content/browser/renderer_host/render_widget_host_view_aura.cc content/browser/renderer_host/render_widget_host_view_aura.cc
|
|
index 5bebf776d70d..7e7eba1be689 100644
|
|
--- content/browser/renderer_host/render_widget_host_view_aura.cc
|
|
+++ content/browser/renderer_host/render_widget_host_view_aura.cc
|
|
@@ -434,13 +434,6 @@ RenderWidgetHostViewAura::RenderWidgetHostViewAura(
|
|
selection_controller_client_.reset(
|
|
new TouchSelectionControllerClientAura(this));
|
|
CreateSelectionController();
|
|
-
|
|
- RenderViewHost* rvh = RenderViewHost::From(host_);
|
|
- if (rvh) {
|
|
- // TODO(mostynb): actually use prefs. Landing this as a separate CL
|
|
- // first to rebaseline some unreliable layout tests.
|
|
- ignore_result(rvh->GetWebkitPreferences());
|
|
- }
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
@@ -780,8 +773,10 @@ void RenderWidgetHostViewAura::UpdateBackgroundColorFromRenderer(
|
|
background_color_ = color;
|
|
|
|
bool opaque = SkColorGetA(color) == SK_AlphaOPAQUE;
|
|
- window_->layer()->SetFillsBoundsOpaquely(opaque);
|
|
- window_->layer()->SetColor(color);
|
|
+ if (window_) {
|
|
+ window_->layer()->SetFillsBoundsOpaquely(opaque);
|
|
+ window_->layer()->SetColor(color);
|
|
+ }
|
|
}
|
|
|
|
bool RenderWidgetHostViewAura::IsMouseLocked() {
|
|
@@ -1937,6 +1932,15 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) {
|
|
window_->Init(ui::LAYER_SOLID_COLOR);
|
|
window_->layer()->SetColor(background_color_);
|
|
|
|
+ // Do this after |window_| is created to avoid crashes on Win10.
|
|
+ // See https://crbug.com/761389.
|
|
+ RenderViewHost* rvh = RenderViewHost::From(host_);
|
|
+ if (rvh) {
|
|
+ // TODO(mostynb): actually use prefs. Landing this as a separate CL
|
|
+ // first to rebaseline some unreliable layout tests.
|
|
+ ignore_result(rvh->GetWebkitPreferences());
|
|
+ }
|
|
+
|
|
if (!IsUsingMus())
|
|
return;
|
|
|