Bug 1316145 - pass DontAssertDispatchSuccess when dispatching events because it is hard to enforce notification happens before AbstractThread shutdown. draft
authorJW Wang <jwwang@mozilla.com>
Fri, 18 Nov 2016 17:50:27 +0800
changeset 441049 66306ce431504169909c83a34859da253049cbc9
parent 441048 267f524c67356fb20a51e62b80768763760c6603
child 537480 09526123899d652b5a0f64133e3d6701a43c103d
push id36343
push userjwwang@mozilla.com
push dateFri, 18 Nov 2016 09:52:16 +0000
bugs1316145
milestone53.0a1
Bug 1316145 - pass DontAssertDispatchSuccess when dispatching events because it is hard to enforce notification happens before AbstractThread shutdown. MozReview-Commit-ID: 2SATSQfdskl
dom/media/MediaEventSource.h
--- a/dom/media/MediaEventSource.h
+++ b/dom/media/MediaEventSource.h
@@ -106,17 +106,17 @@ struct EventTarget<DispatchPolicy::Async
     aTarget->Dispatch(Move(aTask), NS_DISPATCH_NORMAL);
   }
 };
 
 template <>
 struct EventTarget<DispatchPolicy::Async, AbstractThread> {
   static void
   Dispatch(AbstractThread* aTarget, already_AddRefed<nsIRunnable> aTask) {
-    aTarget->Dispatch(Move(aTask));
+    aTarget->Dispatch(Move(aTask), AbstractThread::DontAssertDispatchSuccess);
   }
 };
 
 template <>
 struct EventTarget<DispatchPolicy::Sync, nsIEventTarget> {
   static bool IsOnCurrentThread(nsIEventTarget* aTarget) {
     bool current = false;
     auto rv = aTarget->IsOnCurrentThread(&current);