mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
refactor: add CanGc as argument to Promise::reject_error (#35646)
Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
This commit is contained in:
parent
c844ed232a
commit
38b71087bd
43 changed files with 323 additions and 249 deletions
|
@ -1220,7 +1220,7 @@ impl HTMLMediaElement {
|
|||
for promise in &*promises {
|
||||
match result {
|
||||
Ok(ref value) => promise.resolve_native(value, CanGc::note()),
|
||||
Err(ref error) => promise.reject_error(error.clone()),
|
||||
Err(ref error) => promise.reject_error(error.clone(), CanGc::note()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2195,7 +2195,7 @@ impl HTMLMediaElementMethods<crate::DomTypeHolder> for HTMLMediaElement {
|
|||
.get()
|
||||
.is_some_and(|e| e.Code() == MEDIA_ERR_SRC_NOT_SUPPORTED)
|
||||
{
|
||||
promise.reject_error(Error::NotSupported);
|
||||
promise.reject_error(Error::NotSupported, can_gc);
|
||||
return promise;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue