Bug 1300658 P6 Fix one place XHR used NS_DispatchToMainThread() directly from a worker. r=baku
authorBen Kelly <ben@wanderview.com>
Tue, 13 Sep 2016 20:14:02 -0700
changeset 313771 0a3440336fa8958a7e4347ecefa68f3266b33bb0
parent 313770 12ee5e6a9c9d06c102e2f8bb8ad3ed31494d857a
child 313772 f7275e98b63bcf62ea38f38456c71ab28ed058f7
push id81710
push userbkelly@mozilla.com
push dateWed, 14 Sep 2016 03:25:36 +0000
treeherdermozilla-inbound@f7275e98b63b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1300658
milestone51.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 1300658 P6 Fix one place XHR used NS_DispatchToMainThread() directly from a worker. r=baku
dom/xhr/XMLHttpRequestWorker.cpp
--- a/dom/xhr/XMLHttpRequestWorker.cpp
+++ b/dom/xhr/XMLHttpRequestWorker.cpp
@@ -1607,17 +1607,17 @@ XMLHttpRequestWorker::ReleaseProxy(Relea
   if (mProxy) {
     if (aType == XHRIsGoingAway) {
       // We're in a GC finalizer, so we can't do a sync call here (and we don't
       // need to).
       RefPtr<AsyncTeardownRunnable> runnable =
         new AsyncTeardownRunnable(mProxy);
       mProxy = nullptr;
 
-      if (NS_FAILED(NS_DispatchToMainThread(runnable))) {
+      if (NS_FAILED(mWorkerPrivate->DispatchToMainThread(runnable.forget()))) {
         NS_ERROR("Failed to dispatch teardown runnable!");
       }
     } else {
       // This isn't necessary if the worker is going away or the XHR is going
       // away.
       if (aType == Default) {
         // Don't let any more events run.
         mProxy->mOuterEventStreamId++;