Bug 1115214 - Fetch API: Always consume body asynchronously. r=baku

--HG--
extra : rebase_source : a6957286f500278ab5a55770b453a21244e9befa
extra : amend_source : aaaff1a0af422a046b4b3a116593a911cbcacef9
This commit is contained in:
Nikhil Marathe 2014-12-23 21:47:17 -08:00
parent e40c6c6f27
commit fe3cd21f51

View File

@ -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;
}
/*