summaryrefslogtreecommitdiffstats
path: root/dom/canvas/WebGLExtensionInstancedArrays.cpp
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-07-20 18:08:16 +0200
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-07-22 12:21:53 +0200
commitd3406cafff5e5c284f07419043eec4ae810db63a (patch)
tree1b3b6163368fec80db2de01f6648a0c881d15afa /dom/canvas/WebGLExtensionInstancedArrays.cpp
parent0cd2ef552db767ada217c3f61fde65dc5cecc1ef (diff)
downloadUXP-d3406cafff5e5c284f07419043eec4ae810db63a.tar
UXP-d3406cafff5e5c284f07419043eec4ae810db63a.tar.gz
UXP-d3406cafff5e5c284f07419043eec4ae810db63a.tar.lz
UXP-d3406cafff5e5c284f07419043eec4ae810db63a.tar.xz
UXP-d3406cafff5e5c284f07419043eec4ae810db63a.zip
Use WeakPtr for extension parent pointer.
Diffstat (limited to 'dom/canvas/WebGLExtensionInstancedArrays.cpp')
-rw-r--r--dom/canvas/WebGLExtensionInstancedArrays.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/dom/canvas/WebGLExtensionInstancedArrays.cpp b/dom/canvas/WebGLExtensionInstancedArrays.cpp
index 10d0533fe..22b3ec12c 100644
--- a/dom/canvas/WebGLExtensionInstancedArrays.cpp
+++ b/dom/canvas/WebGLExtensionInstancedArrays.cpp
@@ -28,8 +28,10 @@ WebGLExtensionInstancedArrays::DrawArraysInstancedANGLE(GLenum mode,
GLsizei primcount)
{
if (mIsLost) {
- mContext->ErrorInvalidOperation("%s: Extension is lost.",
- "drawArraysInstancedANGLE");
+ if (mContext) {
+ mContext->ErrorInvalidOperation("%s: Extension is lost.",
+ "drawArraysInstancedANGLE");
+ }
return;
}
@@ -44,8 +46,10 @@ WebGLExtensionInstancedArrays::DrawElementsInstancedANGLE(GLenum mode,
GLsizei primcount)
{
if (mIsLost) {
- mContext->ErrorInvalidOperation("%s: Extension is lost.",
- "drawElementsInstancedANGLE");
+ if (mContext) {
+ mContext->ErrorInvalidOperation("%s: Extension is lost.",
+ "drawElementsInstancedANGLE");
+ }
return;
}
@@ -57,8 +61,10 @@ WebGLExtensionInstancedArrays::VertexAttribDivisorANGLE(GLuint index,
GLuint divisor)
{
if (mIsLost) {
- mContext->ErrorInvalidOperation("%s: Extension is lost.",
- "vertexAttribDivisorANGLE");
+ if (mContext) {
+ mContext->ErrorInvalidOperation("%s: Extension is lost.",
+ "vertexAttribDivisorANGLE");
+ }
return;
}