diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-16 03:37:44 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-16 03:37:44 +0000 |
commit | 6b9ec39613fb9fdaa52dcf215e5099ff05c686de (patch) | |
tree | b38d08d10a2a25b77783da06ddaed51ff1c32445 /webkit/plugins/ppapi/ppb_graphics_2d_impl.cc | |
parent | b7e44ff6661a0b0eb4bff7c9a0a90478a60b830a (diff) | |
download | chromium_src-6b9ec39613fb9fdaa52dcf215e5099ff05c686de.zip chromium_src-6b9ec39613fb9fdaa52dcf215e5099ff05c686de.tar.gz chromium_src-6b9ec39613fb9fdaa52dcf215e5099ff05c686de.tar.bz2 |
Fix nested invocation of graphics 2D Flush.
This fixes the Graphics 2D Flush ABORT callback to be a task instead of being
executed in a nested context. Previously, this would cause crashes because you
would get a paint message when destroying the paint manager.
This new way will issue the callback later. In the case of the paint manager,
the scoped callback factory will just drop the callback on the floor.
I added a check in the paint manager code just in case we add future failure
cases, we don't want to continue painting.
BUG=http://crbug.com/108688
Review URL: http://codereview.chromium.org/9404019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122234 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/plugins/ppapi/ppb_graphics_2d_impl.cc')
-rw-r--r-- | webkit/plugins/ppapi/ppb_graphics_2d_impl.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc b/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc index 9be560a..9c8b2f3 100644 --- a/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc +++ b/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc @@ -202,10 +202,8 @@ void PPB_Graphics2D_Impl::LastPluginRefWasDeleted() { Resource::LastPluginRefWasDeleted(); // Abort any pending callbacks. - if (!unpainted_flush_callback_.is_null()) - unpainted_flush_callback_.Execute(PP_ERROR_ABORTED); - if (!painted_flush_callback_.is_null()) - painted_flush_callback_.Execute(PP_ERROR_ABORTED); + unpainted_flush_callback_.PostAbort(); + painted_flush_callback_.PostAbort(); } PP_Bool PPB_Graphics2D_Impl::Describe(PP_Size* size, |