| Index: Source/core/html/canvas/WebGLTexture.cpp
|
| diff --git a/Source/core/html/canvas/WebGLTexture.cpp b/Source/core/html/canvas/WebGLTexture.cpp
|
| index c2c8929777e371a661e0636822dee91bfd7d4c7e..e290aefecebd9f7c03ff4fcecb6fae510ace5299 100644
|
| --- a/Source/core/html/canvas/WebGLTexture.cpp
|
| +++ b/Source/core/html/canvas/WebGLTexture.cpp
|
| @@ -31,9 +31,9 @@
|
|
|
| namespace blink {
|
|
|
| -PassRefPtr<WebGLTexture> WebGLTexture::create(WebGLRenderingContextBase* ctx)
|
| +PassRefPtrWillBeRawPtr<WebGLTexture> WebGLTexture::create(WebGLRenderingContextBase* ctx)
|
| {
|
| - return adoptRef(new WebGLTexture(ctx));
|
| + return adoptRefWillBeNoop(new WebGLTexture(ctx));
|
| }
|
|
|
| WebGLTexture::WebGLTexture(WebGLRenderingContextBase* ctx)
|
| @@ -56,7 +56,14 @@ WebGLTexture::WebGLTexture(WebGLRenderingContextBase* ctx)
|
|
|
| WebGLTexture::~WebGLTexture()
|
| {
|
| - deleteObject(0);
|
| + // 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();
|
| }
|
|
|
| void WebGLTexture::setTarget(GLenum target, GLint maxLevel)
|
|
|