Bug 1800342: Make NS_NewPipe2 and NS_NewPipe infallible, to reflect reality. r=xpcom-reviewers,necko-reviewers,nika,kershaw
This patch doesn't change behavior; these APIs were already effectively infallible, in the sense that it was impossible for them to return anything other than NS_OK. The actual API changes here are in xpcom/io/nsIPipe.idl and xpcom/io/nsPipe3.cpp, and the rest of this patch is just updates to callsites, removing code that handled failure-flavored return values from these functions. (All of this removed code was already dead code, effectively.) Differential Revision: https://phabricator.services.mozilla.com/D161947
This commit is contained in:
@@ -64,12 +64,8 @@ nsresult FetchStreamReader::Create(JSContext* aCx, nsIGlobalObject* aGlobal,
|
||||
|
||||
nsCOMPtr<nsIAsyncInputStream> pipeIn;
|
||||
|
||||
nsresult rv =
|
||||
NS_NewPipe2(getter_AddRefs(pipeIn),
|
||||
getter_AddRefs(streamReader->mPipeOut), true, true, 0, 0);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return rv;
|
||||
}
|
||||
NS_NewPipe2(getter_AddRefs(pipeIn), getter_AddRefs(streamReader->mPipeOut),
|
||||
true, true, 0, 0);
|
||||
|
||||
if (!NS_IsMainThread()) {
|
||||
WorkerPrivate* workerPrivate = GetWorkerPrivateFromContext(aCx);
|
||||
|
||||
Reference in New Issue
Block a user