Bug 1630304: Remove invalid assertion in CanvasThreadHolder::StaticRelease. r=mattwoodrow
authorBob Owen <bobowencode@gmail.com>
Fri, 17 Apr 2020 04:56:35 +0000
changeset 524554 bf118a2f538a7e0c203cb63710edc6f6a77617f1
parent 524553 458f9c1098bced8d78d106d0b8ff958bd1e2531d
child 524555 60f939d5d3bc56097df7ee60bd58703b75969e53
push id37323
push userdluca@mozilla.com
push dateFri, 17 Apr 2020 16:25:55 +0000
treeherdermozilla-central@b4b1d6f91ef0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs1630304
milestone77.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 1630304: Remove invalid assertion in CanvasThreadHolder::StaticRelease. r=mattwoodrow TaskQueues hold onto their nsIEventTarget (in this case mCanvasWorkers) until after they resolve their shutdown promise, which is what causes CanvasThreadHolder::StaticRelease to be submitted to the compositor thread. So this assertion can't be guaranteed. Differential Revision: https://phabricator.services.mozilla.com/D71176
gfx/layers/ipc/CanvasThread.cpp
--- a/gfx/layers/ipc/CanvasThread.cpp
+++ b/gfx/layers/ipc/CanvasThread.cpp
@@ -76,21 +76,16 @@ void CanvasThreadHolder::StaticRelease(
   // Note we can't just use NS_IsInCompositorThread() here because
   // sCompositorThreadHolder might have already gone.
   MOZ_ASSERT(threadHolder->mCompositorThreadKeepAlive->GetCompositorThread()
                  ->thread_id() == PlatformThread::CurrentId());
   threadHolder = nullptr;
 
   auto lockedCanvasThreadHolder = sCanvasThreadHolder.Lock();
   if (lockedCanvasThreadHolder.ref()->mRefCnt == 1) {
-    MOZ_ASSERT(lockedCanvasThreadHolder.ref()
-                       ->mCanvasWorkers.forget()
-                       .take()
-                       ->Release() == 0,
-               "There should be no other references to mCanvasWorkers.");
     lockedCanvasThreadHolder.ref() = nullptr;
   }
 }
 
 /* static */
 void CanvasThreadHolder::ReleaseOnCompositorThread(
     already_AddRefed<CanvasThreadHolder> aCanvasThreadHolder) {
   auto lockedCanvasThreadHolder = sCanvasThreadHolder.Lock();