mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Pass InCompartment by value
This commit is contained in:
parent
1b6949d4cf
commit
e2e6e2ac94
26 changed files with 52 additions and 50 deletions
|
@ -409,7 +409,7 @@ impl CustomElementRegistryMethods for CustomElementRegistry {
|
|||
let in_compartment_proof = AlreadyInCompartment::assert(&global_scope);
|
||||
let promise = Promise::new_in_current_compartment(
|
||||
&global_scope,
|
||||
&InCompartment::Already(&in_compartment_proof),
|
||||
InCompartment::Already(&in_compartment_proof),
|
||||
);
|
||||
promise.reject_native(&DOMException::new(&global_scope, DOMErrorName::SyntaxError));
|
||||
return promise;
|
||||
|
@ -420,7 +420,7 @@ impl CustomElementRegistryMethods for CustomElementRegistry {
|
|||
let in_compartment_proof = AlreadyInCompartment::assert(&global_scope);
|
||||
let promise = Promise::new_in_current_compartment(
|
||||
&global_scope,
|
||||
&InCompartment::Already(&in_compartment_proof),
|
||||
InCompartment::Already(&in_compartment_proof),
|
||||
);
|
||||
promise.resolve_native(&UndefinedValue());
|
||||
return promise;
|
||||
|
@ -434,7 +434,7 @@ impl CustomElementRegistryMethods for CustomElementRegistry {
|
|||
let in_compartment_proof = AlreadyInCompartment::assert(&global_scope);
|
||||
let promise = Promise::new_in_current_compartment(
|
||||
&global_scope,
|
||||
&InCompartment::Already(&in_compartment_proof),
|
||||
InCompartment::Already(&in_compartment_proof),
|
||||
);
|
||||
map.insert(name, promise.clone());
|
||||
promise
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue