mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Replace unsafe uses of HandleValueArray. (#34588)
* Replace unsafe uses of HandleValueArray. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Fix clippy lint. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
parent
2328145c25
commit
a85241e635
11 changed files with 33 additions and 106 deletions
|
@ -723,7 +723,7 @@ impl CustomElementDefinition {
|
|||
{
|
||||
// Go into the constructor's realm
|
||||
let _ac = JSAutoRealm::new(*cx, self.constructor.callback());
|
||||
let args = HandleValueArray::new();
|
||||
let args = HandleValueArray::empty();
|
||||
if unsafe { !Construct1(*cx, constructor.handle(), &args, element.handle_mut()) } {
|
||||
return Err(Error::JSFailed);
|
||||
}
|
||||
|
@ -908,7 +908,7 @@ fn run_upgrade_constructor(
|
|||
|
||||
// Go into the constructor's realm
|
||||
let _ac = JSAutoRealm::new(*cx, constructor.callback());
|
||||
let args = HandleValueArray::new();
|
||||
let args = HandleValueArray::empty();
|
||||
// Step 8.2
|
||||
if unsafe {
|
||||
!Construct1(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue