diff options
author | yzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-13 06:23:33 +0000 |
---|---|---|
committer | yzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-13 06:23:33 +0000 |
commit | 3bcb02d0047b096b838f950d51bca17aa7f90292 (patch) | |
tree | 76dad9bdc1e99facb5e79e7ede7441233b3cc3f4 | |
parent | 0205b685e499c28df47b665464f65fd03af1e335 (diff) | |
download | chromium_src-3bcb02d0047b096b838f950d51bca17aa7f90292.zip chromium_src-3bcb02d0047b096b838f950d51bca17aa7f90292.tar.gz chromium_src-3bcb02d0047b096b838f950d51bca17aa7f90292.tar.bz2 |
Add CHECKs to diagnose a Pepper Flash crash.
Sometimes Flash receives a 0 device scale value, we would like to find out in what circumstances the renderer side would send such a value.
This CL will be removed after it takes effect in one Canary build.
BUG=156730
TEST=None
Review URL: https://codereview.chromium.org/11360212
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167312 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | ppapi/proxy/ppp_instance_proxy.cc | 7 | ||||
-rw-r--r-- | webkit/plugins/ppapi/ppapi_plugin_instance.cc | 8 |
2 files changed, 15 insertions, 0 deletions
diff --git a/ppapi/proxy/ppp_instance_proxy.cc b/ppapi/proxy/ppp_instance_proxy.cc index bfc9102..ff52d68 100644 --- a/ppapi/proxy/ppp_instance_proxy.cc +++ b/ppapi/proxy/ppp_instance_proxy.cc @@ -70,6 +70,13 @@ void DidChangeView(PP_Instance instance, PP_Resource view_resource) { return; } + // TODO(yzshen): For debugging crbug.com/156730. According to the crash + // report, sometimes the plugin side receives a ViewData object with mostly + // default values, e.g., device_scale is set to 0. We crash here to find out + // in what circumstances the renderer side would send such a value. + // Must be revomved on the next day. + CHECK(enter.object()->GetData().device_scale > 0.0f); + dispatcher->Send(new PpapiMsg_PPPInstance_DidChangeView( API_ID_PPP_INSTANCE, instance, enter.object()->GetData(), IsFlashFullscreen(instance, dispatcher))); diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.cc b/webkit/plugins/ppapi/ppapi_plugin_instance.cc index 4aa3f99..3e08ce0 100644 --- a/webkit/plugins/ppapi/ppapi_plugin_instance.cc +++ b/webkit/plugins/ppapi/ppapi_plugin_instance.cc @@ -821,6 +821,14 @@ void PluginInstance::ViewChanged(const gfx::Rect& position, view_data_.rect = PP_FromGfxRect(position); view_data_.clip_rect = PP_FromGfxRect(clip); view_data_.device_scale = container_->deviceScaleFactor(); + + // TODO(yzshen): For debugging crbug.com/156730. According to the crash + // report, sometimes the plugin side receives a ViewData object with mostly + // default values, e.g., device_scale is set to 0. We crash here to find out + // in what circumstances the renderer side would send such a value. + // Must be revomved on the next day. + CHECK(view_data_.device_scale > 0.0f); + view_data_.css_scale = container_->pageZoomFactor() * container_->pageScaleFactor(); |