mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Remove global argument from Promise::new_in_current_realm.
This commit is contained in:
parent
f79e1e327d
commit
fca5833e21
30 changed files with 54 additions and 56 deletions
|
@ -428,7 +428,7 @@ impl CustomElementRegistryMethods for CustomElementRegistry {
|
|||
|
||||
// Step 1
|
||||
if !is_valid_custom_element_name(&name) {
|
||||
let promise = Promise::new_in_current_realm(&global_scope, comp);
|
||||
let promise = Promise::new_in_current_realm(comp);
|
||||
promise.reject_native(&DOMException::new(&global_scope, DOMErrorName::SyntaxError));
|
||||
return promise;
|
||||
}
|
||||
|
@ -441,7 +441,7 @@ impl CustomElementRegistryMethods for CustomElementRegistry {
|
|||
definition
|
||||
.constructor
|
||||
.to_jsval(*cx, constructor.handle_mut());
|
||||
let promise = Promise::new_in_current_realm(&global_scope, comp);
|
||||
let promise = Promise::new_in_current_realm(comp);
|
||||
promise.resolve_native(&constructor.get());
|
||||
return promise;
|
||||
}
|
||||
|
@ -452,7 +452,7 @@ impl CustomElementRegistryMethods for CustomElementRegistry {
|
|||
|
||||
// Steps 4, 5
|
||||
let promise = map.get(&name).cloned().unwrap_or_else(|| {
|
||||
let promise = Promise::new_in_current_realm(&global_scope, comp);
|
||||
let promise = Promise::new_in_current_realm(comp);
|
||||
map.insert(name, promise.clone());
|
||||
promise
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue