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
This commit is contained in:
parent
e1725bc6d0
commit
a8799f4e4c
@ -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