mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Bug 1224596 part 16. Switch Fetch to using the new WorkerMainThreadRunnable::Dispatch signature. r=bkelly
This commit is contained in:
parent
58f083c12c
commit
68dc1d9878
@ -976,8 +976,14 @@ FetchBody<Derived>::ContinueConsumeBody(nsresult aStatus, uint32_t aResultLength
|
||||
// FetchBody on the main thread.
|
||||
RefPtr<CancelPumpRunnable<Derived>> r =
|
||||
new CancelPumpRunnable<Derived>(this);
|
||||
if (!r->Dispatch(mWorkerPrivate->GetJSContext())) {
|
||||
ErrorResult rv;
|
||||
r->Dispatch(rv);
|
||||
if (rv.Failed()) {
|
||||
NS_WARNING("Could not dispatch CancelPumpRunnable. Nothing we can do here");
|
||||
// None of our callers are callled directly from JS, so there is no
|
||||
// point in trying to propagate this failure out of here. And
|
||||
// localPromise is already rejected. Just suppress the failure.
|
||||
rv.SuppressException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user