diff options
Diffstat (limited to 'webkit/glue/plugins')
-rw-r--r-- | webkit/glue/plugins/pepper_device_context_2d.cc | 4 | ||||
-rw-r--r-- | webkit/glue/plugins/pepper_device_context_2d.h | 3 | ||||
-rw-r--r-- | webkit/glue/plugins/pepper_webplugin_impl.cc | 6 |
3 files changed, 7 insertions, 6 deletions
diff --git a/webkit/glue/plugins/pepper_device_context_2d.cc b/webkit/glue/plugins/pepper_device_context_2d.cc index 0ccba5c..964c605 100644 --- a/webkit/glue/plugins/pepper_device_context_2d.cc +++ b/webkit/glue/plugins/pepper_device_context_2d.cc @@ -75,10 +75,10 @@ const PPB_DeviceContext2D* DeviceContext2D::GetInterface() { } bool DeviceContext2D::Init(int width, int height) { - image_data_.reset(new ImageData(module())); + image_data_ = new ImageData(module()); if (!image_data_->Init(PP_IMAGEDATAFORMAT_BGRA_PREMUL, width, height) || !image_data_->Map()) { - image_data_.reset(); + image_data_ = NULL; return false; } diff --git a/webkit/glue/plugins/pepper_device_context_2d.h b/webkit/glue/plugins/pepper_device_context_2d.h index 8f40692..5e8a877 100644 --- a/webkit/glue/plugins/pepper_device_context_2d.h +++ b/webkit/glue/plugins/pepper_device_context_2d.h @@ -6,7 +6,6 @@ #define WEBKIT_GLUE_PLUGINS_PEPPER_DEVICE_CONTEXT_2D_H_ #include "base/basictypes.h" -#include "base/scoped_ptr.h" #include "third_party/ppapi/c/ppb_device_context_2d.h" #include "third_party/WebKit/WebKit/chromium/public/WebCanvas.h" #include "webkit/glue/plugins/pepper_resource.h" @@ -48,7 +47,7 @@ class DeviceContext2D : public Resource { const gfx::Rect& paint_rect); private: - scoped_ptr<ImageData> image_data_; + scoped_refptr<ImageData> image_data_; DISALLOW_COPY_AND_ASSIGN(DeviceContext2D); }; diff --git a/webkit/glue/plugins/pepper_webplugin_impl.cc b/webkit/glue/plugins/pepper_webplugin_impl.cc index fa20107..990a885 100644 --- a/webkit/glue/plugins/pepper_webplugin_impl.cc +++ b/webkit/glue/plugins/pepper_webplugin_impl.cc @@ -59,8 +59,10 @@ bool WebPluginImpl::initialize(WebPluginContainer* container) { void WebPluginImpl::destroy() { container_ = NULL; - instance_->Delete(); - instance_ = NULL; + if (instance_) { + instance_->Delete(); + instance_ = NULL; + } MessageLoop::current()->DeleteSoon(FROM_HERE, this); } |