script: Finish converting all error message enum variants to Option<String> (#40750)

I used find and replace to finish the job. All this PR does is replace
all `Error::<error_name>` occurrences with `Error::<error_name>(None)`.

Testing: Refactor
Fixes: #39053

Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
This commit is contained in:
Ashwin Naren
2025-11-19 22:20:47 -08:00
committed by GitHub
parent 135bc7de36
commit e0eb23ce18
74 changed files with 796 additions and 714 deletions

View File

@@ -800,7 +800,7 @@ impl HTMLMediaElement {
self.paused.set(true);
// Step 2.2. Take pending play promises and let promises be the result.
self.take_pending_play_promises(Err(Error::Abort));
self.take_pending_play_promises(Err(Error::Abort(None)));
// Step 2.3. Queue a media element task given the media element and the following steps:
let this = Trusted::new(self);
@@ -1703,7 +1703,7 @@ impl HTMLMediaElement {
// Step 7.6.2. Take pending play promises and reject pending play promises with the
// result and an "AbortError" DOMException.
self.take_pending_play_promises(Err(Error::Abort));
self.take_pending_play_promises(Err(Error::Abort(None)));
self.fulfill_in_flight_play_promises(|| ());
}
@@ -2233,7 +2233,7 @@ impl HTMLMediaElement {
// Step 3.2.3. Take pending play promises and reject pending play promises with
// the result and an "AbortError" DOMException.
this.take_pending_play_promises(Err(Error::Abort));
this.take_pending_play_promises(Err(Error::Abort(None)));
this.fulfill_in_flight_play_promises(|| ());
}