Closed Bug 997121 Opened 5 years ago Closed 5 years ago
OGL is making a virtual call in its destructor
Which is not really a bug, but is prone to cause some if/when we subclass it. I propose that we always call Compositor::Destroy manually and just assert in the destructor that the CompositorOGL has been destroyed.
That sounds pretty bad. Is CompositorOGL final?
(In reply to Benoit Jacob [:bjacob] from comment #1) > That sounds pretty bad. Is CompositorOGL final? Nope. We could make it final but that won't prevent sonmeone from removing final in the future if we need to have, say, a CompositorOGLOptimizedForPlatformX subclass. So i'd rather move out the virtual call than marking the class final.
I agree that final is not enough, and not as good as what you propose. But given that at the moment the destructor is making virtual calls, I would like this class to be final.
I don't have time to work on a better solution, so for now let's just mark CompositorOGL MOZ_FINAL with a comment explaining why. If someone want a better solution, feel free to hijack this bug or file a new one.
Attachment #8413744 - Flags: review?(bjacob)
Attachment #8413744 - Flags: review?(bjacob) → review+
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
You need to log in before you can comment on or make changes to this bug.