Chromium Code Reviews| Index: Source/modules/webgl/WebGLProgram.cpp |
| diff --git a/Source/modules/webgl/WebGLProgram.cpp b/Source/modules/webgl/WebGLProgram.cpp |
| index a2c4385869a5e0cfb29ef4ef7448f9ddbd94738d..294baff30dcd004bd9466ba3e580a7baa5a83d5c 100644 |
| --- a/Source/modules/webgl/WebGLProgram.cpp |
| +++ b/Source/modules/webgl/WebGLProgram.cpp |
| @@ -32,9 +32,9 @@ |
| namespace blink { |
| -PassRefPtrWillBeRawPtr<WebGLProgram> WebGLProgram::create(WebGLRenderingContextBase* ctx) |
| +WebGLProgram* WebGLProgram::create(WebGLRenderingContextBase* ctx) |
| { |
| - return adoptRefWillBeNoop(new WebGLProgram(ctx)); |
| + return new WebGLProgram(ctx); |
| } |
| WebGLProgram::WebGLProgram(WebGLRenderingContextBase* ctx) |
| @@ -48,14 +48,6 @@ WebGLProgram::WebGLProgram(WebGLRenderingContextBase* ctx) |
| WebGLProgram::~WebGLProgram() |
| { |
| -#if ENABLE(OILPAN) |
| - // These heap objects handle detachment on their own. Clear out |
| - // the references to prevent deleteObjectImpl() from trying to do |
| - // same, as we cannot safely access other heap objects from this |
| - // destructor. |
| - m_vertexShader = nullptr; |
| - m_fragmentShader = nullptr; |
|
haraken
2015/08/04 00:06:52
You shouldn't remove this. This code is necessary
peria
2015/08/04 09:10:25
Done.
I did not notice they are touched in detachA
|
| -#endif |
| // 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. |
| @@ -120,9 +112,9 @@ WebGLShader* WebGLProgram::getAttachedShader(GLenum type) |
| { |
| switch (type) { |
| case GL_VERTEX_SHADER: |
| - return m_vertexShader.get(); |
| + return m_vertexShader; |
| case GL_FRAGMENT_SHADER: |
| - return m_fragmentShader.get(); |
| + return m_fragmentShader; |
| default: |
| return 0; |
| } |