Bug 1345038 - Label runnables in dom/media/imagecapture/CaptureTask.cpp; r=alfredo
authorMunro Mengjue Chiang <mchiang@mozilla.com>
Mon, 13 Mar 2017 18:04:27 +0800
changeset 347468 95c1e899eab6eadae8abc9981dd4dbf4e0ad516d
parent 347467 eb1c6835ffe8a6242d4b24143d4c4beb77821eef
child 347469 b1c8b28b9fa2a8424db940d4b657eb59b3f01ff3
push id31496
push usercbook@mozilla.com
push dateTue, 14 Mar 2017 13:21:57 +0000
treeherdermozilla-central@9a26ed658fdc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersalfredo
bugs1345038
milestone55.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 1345038 - Label runnables in dom/media/imagecapture/CaptureTask.cpp; r=alfredo MozReview-Commit-ID: IHYZsfr6zTm
dom/media/imagecapture/CaptureTask.cpp
--- a/dom/media/imagecapture/CaptureTask.cpp
+++ b/dom/media/imagecapture/CaptureTask.cpp
@@ -186,12 +186,15 @@ CaptureTask::PostTrackEndEvent()
       return NS_OK;
     }
 
   protected:
     RefPtr<CaptureTask> mTask;
   };
 
   IC_LOG("Got MediaStream track removed or finished event.");
-  NS_DispatchToMainThread(new TrackEndRunnable(this));
+  nsCOMPtr<nsIRunnable> event = new TrackEndRunnable(this);
+  SystemGroup::Dispatch("CaptureTask::TaskComplete",
+                        TaskCategory::Other,
+                        event.forget());
 }
 
 } // namespace mozilla