| Index: Source/modules/webgl/WebGLQuery.cpp
|
| diff --git a/Source/modules/webgl/WebGLQuery.cpp b/Source/modules/webgl/WebGLQuery.cpp
|
| index a3a7ab940d4bd9de6a6ac6f5ab36c469ae0f3fb0..1c1e113d6faf561b802c0fbcce0ff2ca11ec5310 100644
|
| --- a/Source/modules/webgl/WebGLQuery.cpp
|
| +++ b/Source/modules/webgl/WebGLQuery.cpp
|
| @@ -10,14 +10,20 @@
|
|
|
| namespace blink {
|
|
|
| -WebGLQuery* WebGLQuery::create(WebGL2RenderingContextBase* ctx)
|
| +PassRefPtrWillBeRawPtr<WebGLQuery> WebGLQuery::create(WebGL2RenderingContextBase* ctx)
|
| {
|
| - return new WebGLQuery(ctx);
|
| + return adoptRefWillBeNoop(new WebGLQuery(ctx));
|
| }
|
|
|
| WebGLQuery::~WebGLQuery()
|
| {
|
| - // See the comment in WebGLObject::detachAndDeleteObject().
|
| + // Always call 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();
|
| }
|
|
|
|
|