Index: content/renderer/gpu/renderer_gl_context.cc |
diff --git a/content/renderer/gpu/renderer_gl_context.cc b/content/renderer/gpu/renderer_gl_context.cc |
index 6320c80b9bb4aaaea7461b0da175ccc143393a93..255bd13f708cd3f29eae525f7d14bab37e6e5693 100644 |
--- a/content/renderer/gpu/renderer_gl_context.cc |
+++ b/content/renderer/gpu/renderer_gl_context.cc |
@@ -199,6 +199,7 @@ void RendererGLContext::SetContextLostCallback( |
bool RendererGLContext::MakeCurrent(RendererGLContext* context) { |
if (context) { |
+ DCHECK(context->CalledOnValidThread()); |
gles2::SetGLContext(context->gles2_implementation_); |
// Don't request latest error status from service. Just use the locally |
@@ -290,6 +291,7 @@ bool RendererGLContext::Initialize(bool onscreen, |
const char* allowed_extensions, |
const int32* attrib_list, |
const GURL& active_url) { |
+ DCHECK(CalledOnValidThread()); |
DCHECK(size.width() >= 0 && size.height() >= 0); |
TRACE_EVENT2("gpu", "RendererGLContext::Initialize", |
"on_screen", onscreen, "num_pixels", size.GetArea()); |
@@ -413,6 +415,7 @@ bool RendererGLContext::Initialize(bool onscreen, |
void RendererGLContext::Destroy() { |
TRACE_EVENT0("gpu", "RendererGLContext::Destroy"); |
+ DCHECK(CalledOnValidThread()); |
SetParent(NULL); |
if (gles2_implementation_) { |