| Index: Source/modules/webgl/WebGLTexture.cpp
|
| diff --git a/Source/modules/webgl/WebGLTexture.cpp b/Source/modules/webgl/WebGLTexture.cpp
|
| index 16b651875b1ab555d8a3a9da1afc1fecb2a02618..345e62345754cc58f916581a8f756e7b98ab0f21 100644
|
| --- a/Source/modules/webgl/WebGLTexture.cpp
|
| +++ b/Source/modules/webgl/WebGLTexture.cpp
|
| @@ -31,9 +31,9 @@
|
|
|
| namespace blink {
|
|
|
| -WebGLTexture* WebGLTexture::create(WebGLRenderingContextBase* ctx)
|
| -{
|
| - return new WebGLTexture(ctx);
|
| +PassRefPtrWillBeRawPtr<WebGLTexture> WebGLTexture::create(WebGLRenderingContextBase* ctx)
|
| +{
|
| + return adoptRefWillBeNoop(new WebGLTexture(ctx));
|
| }
|
|
|
| WebGLTexture::WebGLTexture(WebGLRenderingContextBase* ctx)
|
| @@ -60,7 +60,13 @@
|
|
|
| WebGLTexture::~WebGLTexture()
|
| {
|
| - // See the comment in WebGLObject::detachAndDeleteObject().
|
| + // Always perform detach here to ensure that platform object
|
| + // deletion happens with Oilpan enabled. It keeps the code regular
|
| + // to do it with or without Oilpan enabled.
|
| + //
|
| + // See comment in WebGLBuffer's destructor for additional
|
| + // information on why this is done for WebGLSharedObject-derived
|
| + // objects.
|
| detachAndDeleteObject();
|
| }
|
|
|
|
|