mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
refactor: add CanGc as argument to Promise::reject_native (#35640)
Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
This commit is contained in:
parent
3c3b6cfdc4
commit
31199076ec
18 changed files with 148 additions and 136 deletions
|
@ -579,11 +579,14 @@ impl CustomElementRegistryMethods<crate::DomTypeHolder> for CustomElementRegistr
|
|||
// Step 1
|
||||
if !is_valid_custom_element_name(&name) {
|
||||
let promise = Promise::new_in_current_realm(comp, can_gc);
|
||||
promise.reject_native(&DOMException::new(
|
||||
self.window.as_global_scope(),
|
||||
DOMErrorName::SyntaxError,
|
||||
promise.reject_native(
|
||||
&DOMException::new(
|
||||
self.window.as_global_scope(),
|
||||
DOMErrorName::SyntaxError,
|
||||
can_gc,
|
||||
),
|
||||
can_gc,
|
||||
));
|
||||
);
|
||||
return promise;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue