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

Unified Diff: third_party/WebKit/Source/modules/webgl/WebGLVertexArrayObjectBase.cpp

Issue 2547813002: Remove WebGLObject maps from WebGLRenderingContextBase and WebGLContextGroup. (Closed)
Patch Set: Fixed WebGLContextObject::validate. Made WebGLExtension non-finalized. Created 4 years 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
Index: third_party/WebKit/Source/modules/webgl/WebGLVertexArrayObjectBase.cpp
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLVertexArrayObjectBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGLVertexArrayObjectBase.cpp
index 86a1b2a3870f3f042c41da2298c51040166606bd..ea3fc0817ef1888e64609da794fc68e0454759dc 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLVertexArrayObjectBase.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGLVertexArrayObjectBase.cpp
@@ -16,7 +16,6 @@ WebGLVertexArrayObjectBase::WebGLVertexArrayObjectBase(
m_object(0),
m_type(type),
m_hasEverBeenBound(false),
- m_destructionInProgress(false),
m_boundElementArrayBuffer(this, nullptr),
m_isAllEnabledAttribBufferBound(true) {
m_arrayBufferList.resize(ctx->maxVertexAttribs());
@@ -35,13 +34,7 @@ WebGLVertexArrayObjectBase::WebGLVertexArrayObjectBase(
}
WebGLVertexArrayObjectBase::~WebGLVertexArrayObjectBase() {
- m_destructionInProgress = true;
-
- // Delete the platform framebuffer resource, in case
- // where this vertex array object isn't detached when it and
- // the WebGLRenderingContextBase object it is registered with
- // are both finalized.
- detachAndDeleteObject();
+ runDestructor();
}
void WebGLVertexArrayObjectBase::dispatchDetached(
@@ -70,7 +63,7 @@ void WebGLVertexArrayObjectBase::deleteObjectImpl(
// since they could have been already finalized.
// The finalizers of these objects will handle their detachment
// by themselves.
- if (!m_destructionInProgress)
+ if (!destructionInProgress())
dispatchDetached(gl);
}

Powered by Google App Engine
This is Rietveld 408576698