mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1224596 part 10. Switch DataStoreCursor to using the new WorkerMainThreadRunnable::Dispatch signature. r=khuey
This commit is contained in:
parent
48e98c27f5
commit
fe9eca907c
@ -89,16 +89,15 @@ public:
|
||||
PromiseWorkerProxy::Create(aWorkerPrivate, aWorkerPromise);
|
||||
}
|
||||
|
||||
bool Dispatch(JSContext* aCx)
|
||||
void Dispatch(ErrorResult& aRv)
|
||||
{
|
||||
if (mPromiseWorkerProxy) {
|
||||
return DataStoreCursorRunnable::Dispatch(aCx);
|
||||
DataStoreCursorRunnable::Dispatch(aRv);
|
||||
}
|
||||
|
||||
// If the creation of mProxyWorkerProxy failed, the worker is terminating.
|
||||
// In this case we don't want to dispatch the runnable and we should stop
|
||||
// the promise chain here.
|
||||
return true;
|
||||
}
|
||||
|
||||
protected:
|
||||
@ -173,7 +172,10 @@ WorkerDataStoreCursor::Next(JSContext* aCx, ErrorResult& aRv)
|
||||
mBackingCursor,
|
||||
promise,
|
||||
aRv);
|
||||
runnable->Dispatch(aCx);
|
||||
runnable->Dispatch(aRv);
|
||||
if (aRv.Failed()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return promise.forget();
|
||||
}
|
||||
@ -187,7 +189,7 @@ WorkerDataStoreCursor::Close(JSContext* aCx, ErrorResult& aRv)
|
||||
|
||||
RefPtr<DataStoreCursorCloseRunnable> runnable =
|
||||
new DataStoreCursorCloseRunnable(workerPrivate, mBackingCursor, aRv);
|
||||
runnable->Dispatch(aCx);
|
||||
runnable->Dispatch(aRv);
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user