mirror of
https://github.com/servo/servo
synced 2026-05-03 12:52:25 +02:00
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:
@@ -511,7 +511,7 @@ impl HTMLCanvasElementMethods<crate::DomTypeHolder> for HTMLCanvasElement {
|
||||
// Step 1: If this canvas element's bitmap's origin-clean flag is set to false,
|
||||
// then throw a "SecurityError" DOMException.
|
||||
if !self.origin_is_clean() {
|
||||
return Err(Error::Security);
|
||||
return Err(Error::Security(None));
|
||||
}
|
||||
|
||||
// Step 2: If this canvas element's bitmap has no pixels (i.e. either its
|
||||
@@ -562,7 +562,7 @@ impl HTMLCanvasElementMethods<crate::DomTypeHolder> for HTMLCanvasElement {
|
||||
// If this canvas element's bitmap's origin-clean flag is set to false, then throw a
|
||||
// "SecurityError" DOMException.
|
||||
if !self.origin_is_clean() {
|
||||
return Err(Error::Security);
|
||||
return Err(Error::Security(None));
|
||||
}
|
||||
|
||||
// Step 2. Let result be null.
|
||||
|
||||
Reference in New Issue
Block a user