Bug 1300658 P6 Fix one place XHR used NS_DispatchToMainThread() directly from a worker. r=baku
☠☠ backed out by 6d314f15d679 ☠ ☠
authorBen Kelly <ben@wanderview.com>
Mon, 12 Sep 2016 12:32:21 -0700
changeset 313552 6cf3a60640cf8d9d2f6a0455f3b0a0ef81f204a1
parent 313551 c74062a27462321278453af6640c87b6f26e0382
child 313553 c978746cc2cbb2a2c662e854095686ba2105ba5a
push id81654
push userbkelly@mozilla.com
push dateMon, 12 Sep 2016 19:32:28 +0000
treeherdermozilla-inbound@6cf3a60640cf [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
@@ -1608,17 +1608,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++;