Index: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp |
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp |
index 2844f45682b8ab3a4195f816f74bd025998e89e4..de9f4f667a8a94ad08b6cfbfcb129cafa9c1f764 100644 |
--- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp |
+++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp |
@@ -27,6 +27,7 @@ |
#include "bindings/core/v8/ExceptionMessages.h" |
#include "bindings/core/v8/ExceptionState.h" |
+#include "bindings/core/v8/ScriptWrappableVisitor.h" |
#include "bindings/core/v8/V8BindingMacros.h" |
#include "bindings/modules/v8/HTMLCanvasElementOrOffscreenCanvas.h" |
#include "bindings/modules/v8/WebGLAny.h" |
@@ -1136,6 +1137,7 @@ void WebGLRenderingContextBase::initializeNewContext() { |
addContextObject(m_defaultVertexArrayObject.get()); |
m_boundVertexArrayObject = m_defaultVertexArrayObject; |
+ ScriptWrappableVisitor::writeBarrier(this, m_boundVertexArrayObject); |
m_vertexAttribType.resize(m_maxVertexAttribs); |
@@ -1661,6 +1663,7 @@ bool WebGLRenderingContextBase::validateAndUpdateBufferBindTarget( |
switch (target) { |
case GL_ARRAY_BUFFER: |
m_boundArrayBuffer = buffer; |
+ ScriptWrappableVisitor::writeBarrier(this, m_boundArrayBuffer); |
break; |
case GL_ELEMENT_ARRAY_BUFFER: |
m_boundVertexArrayObject->setElementArrayBuffer(buffer); |
@@ -1728,6 +1731,7 @@ void WebGLRenderingContextBase::bindRenderbuffer( |
return; |
} |
m_renderbufferBinding = renderBuffer; |
+ ScriptWrappableVisitor::writeBarrier(this, m_renderbufferBinding); |
contextGL()->BindRenderbuffer(target, objectOrZero(renderBuffer)); |
drawingBuffer()->setRenderbufferBinding(objectOrZero(renderBuffer)); |
@@ -1767,6 +1771,7 @@ void WebGLRenderingContextBase::bindTexture(GLenum target, |
synthesizeGLError(GL_INVALID_ENUM, "bindTexture", "invalid target"); |
return; |
} |
+ ScriptWrappableVisitor::writeBarrier(this, texture); |
contextGL()->BindTexture(target, objectOrZero(texture)); |
if (texture) { |
@@ -2219,6 +2224,7 @@ void WebGLRenderingContextBase::setBoundVertexArrayObject( |
m_boundVertexArrayObject = arrayObject; |
else |
m_boundVertexArrayObject = m_defaultVertexArrayObject; |
+ ScriptWrappableVisitor::writeBarrier(this, m_boundVertexArrayObject); |
} |
WebGLShader* WebGLRenderingContextBase::createShader(GLenum type) { |
@@ -5722,6 +5728,7 @@ void WebGLRenderingContextBase::useProgram(WebGLProgram* program) { |
if (m_currentProgram) |
m_currentProgram->onDetached(contextGL()); |
m_currentProgram = program; |
+ ScriptWrappableVisitor::writeBarrier(this, m_currentProgram); |
contextGL()->UseProgram(objectOrZero(program)); |
if (program) |
program->onAttached(); |
@@ -7406,6 +7413,7 @@ void WebGLRenderingContextBase::setFramebuffer(GLenum target, |
if (target == GL_FRAMEBUFFER || target == GL_DRAW_FRAMEBUFFER) { |
m_framebufferBinding = buffer; |
+ ScriptWrappableVisitor::writeBarrier(this, m_framebufferBinding); |
applyStencilTest(); |
} |
drawingBuffer()->setFramebufferBinding( |