mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1115214 - Fetch API: Always consume body asynchronously. r=baku
--HG-- extra : rebase_source : a6957286f500278ab5a55770b453a21244e9befa extra : amend_source : aaaff1a0af422a046b4b3a116593a911cbcacef9
This commit is contained in:
parent
e40c6c6f27
commit
fe3cd21f51
@ -947,18 +947,13 @@ FetchBody<Derived>::BeginConsumeBody()
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
if (NS_IsMainThread()) {
|
||||
BeginConsumeBodyMainThread();
|
||||
return NS_OK;
|
||||
} else {
|
||||
nsRefPtr<BeginConsumeBodyRunnable<Derived>> r = new BeginConsumeBodyRunnable<Derived>(this);
|
||||
nsresult rv = NS_DispatchToMainThread(r);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
ReleaseObject();
|
||||
return rv;
|
||||
}
|
||||
return NS_OK;
|
||||
nsCOMPtr<nsIRunnable> r = new BeginConsumeBodyRunnable<Derived>(this);
|
||||
nsresult rv = NS_DispatchToMainThread(r);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
ReleaseObject();
|
||||
return rv;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user