Bug 929506 - Check that the GLContext is not destroyed in MakeCurrent. r=bjacob
☠☠ backed out by 7cfdbd447930 ☠ ☠
authorNicolas Silva <nical@mozilla.com>
Thu, 21 Nov 2013 22:58:32 +0100
changeset 156936 7c27af05042eed7723ee297d5fdf801249505308
parent 156935 763bcda2802fba78ffe34d2ac5791a9ceaec19ce
child 156937 f08ab0578efb9643a39bdfcfbf9e0b387229d674
push id36580
push usernsilva@mozilla.com
push dateThu, 21 Nov 2013 21:58:45 +0000
treeherdermozilla-inbound@7c27af05042e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbjacob
bugs929506
milestone28.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 929506 - Check that the GLContext is not destroyed in MakeCurrent. r=bjacob
gfx/gl/GLContext.h
--- a/gfx/gl/GLContext.h
+++ b/gfx/gl/GLContext.h
@@ -2380,16 +2380,19 @@ public:
 
 #ifdef DEBUG
     static void StaticInit() {
         PR_NewThreadPrivateIndex(&sCurrentGLContextTLS, nullptr);
     }
 #endif
 
     bool MakeCurrent(bool aForce = false) {
+        if (IsDestroyed()) {
+            return false;
+        }
 #ifdef DEBUG
     PR_SetThreadPrivate(sCurrentGLContextTLS, this);
 
     // XXX this assertion is disabled because it's triggering on Mac;
     // we need to figure out why and reenable it.
 #if 0
         // IsOwningThreadCurrent is a bit of a misnomer;
         // the "owning thread" is the creation thread,