mirror of
https://github.com/servo/servo.git
synced 2025-09-20 11:50:09 +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
|
@ -69,9 +69,9 @@ impl FontFaceSet {
|
|||
}
|
||||
}
|
||||
|
||||
pub(crate) fn fulfill_ready_promise_if_needed(&self) {
|
||||
pub(crate) fn fulfill_ready_promise_if_needed(&self, can_gc: CanGc) {
|
||||
if !self.promise.is_fulfilled() {
|
||||
self.promise.resolve_native(self);
|
||||
self.promise.resolve_native(self, can_gc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -114,7 +114,7 @@ impl FontFaceSetMethods<crate::DomTypeHolder> for FontFaceSet {
|
|||
// TODO: Step 4.2. Resolve promise with the result of waiting for all of the
|
||||
// [[FontStatusPromise]]s of each font face in the font face list, in order.
|
||||
let matched_fonts = Vec::<&FontFace>::new();
|
||||
promise.resolve_native(&matched_fonts);
|
||||
promise.resolve_native(&matched_fonts, CanGc::note());
|
||||
}));
|
||||
|
||||
// Step 2. Return promise. Complete the rest of these steps asynchronously.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue