Bug 1811538 - Part 3: Remove ErrorResult that became redundant r=smaug
Some spec comments now matches the implementations (as `Perform ! Foo()` means Foo can't fail). This only covers a small part of actual redundant ErrorResult parameters because: 1. This patch stack only covers Promise::CreateFallible and does not cover helper functions e.g. Promise::CreateResolvedWithUndefined. 2. All callback calls still require ErrorResult as the IDL layer uses the existing Promise::Create Differential Revision: https://phabricator.services.mozilla.com/D167701
This commit is contained in:
@@ -382,10 +382,7 @@ already_AddRefed<Promise> FileSystemWritableFileStream::Write(
|
||||
RefPtr<Promise> promise = writer->Write(cx, val, aError);
|
||||
|
||||
// Step 3. Release writer.
|
||||
{
|
||||
IgnoredErrorResult error;
|
||||
writer->ReleaseLock(cx, error);
|
||||
}
|
||||
writer->ReleaseLock(cx);
|
||||
|
||||
// Step 4. Return result.
|
||||
return promise.forget();
|
||||
@@ -423,10 +420,7 @@ already_AddRefed<Promise> FileSystemWritableFileStream::Seek(
|
||||
RefPtr<Promise> promise = writer->Write(cx, val, aError);
|
||||
|
||||
// Step 3. Release writer.
|
||||
{
|
||||
IgnoredErrorResult error;
|
||||
writer->ReleaseLock(cx, error);
|
||||
}
|
||||
writer->ReleaseLock(cx);
|
||||
|
||||
// Step 4. Return result.
|
||||
return promise.forget();
|
||||
@@ -464,10 +458,7 @@ already_AddRefed<Promise> FileSystemWritableFileStream::Truncate(
|
||||
RefPtr<Promise> promise = writer->Write(cx, val, aError);
|
||||
|
||||
// Step 3. Release writer.
|
||||
{
|
||||
IgnoredErrorResult error;
|
||||
writer->ReleaseLock(cx, error);
|
||||
}
|
||||
writer->ReleaseLock(cx);
|
||||
|
||||
// Step 4. Return result.
|
||||
return promise.forget();
|
||||
|
||||
Reference in New Issue
Block a user