summaryrefslogtreecommitdiffstats
path: root/webkit/plugins
diff options
context:
space:
mode:
authorpiman@google.com <piman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-09 23:59:42 +0000
committerpiman@google.com <piman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-09 23:59:42 +0000
commitd4ec4542025fd80ec98a11938359fb0f8c6381b3 (patch)
treed35dc23ee442477fc9cb5f11c77616916cf61519 /webkit/plugins
parentcaae02f1e23401472e993d1756ef447ad1e4e748 (diff)
downloadchromium_src-d4ec4542025fd80ec98a11938359fb0f8c6381b3.zip
chromium_src-d4ec4542025fd80ec98a11938359fb0f8c6381b3.tar.gz
chromium_src-d4ec4542025fd80ec98a11938359fb0f8c6381b3.tar.bz2
Merge 84689 - Don't send Graphics3DContextLost after the instance is destroyed
BUG=chromium-os:15057 TEST=manual Review URL: http://codereview.chromium.org/6969011 TBR=piman@google.com Review URL: http://codereview.chromium.org/6999002 git-svn-id: svn://svn.chromium.org/chrome/branches/742/src@84717 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/plugins')
-rw-r--r--webkit/plugins/ppapi/ppb_surface_3d_impl.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/webkit/plugins/ppapi/ppb_surface_3d_impl.cc b/webkit/plugins/ppapi/ppb_surface_3d_impl.cc
index b735c1d..f90591f 100644
--- a/webkit/plugins/ppapi/ppb_surface_3d_impl.cc
+++ b/webkit/plugins/ppapi/ppb_surface_3d_impl.cc
@@ -192,6 +192,11 @@ void PPB_Surface3D_Impl::OnContextLost() {
}
void PPB_Surface3D_Impl::SendContextLost() {
+ // By the time we run this, the instance may have been deleted, or in the
+ // process of being deleted. Even in the latter case, we don't want to send a
+ // callback after DidDestroy.
+ if (!instance() || !instance()->container())
+ return;
const PPP_Graphics3D_Dev* ppp_graphics_3d =
static_cast<const PPP_Graphics3D_Dev*>(
instance()->module()->GetPluginInterface(