Bug 1348732 - Let EventSource correctly fallback to main thread when retargeting to worker thread failed. r=baku

MozReview-Commit-ID: EUqzAKfeRZA
This commit is contained in:
Stone Shih
2017-03-20 16:53:41 +08:00
parent 8dcd278c86
commit 53e82d368d

View File

@@ -689,7 +689,9 @@ EventSourceImpl::OnStartRequest(nsIRequest* aRequest, nsISupports* aCtxt)
nsCOMPtr<nsIThreadRetargetableRequest> rr = do_QueryInterface(httpChannel);
if (rr) {
rv = rr->RetargetDeliveryTo(this);
NS_ENSURE_SUCCESS(rv, rv);
if (NS_WARN_IF(NS_FAILED(rv))) {
NS_WARNING("Retargeting failed");
}
}
}
rv = Dispatch(NewRunnableMethod(this, &EventSourceImpl::AnnounceConnection),