Commit 3722cff1 authored by hanxi@chromium.org's avatar hanxi@chromium.org

The crash is caused when a guest is attached, a parameter "repaint" is passed...

The crash is caused when a guest is attached, a parameter "repaint" is passed in. For most device, their scale factor is 1, so we don't need to repaint and "repaint" is set to  false. However, for high dpi devices like Mac, the scale factor is 2, rather than 1. Therefore, a DECHECK of the scale factor == 1 is failed. 

So we use GetDeviceScaleFactor() to initialize last_device_scale_factor as well.

BUG=393278

Review URL: https://codereview.chromium.org/385173003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@282711 0039d316-1c4b-4281-b951-d872f2087c98
parent ddb26fef
...@@ -51,7 +51,7 @@ BrowserPlugin::BrowserPlugin(RenderViewImpl* render_view, ...@@ -51,7 +51,7 @@ BrowserPlugin::BrowserPlugin(RenderViewImpl* render_view,
render_view_routing_id_(render_view->GetRoutingID()), render_view_routing_id_(render_view->GetRoutingID()),
container_(NULL), container_(NULL),
paint_ack_received_(true), paint_ack_received_(true),
last_device_scale_factor_(1.0f), last_device_scale_factor_(GetDeviceScaleFactor()),
sad_guest_(NULL), sad_guest_(NULL),
guest_crashed_(false), guest_crashed_(false),
is_auto_size_state_dirty_(false), is_auto_size_state_dirty_(false),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment