Bug 736481 - 7/7 - ForceLoseContext should not do anything on already lost context awaiting event - no review, a=blocking-fennec
authorBenoit Jacob <bjacob@mozilla.com>
Sat, 21 Apr 2012 16:48:22 -0400
changeset 95397 dd21fdb6971322b93b7814b9965e139ffcc4d06a
parent 95396 b8bdcf5ef5ce40bca3813a37444fdd9b2fe95805
child 95398 0d48034b460e9822a5e34aecdf26d27152408727
push id886
push userlsblakk@mozilla.com
push dateMon, 04 Jun 2012 19:57:52 +0000
treeherdermozilla-beta@bbd8d5efd6d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersblocking-fennec
bugs736481
milestone14.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 736481 - 7/7 - ForceLoseContext should not do anything on already lost context awaiting event - no review, a=blocking-fennec Sorry for this little no-review patch. I meant to roll this into another of the patches for review and apparently forgot. It's 3 lines and quite trivial.
content/canvas/src/WebGLContext.cpp
--- a/content/canvas/src/WebGLContext.cpp
+++ b/content/canvas/src/WebGLContext.cpp
@@ -1165,16 +1165,19 @@ WebGLContext::MaybeRestoreContext()
             }
             break;
     }
 }
 
 void
 WebGLContext::ForceLoseContext()
 {
+    if (mContextStatus == ContextLostAwaitingEvent)
+        return;
+
     mContextStatus = ContextLostAwaitingEvent;
     // Queue up a task to restore the event.
     SetupContextLossTimer();
     DestroyResourcesAndContext();
 }
 
 void
 WebGLContext::ForceRestoreContext()