mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1224596 part 4. Switch WebSocket to using the new WorkerMainThreadRunnable::Dispatch signature. r=khuey
This commit is contained in:
parent
f33b314349
commit
63fa1800e8
@ -336,7 +336,13 @@ WebSocketImpl::PrintErrorOnConsole(const char *aBundleURI,
|
||||
RefPtr<PrintErrorOnConsoleRunnable> runnable =
|
||||
new PrintErrorOnConsoleRunnable(this, aBundleURI, aError, aFormatStrings,
|
||||
aFormatStringsLen);
|
||||
runnable->Dispatch(mWorkerPrivate->GetJSContext());
|
||||
ErrorResult rv;
|
||||
runnable->Dispatch(rv);
|
||||
// XXXbz this seems totally broken. We should be propagating this out, but
|
||||
// none of our callers really propagate anything usefully. Come to think of
|
||||
// it, why is this a syncrunnable anyway? Can't this be a fire-and-forget
|
||||
// runnable??
|
||||
rv.SuppressException();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -617,7 +623,11 @@ WebSocketImpl::Disconnect()
|
||||
} else {
|
||||
RefPtr<DisconnectInternalRunnable> runnable =
|
||||
new DisconnectInternalRunnable(this);
|
||||
runnable->Dispatch(mWorkerPrivate->GetJSContext());
|
||||
ErrorResult rv;
|
||||
runnable->Dispatch(rv);
|
||||
// XXXbz this seems totally broken. We should be propagating this out, but
|
||||
// where to, exactly?
|
||||
rv.SuppressException();
|
||||
}
|
||||
|
||||
// DontKeepAliveAnyMore() can release the object. So hold a reference to this
|
||||
@ -1259,7 +1269,7 @@ WebSocket::Constructor(const GlobalObject& aGlobal,
|
||||
new InitRunnable(webSocket->mImpl, aUrl, protocolArray,
|
||||
nsAutoCString(file.get()), lineno, column, aRv,
|
||||
&connectionFailed);
|
||||
runnable->Dispatch(aGlobal.Context());
|
||||
runnable->Dispatch(aRv);
|
||||
}
|
||||
|
||||
if (NS_WARN_IF(aRv.Failed())) {
|
||||
@ -1339,7 +1349,7 @@ WebSocket::Constructor(const GlobalObject& aGlobal,
|
||||
} else {
|
||||
RefPtr<AsyncOpenRunnable> runnable =
|
||||
new AsyncOpenRunnable(webSocket->mImpl, aRv);
|
||||
runnable->Dispatch(aGlobal.Context());
|
||||
runnable->Dispatch(aRv);
|
||||
}
|
||||
|
||||
if (NS_WARN_IF(aRv.Failed())) {
|
||||
|
Loading…
Reference in New Issue
Block a user