mirror of
https://github.com/servo/servo.git
synced 2025-09-30 16:49:16 +01:00
script: Add message to NotFoundError (#39394)
Adding an optional message to be attached to a NotFoundError. Testing: Just a refactor Part of #39053 --------- Signed-off-by: Rodion Borovyk <rodion.borovyk@gmail.com>
This commit is contained in:
parent
ffdb7d3663
commit
9713bb9e1b
18 changed files with 37 additions and 38 deletions
|
@ -84,7 +84,7 @@ impl Callback for RepresentationDataPromiseRejectionHandler {
|
|||
/// Substeps of 8.1.2.2 If representationDataPromise was rejected, then:
|
||||
fn callback(&self, _cx: SafeJSContext, _v: SafeHandleValue, _realm: InRealm, can_gc: CanGc) {
|
||||
// 1. Reject p with "NotFoundError" DOMException in realm.
|
||||
self.promise.reject_error(Error::NotFound, can_gc);
|
||||
self.promise.reject_error(Error::NotFound(None), can_gc);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -299,7 +299,7 @@ impl ClipboardItemMethods<crate::DomTypeHolder> for ClipboardItem {
|
|||
}
|
||||
|
||||
// Step 9 Reject p with "NotFoundError" DOMException in realm.
|
||||
p.reject_error(Error::NotFound, can_gc);
|
||||
p.reject_error(Error::NotFound(None), can_gc);
|
||||
|
||||
// Step 10 Return p.
|
||||
Ok(p)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue