Chromium Code Reviews| Index: Source/modules/webgl/WebGLBuffer.cpp |
| diff --git a/Source/modules/webgl/WebGLBuffer.cpp b/Source/modules/webgl/WebGLBuffer.cpp |
| index 4744cd162f998f72a157dd00be8a6df6b074cbf1..de79fe2cd515749dbdb74ca07fc931b9deda96a9 100644 |
| --- a/Source/modules/webgl/WebGLBuffer.cpp |
| +++ b/Source/modules/webgl/WebGLBuffer.cpp |
| @@ -31,9 +31,9 @@ |
| namespace blink { |
| -PassRefPtrWillBeRawPtr<WebGLBuffer> WebGLBuffer::create(WebGLRenderingContextBase* ctx) |
| +WebGLBuffer* WebGLBuffer::create(WebGLRenderingContextBase* ctx) |
| { |
| - return adoptRefWillBeNoop(new WebGLBuffer(ctx)); |
| + return new WebGLBuffer(ctx); |
| } |
| WebGLBuffer::WebGLBuffer(WebGLRenderingContextBase* ctx) |
| @@ -45,15 +45,12 @@ WebGLBuffer::WebGLBuffer(WebGLRenderingContextBase* ctx) |
| WebGLBuffer::~WebGLBuffer() |
| { |
| - // Delete the buffer's platform object. This object will have been |
| - // detached from the WebGLContextGroup if the group object was |
| - // finalized first. With Oilpan not enabled, it always will be, |
| - // but with Oilpan enabled, the WebGLBuffer might end up being |
| - // finalized first. In which case detachment is needed to ensure |
| - // that the platform object is indeed deleted. |
| - // |
| - // To keep the code regular, the trivial detach()ment is always |
| - // performed. |
| + // Delete the buffer's platform object. |
| + // This object will have been detached from the WebGLContextGroup |
| + // if the group object was finalized first, but the WebGLBuffer |
| + // might end up being finalized first. |
| + // In which case detachment is needed to ensure that the platform |
| + // object is indeed deleted. |
|
haraken
2015/08/05 04:12:19
Slightly clearer:
There is no guarantee about the
peria
2015/08/06 05:46:59
Done.
|
| detachAndDeleteObject(); |
| } |