Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1037)

Unified Diff: Source/core/html/canvas/WebGLDebugShaders.cpp

Issue 687533005: Enforce context refrence guards in WebGL extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Switched to using RefPtr Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/canvas/OESVertexArrayObject.cpp ('k') | Source/core/html/canvas/WebGLDrawBuffers.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/canvas/WebGLDebugShaders.cpp
diff --git a/Source/core/html/canvas/WebGLDebugShaders.cpp b/Source/core/html/canvas/WebGLDebugShaders.cpp
index 74719bd6e1e6a3430fa7c7a07ca5d18066bd805e..229d1b3fd30521e198ebe3c3ef5a1b3b5325625d 100644
--- a/Source/core/html/canvas/WebGLDebugShaders.cpp
+++ b/Source/core/html/canvas/WebGLDebugShaders.cpp
@@ -53,11 +53,12 @@ PassRefPtrWillBeRawPtr<WebGLDebugShaders> WebGLDebugShaders::create(WebGLRenderi
String WebGLDebugShaders::getTranslatedShaderSource(WebGLShader* shader)
{
- if (isLost())
+ WebGLExtensionScopedContext scoped(this);
+ if (scoped.isLost())
return String();
- if (!m_context->validateWebGLObject("getTranslatedShaderSource", shader))
+ if (!scoped.context()->validateWebGLObject("getTranslatedShaderSource", shader))
return "";
- return m_context->ensureNotNull(m_context->webContext()->getTranslatedShaderSourceANGLE(shader->object()));
+ return scoped.context()->ensureNotNull(scoped.context()->webContext()->getTranslatedShaderSourceANGLE(shader->object()));
}
bool WebGLDebugShaders::supported(WebGLRenderingContextBase* context)
« no previous file with comments | « Source/core/html/canvas/OESVertexArrayObject.cpp ('k') | Source/core/html/canvas/WebGLDrawBuffers.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698