summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
Diffstat (limited to 'webkit')
-rw-r--r--webkit/plugins/ppapi/ppapi_plugin_instance.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.cc b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
index a405e23..4bf6475 100644
--- a/webkit/plugins/ppapi/ppapi_plugin_instance.cc
+++ b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
@@ -1614,6 +1614,9 @@ void PluginInstance::ClosePendingUserGesture(PP_Instance instance,
PP_Bool PluginInstance::BindGraphics(PP_Instance instance,
PP_Resource device) {
+ // The Graphics3D instance can't be destroyed until we call
+ // setBackingTextureId.
+ scoped_refptr< ::ppapi::Resource> old_graphics = bound_graphics_;
if (bound_graphics_.get()) {
if (GetBoundGraphics2D()) {
GetBoundGraphics2D()->BindToInstance(NULL);