mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +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
|
@ -191,7 +191,7 @@ impl FontFace {
|
|||
let font_status_promise = Promise::new(global, can_gc);
|
||||
// If any of them fail to parse correctly, reject font face’s [[FontStatusPromise]] with a
|
||||
// DOMException named "SyntaxError"
|
||||
font_status_promise.reject_error(Error::Syntax);
|
||||
font_status_promise.reject_error(Error::Syntax, can_gc);
|
||||
|
||||
// set font face’s corresponding attributes to the empty string, and set font face’s status
|
||||
// attribute to "error"
|
||||
|
@ -505,7 +505,7 @@ impl FontFaceMethods<crate::DomTypeHolder> for FontFace {
|
|||
// [[FontStatusPromise]] with a DOMException whose name is "NetworkError"
|
||||
// and set font face’s status attribute to "error".
|
||||
font_face.status.set(FontFaceLoadStatus::Error);
|
||||
font_face.font_status_promise.reject_error(Error::Network);
|
||||
font_face.font_status_promise.reject_error(Error::Network, CanGc::note());
|
||||
}
|
||||
Some(template) => {
|
||||
// Step 5.2. Otherwise, font face now represents the loaded font;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue