Skip to content

Commit

Permalink
Add WebGLContextObject::traceWrappers, and trace its context.
Browse files Browse the repository at this point in the history
It's not clear to me whether this could be the cause of Issue 671791,
but I can't find any other errors via code inspection.

BUG=671791
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
NOTRY=true

Review-Url: https://codereview.chromium.org/2561733002
Cr-Commit-Position: refs/heads/master@{#437208}
  • Loading branch information
kenrussell authored and Commit bot committed Dec 8, 2016
1 parent e5f335d commit 069f876
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
namespace blink {

WebGLContextObject::WebGLContextObject(WebGLRenderingContextBase* context)
: WebGLObject(context), m_context(context) {}
: WebGLObject(context), m_context(this, context) {}

bool WebGLContextObject::validate(
const WebGLContextGroup*,
Expand All @@ -55,4 +55,9 @@ DEFINE_TRACE(WebGLContextObject) {
WebGLObject::trace(visitor);
}

DEFINE_TRACE_WRAPPERS(WebGLContextObject) {
visitor->traceWrappers(m_context);
WebGLObject::traceWrappers(visitor);
}

} // namespace blink
5 changes: 4 additions & 1 deletion third_party/WebKit/Source/modules/webgl/WebGLContextObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#ifndef WebGLContextObject_h
#define WebGLContextObject_h

#include "bindings/core/v8/TraceWrapperMember.h"
#include "modules/webgl/WebGLObject.h"

namespace blink {
Expand All @@ -43,6 +44,8 @@ class WebGLContextObject : public WebGLObject {

DECLARE_VIRTUAL_TRACE();

DECLARE_VIRTUAL_TRACE_WRAPPERS();

protected:
explicit WebGLContextObject(WebGLRenderingContextBase*);

Expand All @@ -53,7 +56,7 @@ class WebGLContextObject : public WebGLObject {
gpu::gles2::GLES2Interface* getAGLInterface() const final;

private:
Member<WebGLRenderingContextBase> m_context;
TraceWrapperMember<WebGLRenderingContextBase> m_context;
};

} // namespace blink
Expand Down

0 comments on commit 069f876

Please sign in to comment.