Skip to content

Commit 9d8efae

Browse files
sosukesuzukiMs2ger
authored andcommitted
Wrap toSpliced call with try-finally
1 parent 2ad7f32 commit 9d8efae

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test/staging/sm/Array/change-array-by-copy-errors-from-correct-realm.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,11 @@ function test(otherGlobal) {
4141
["toSpliced - array too long", () => {
4242
var oldLen = arrayLike.length;
4343
arrayLike.length = 2**53 - 1;
44-
gToSpliced.call(arrayLike, 0, 0, 1);
45-
arrayLike.length = oldLen;
44+
try {
45+
gToSpliced.call(arrayLike, 0, 0, 1);
46+
} finally {
47+
arrayLike.length = oldLen;
48+
}
4649
}]
4750
]
4851

0 commit comments

Comments
 (0)