Index: Source/core/html/canvas/WebGLSampler.cpp |
diff --git a/Source/core/html/canvas/WebGLSampler.cpp b/Source/core/html/canvas/WebGLSampler.cpp |
index 211c2e3f2bef60964f3e8af99ee61879f4c65bf1..d03c65f1205ac8556a9e18ea799ea653746c6fce 100644 |
--- a/Source/core/html/canvas/WebGLSampler.cpp |
+++ b/Source/core/html/canvas/WebGLSampler.cpp |
@@ -17,7 +17,14 @@ PassRefPtrWillBeRawPtr<WebGLSampler> WebGLSampler::create(WebGL2RenderingContext |
WebGLSampler::~WebGLSampler() |
{ |
- deleteObject(0); |
+ // 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(); |
} |
WebGLSampler::WebGLSampler(WebGL2RenderingContextBase* ctx) |