mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +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
|
@ -221,12 +221,12 @@ impl Promise {
|
|||
self.reject(cx, v.handle(), can_gc);
|
||||
}
|
||||
|
||||
pub(crate) fn reject_error(&self, error: Error) {
|
||||
pub(crate) fn reject_error(&self, error: Error, can_gc: CanGc) {
|
||||
let cx = GlobalScope::get_cx();
|
||||
let _ac = enter_realm(self);
|
||||
rooted!(in(*cx) let mut v = UndefinedValue());
|
||||
error.to_jsval(cx, &self.global(), v.handle_mut());
|
||||
self.reject(cx, v.handle(), CanGc::note());
|
||||
self.reject(cx, v.handle(), can_gc);
|
||||
}
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue