mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
refactor: add CanGc as argument to Promise::resolve (#35616)
Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
This commit is contained in:
parent
adb831eefe
commit
0383ba9a5b
57 changed files with 330 additions and 294 deletions
|
@ -980,8 +980,8 @@ impl TestBindingMethods<crate::DomTypeHolder> for TestBinding {
|
|||
Promise::new_rejected(&self.global(), cx, v, CanGc::note())
|
||||
}
|
||||
|
||||
fn PromiseResolveNative(&self, cx: SafeJSContext, p: &Promise, v: HandleValue) {
|
||||
p.resolve(cx, v);
|
||||
fn PromiseResolveNative(&self, cx: SafeJSContext, p: &Promise, v: HandleValue, can_gc: CanGc) {
|
||||
p.resolve(cx, v, can_gc);
|
||||
}
|
||||
|
||||
fn PromiseRejectNative(&self, cx: SafeJSContext, p: &Promise, v: HandleValue) {
|
||||
|
@ -1163,6 +1163,8 @@ pub(crate) struct TestBindingCallback {
|
|||
impl TestBindingCallback {
|
||||
#[cfg_attr(crown, allow(crown::unrooted_must_root))]
|
||||
pub(crate) fn invoke(self) {
|
||||
self.promise.root().resolve_native(&self.value);
|
||||
self.promise
|
||||
.root()
|
||||
.resolve_native(&self.value, CanGc::note());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue