File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
nova_vm/src/ecmascript/builtins/indexed_collections/array_objects Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -3511,9 +3511,7 @@ impl ArrayPrototype {
3511
3511
. bind ( gc. nogc ( ) ) ;
3512
3512
// 2. Let len be ? LengthOfArrayLike(array).
3513
3513
let array = array. scope ( agent, gc. nogc ( ) ) ;
3514
- let len = length_of_array_like ( agent, array. get ( agent) , gc. reborrow ( ) )
3515
- . unbind ( ) ?
3516
- . bind ( gc. nogc ( ) ) ;
3514
+ let len = length_of_array_like ( agent, array. get ( agent) , gc. reborrow ( ) ) . unbind ( ) ?;
3517
3515
// 3. Let separator be the implementation-defined list-separator String value appropriate for the host environment's current locale (such as ", ").
3518
3516
let separator = ", " ;
3519
3517
// 4. Let R be the empty String.
@@ -3533,20 +3531,23 @@ impl ArrayPrototype {
3533
3531
PropertyKey :: Integer ( k. try_into ( ) . unwrap ( ) ) ,
3534
3532
gc. reborrow ( ) ,
3535
3533
)
3536
- . unbind ( ) ?;
3534
+ . unbind ( ) ?
3535
+ . bind ( gc. nogc ( ) ) ;
3537
3536
// c. If element is neither undefined nor null, then
3538
3537
if !element. is_undefined ( ) && !element. is_null ( ) {
3539
3538
// i. Let S be ? ToString(? Invoke(element, "toLocaleString")).
3540
3539
let argument = invoke (
3541
3540
agent,
3542
- element,
3541
+ element. unbind ( ) ,
3543
3542
BUILTIN_STRING_MEMORY . toLocaleString . into ( ) ,
3544
3543
None ,
3545
3544
gc. reborrow ( ) ,
3546
3545
)
3547
3546
. unbind ( ) ?
3548
3547
. bind ( gc. nogc ( ) ) ;
3549
- let s = to_string ( agent, argument. unbind ( ) , gc. reborrow ( ) ) . unbind ( ) ?;
3548
+ let s = to_string ( agent, argument. unbind ( ) , gc. reborrow ( ) )
3549
+ . unbind ( ) ?
3550
+ . bind ( gc. nogc ( ) ) ;
3550
3551
// ii. Set R to the string-concatenation of R and S.
3551
3552
r. push_str ( s. as_str ( agent) ) ;
3552
3553
} ;
You can’t perform that action at this time.
0 commit comments