Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1221)

Unified Diff: Source/modules/webgl/WebGLShader.cpp

Issue 1281953003: Revert of [Oilpan] Migrate classes under module/webgl onto oilpan heap (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/webgl/WebGLShader.h ('k') | Source/modules/webgl/WebGLShader.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webgl/WebGLShader.cpp
diff --git a/Source/modules/webgl/WebGLShader.cpp b/Source/modules/webgl/WebGLShader.cpp
index 6b99d306410d4aacc7bb0e3507e3d33a110cc3cd..45602bc7b3ab030cfc35aa2ae2379765977ad701 100644
--- a/Source/modules/webgl/WebGLShader.cpp
+++ b/Source/modules/webgl/WebGLShader.cpp
@@ -31,9 +31,9 @@
namespace blink {
-WebGLShader* WebGLShader::create(WebGLRenderingContextBase* ctx, GLenum type)
+PassRefPtrWillBeRawPtr<WebGLShader> WebGLShader::create(WebGLRenderingContextBase* ctx, GLenum type)
{
- return new WebGLShader(ctx, type);
+ return adoptRefWillBeNoop(new WebGLShader(ctx, type));
}
WebGLShader::WebGLShader(WebGLRenderingContextBase* ctx, GLenum type)
@@ -46,7 +46,13 @@
WebGLShader::~WebGLShader()
{
- // 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();
}
« no previous file with comments | « Source/modules/webgl/WebGLShader.h ('k') | Source/modules/webgl/WebGLShader.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698