mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
script: add CanGc
argument to Promise::new_resolved
and Promise::new_rejected
(#35605)
* add CanGc to new_resolved and use it where possible Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com> * add CanGc to new_rejected Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com> --------- Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
This commit is contained in:
parent
dd13342f18
commit
adb831eefe
8 changed files with 23 additions and 29 deletions
|
@ -972,12 +972,12 @@ impl TestBindingMethods<crate::DomTypeHolder> for TestBinding {
|
|||
|
||||
#[cfg_attr(crown, allow(crown::unrooted_must_root))]
|
||||
fn ReturnResolvedPromise(&self, cx: SafeJSContext, v: HandleValue) -> Rc<Promise> {
|
||||
Promise::new_resolved(&self.global(), cx, v)
|
||||
Promise::new_resolved(&self.global(), cx, v, CanGc::note())
|
||||
}
|
||||
|
||||
#[cfg_attr(crown, allow(crown::unrooted_must_root))]
|
||||
fn ReturnRejectedPromise(&self, cx: SafeJSContext, v: HandleValue) -> Rc<Promise> {
|
||||
Promise::new_rejected(&self.global(), cx, v)
|
||||
Promise::new_rejected(&self.global(), cx, v, CanGc::note())
|
||||
}
|
||||
|
||||
fn PromiseResolveNative(&self, cx: SafeJSContext, p: &Promise, v: HandleValue) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue