mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
refactor: add CanGc as argument to Promise::reject_native (#35640)
Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
This commit is contained in:
parent
3c3b6cfdc4
commit
31199076ec
18 changed files with 148 additions and 136 deletions
|
@ -208,7 +208,7 @@ impl Promise {
|
|||
}
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
pub(crate) fn reject_native<T>(&self, val: &T)
|
||||
pub(crate) fn reject_native<T>(&self, val: &T, can_gc: CanGc)
|
||||
where
|
||||
T: ToJSValConvertible,
|
||||
{
|
||||
|
@ -218,7 +218,7 @@ impl Promise {
|
|||
unsafe {
|
||||
val.to_jsval(*cx, v.handle_mut());
|
||||
}
|
||||
self.reject(cx, v.handle(), CanGc::note());
|
||||
self.reject(cx, v.handle(), can_gc);
|
||||
}
|
||||
|
||||
pub(crate) fn reject_error(&self, error: Error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue