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

Unified Diff: Source/core/html/canvas/ANGLEInstancedArrays.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 | « no previous file | Source/core/html/canvas/OESVertexArrayObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/canvas/ANGLEInstancedArrays.cpp
diff --git a/Source/core/html/canvas/ANGLEInstancedArrays.cpp b/Source/core/html/canvas/ANGLEInstancedArrays.cpp
index 20012cc6e1c4983c80e22f346364396fff813930..15169ccb4fd278200f8b380760439204d89463ce 100644
--- a/Source/core/html/canvas/ANGLEInstancedArrays.cpp
+++ b/Source/core/html/canvas/ANGLEInstancedArrays.cpp
@@ -68,26 +68,29 @@ const char* ANGLEInstancedArrays::extensionName()
void ANGLEInstancedArrays::drawArraysInstancedANGLE(GLenum mode, GLint first, GLsizei count, GLsizei primcount)
{
- if (isLost())
+ WebGLExtensionScopedContext scoped(this);
+ if (scoped.isLost())
return;
- m_context->drawArraysInstancedANGLE(mode, first, count, primcount);
+ scoped.context()->drawArraysInstancedANGLE(mode, first, count, primcount);
}
void ANGLEInstancedArrays::drawElementsInstancedANGLE(GLenum mode, GLsizei count, GLenum type, long long offset, GLsizei primcount)
{
- if (isLost())
+ WebGLExtensionScopedContext scoped(this);
+ if (scoped.isLost())
return;
- m_context->drawElementsInstancedANGLE(mode, count, type, offset, primcount);
+ scoped.context()->drawElementsInstancedANGLE(mode, count, type, offset, primcount);
}
void ANGLEInstancedArrays::vertexAttribDivisorANGLE(GLuint index, GLuint divisor)
{
- if (isLost())
+ WebGLExtensionScopedContext scoped(this);
+ if (scoped.isLost())
return;
- m_context->vertexAttribDivisorANGLE(index, divisor);
+ scoped.context()->vertexAttribDivisorANGLE(index, divisor);
}
} // namespace blink
« no previous file with comments | « no previous file | Source/core/html/canvas/OESVertexArrayObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698