Chromium Code Reviews| Index: third_party/WebKit/Source/modules/webgl/WebGLFramebuffer.cpp |
| diff --git a/third_party/WebKit/Source/modules/webgl/WebGLFramebuffer.cpp b/third_party/WebKit/Source/modules/webgl/WebGLFramebuffer.cpp |
| index 9a4b8221b9a2d54dadf53312df978e56eb32787d..305b366fbb608056afd07107627131731cfa6de4 100644 |
| --- a/third_party/WebKit/Source/modules/webgl/WebGLFramebuffer.cpp |
| +++ b/third_party/WebKit/Source/modules/webgl/WebGLFramebuffer.cpp |
| @@ -40,10 +40,13 @@ class WebGLRenderbufferAttachment final |
| static WebGLFramebuffer::WebGLAttachment* create(WebGLRenderbuffer*); |
| DECLARE_VIRTUAL_TRACE(); |
| + DEFINE_INLINE_VIRTUAL_TRACE_WRAPPERS() { |
| + visitor->traceWrappers(m_renderbuffer); |
| + } |
| private: |
| explicit WebGLRenderbufferAttachment(WebGLRenderbuffer*); |
| - WebGLRenderbufferAttachment() {} |
| + WebGLRenderbufferAttachment() : m_renderbuffer(this, nullptr) {} |
| WebGLSharedObject* object() const override; |
| bool isSharedObject(WebGLSharedObject*) const override; |
| @@ -56,7 +59,7 @@ class WebGLRenderbufferAttachment final |
| GLenum target, |
| GLenum attachment) override; |
| - Member<WebGLRenderbuffer> m_renderbuffer; |
| + TraceWrapperMember<WebGLRenderbuffer> m_renderbuffer; |
|
haraken
2016/11/30 14:30:35
How did you notice that these things need to be Tr
Michael Lippautz
2016/11/30 15:09:06
visitChildDOMWrappers on WebGLFrameBuffer and the
|
| }; |
| WebGLFramebuffer::WebGLAttachment* WebGLRenderbufferAttachment::create( |
| @@ -71,7 +74,7 @@ DEFINE_TRACE(WebGLRenderbufferAttachment) { |
| WebGLRenderbufferAttachment::WebGLRenderbufferAttachment( |
| WebGLRenderbuffer* renderbuffer) |
| - : m_renderbuffer(renderbuffer) {} |
| + : m_renderbuffer(this, renderbuffer) {} |
| WebGLSharedObject* WebGLRenderbufferAttachment::object() const { |
| return m_renderbuffer->object() ? m_renderbuffer.get() : 0; |
| @@ -111,13 +114,14 @@ class WebGLTextureAttachment final : public WebGLFramebuffer::WebGLAttachment { |
| GLint layer); |
| DECLARE_VIRTUAL_TRACE(); |
| + DEFINE_INLINE_VIRTUAL_TRACE_WRAPPERS() { visitor->traceWrappers(m_texture); } |
| private: |
| WebGLTextureAttachment(WebGLTexture*, |
| GLenum target, |
| GLint level, |
| GLint layer); |
| - WebGLTextureAttachment() {} |
| + WebGLTextureAttachment() : m_texture(this, nullptr) {} |
| WebGLSharedObject* object() const override; |
| bool isSharedObject(WebGLSharedObject*) const override; |
| @@ -130,7 +134,7 @@ class WebGLTextureAttachment final : public WebGLFramebuffer::WebGLAttachment { |
| GLenum target, |
| GLenum attachment) override; |
| - Member<WebGLTexture> m_texture; |
| + TraceWrapperMember<WebGLTexture> m_texture; |
| GLenum m_target; |
| GLint m_level; |
| GLint m_layer; |
| @@ -153,7 +157,10 @@ WebGLTextureAttachment::WebGLTextureAttachment(WebGLTexture* texture, |
| GLenum target, |
| GLint level, |
| GLint layer) |
| - : m_texture(texture), m_target(target), m_level(level), m_layer(layer) {} |
| + : m_texture(this, texture), |
| + m_target(target), |
| + m_level(level), |
| + m_layer(layer) {} |
| WebGLSharedObject* WebGLTextureAttachment::object() const { |
| return m_texture->object() ? m_texture.get() : 0; |