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..43a21d07479d0ad0289716bbf0e9cc386ce2d2f4 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) {} |
|
Michael Lippautz
2016/11/30 21:07:37
I think this ctor is unused and doesn't make much
haraken
2016/12/01 01:44:14
Yeah, let's remove.
|
| 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; |
| }; |
| 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) {} |
|
Michael Lippautz
2016/11/30 21:07:37
Same here?
haraken
2016/12/01 01:44:14
Remove?
|
| 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; |
| @@ -551,7 +558,7 @@ DEFINE_TRACE(WebGLFramebuffer) { |
| DEFINE_TRACE_WRAPPERS(WebGLFramebuffer) { |
| for (const auto& attachment : m_attachments) { |
| - visitor->traceWrappers(attachment.value->object()); |
| + visitor->traceWrappers(attachment.value); |
| } |
| WebGLContextObject::traceWrappers(visitor); |
| } |