Bug 997121 - Mark CompsoitorOGL MOZ_FINAL to prevent future problems with the virtual call in its destructor. r=bjacob
authorNicolas Silva <nical@mozilla.com>
Mon, 28 Apr 2014 16:10:35 +0200
changeset 180948 ac7f491b04603937a7f725201b6eee627203b947
parent 180947 8008f2e4865e043bf8e0f13b9810d76bcb174de8
child 180949 1c27ec1939264f8deaa6e17c89c2ad752ae64ddb
push id272
push userpvanderbeken@mozilla.com
push dateMon, 05 May 2014 16:31:18 +0000
reviewersbjacob
bugs997121
milestone31.0a1
Bug 997121 - Mark CompsoitorOGL MOZ_FINAL to prevent future problems with the virtual call in its destructor. r=bjacob
gfx/layers/opengl/CompositorOGL.h
--- a/gfx/layers/opengl/CompositorOGL.h
+++ b/gfx/layers/opengl/CompositorOGL.h
@@ -149,17 +149,19 @@ protected:
   void DestroyTextures();
 
   GLenum mTextureTarget;
   RefPtr<gl::GLContext> mGL;
   nsTArray<GLuint> mCreatedTextures;
   nsTArray<GLuint> mUnusedTextures;
 };
 
-class CompositorOGL : public Compositor
+// If you want to make this class not MOZ_FINAL, first remove calls to virtual
+// methods (Destroy) that are made in the destructor.
+class CompositorOGL MOZ_FINAL : public Compositor
 {
   typedef mozilla::gl::GLContext GLContext;
 
   friend class GLManagerCompositor;
 
   std::map<ShaderConfigOGL, ShaderProgramOGL*> mPrograms;
 public:
   CompositorOGL(nsIWidget *aWidget, int aSurfaceWidth = -1, int aSurfaceHeight = -1,