Bug 1288643 - Add basic ctors for non-macro'd extensions. - r=jerry draft
authorJeff Gilbert <jgilbert@mozilla.com>
Fri, 22 Jul 2016 00:31:51 -0700
changeset 391219 1fb897d1321101ce3c36358a9399eb8b294613e7
parent 391218 47081efb41a65a51b3a9b207cc708fd0690ddf1b
child 391220 e4c1216f414ff3247a43ff5aeeb7232882602e1e
push id23845
push userbmo:jgilbert@mozilla.com
push dateFri, 22 Jul 2016 08:40:49 +0000
reviewersjerry
bugs1288643
milestone50.0a1
Bug 1288643 - Add basic ctors for non-macro'd extensions. - r=jerry MozReview-Commit-ID: 7quOaZsSYBM
dom/canvas/WebGLExtensions.h
--- a/dom/canvas/WebGLExtensions.h
+++ b/dom/canvas/WebGLExtensions.h
@@ -61,28 +61,36 @@ private:
     static bool IsSupported(const WebGLContext*);
 
 ////////////////////////////////////////
 
 class WebGLExtensionDebugShaders final
     : public WebGLExtensionBase
 {
 public:
-    explicit WebGLExtensionDebugShaders(WebGLContext*);
+    explicit WebGLExtensionDebugShaders(WebGLContext* webgl)
+        : WebGLExtensionBase(webgl)
+    {
+        IsSupported(webgl);
+    }
 
     void GetTranslatedShaderSource(WebGLShader* shader, nsAString& retval);
 
     DECL_WEBGL_EXTENSION_GOOP
 };
 
 class WebGLExtensionLoseContext final
     : public WebGLExtensionBase
 {
 public:
-    explicit WebGLExtensionLoseContext(WebGLContext*);
+    explicit WebGLExtensionLoseContext(WebGLContext* webgl)
+        : WebGLExtensionBase(webgl)
+    {
+        IsSupported(webgl);
+    }
 
     void LoseContext();
     void RestoreContext();
 
     DECL_WEBGL_EXTENSION_GOOP
 };
 
 class WebGLExtensionTextureFloat final
@@ -117,31 +125,39 @@ public:
 
     DECL_WEBGL_EXTENSION_GOOP
 };
 
 class WebGLExtensionVertexArray final
     : public WebGLExtensionBase
 {
 public:
-    explicit WebGLExtensionVertexArray(WebGLContext* webgl);
+    explicit WebGLExtensionVertexArray(WebGLContext* webgl)
+        : WebGLExtensionBase(webgl)
+    {
+        IsSupported(webgl);
+    }
 
     already_AddRefed<WebGLVertexArray> CreateVertexArrayOES();
     void DeleteVertexArrayOES(WebGLVertexArray* array);
     bool IsVertexArrayOES(WebGLVertexArray* array);
     void BindVertexArrayOES(WebGLVertexArray* array);
 
     DECL_WEBGL_EXTENSION_GOOP
 };
 
 class WebGLExtensionInstancedArrays final
     : public WebGLExtensionBase
 {
 public:
-    explicit WebGLExtensionInstancedArrays(WebGLContext* webgl);
+    explicit WebGLExtensionInstancedArrays(WebGLContext* webgl)
+        : WebGLExtensionBase(webgl)
+    {
+        IsSupported(webgl);
+    }
 
     void DrawArraysInstancedANGLE(GLenum mode, GLint first, GLsizei count,
                                   GLsizei primcount);
     void DrawElementsInstancedANGLE(GLenum mode, GLsizei count, GLenum type,
                                     WebGLintptr offset, GLsizei primcount);
     void VertexAttribDivisorANGLE(GLuint index, GLuint divisor);
 
     DECL_WEBGL_EXTENSION_GOOP