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

This commit is contained in:
Nikhil Marathe 2014-12-23 21:47:17 -08:00
parent e1725bc6d0
commit a8799f4e4c

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