Skip to content

Commit 8d45835

Browse files
committed
test(runtime): native constructor canary spec reads back after its wrapper died
The readback goes through rewrap, so in canary mode the wrapper the native constructor returned is checked dead before the object is read back on a new one.
1 parent 43f66bc commit 8d45835

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎TestRunner/app/tests/WrapperLifetimeModesTests.js‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1498,9 +1498,11 @@ describe("Wrapper lifetime modes", function () {
14981498
if (canary) {
14991499
expect(stats().canaryInterceptedWrites - before.canaryInterceptedWrites).toBe(1);
15001500
}
1501-
again = null;
1502-
settle(2, function () {
1503-
var obj = owner.objectAtIndex(0);
1501+
rewrap(function () {
1502+
var made = again;
1503+
again = null;
1504+
return made;
1505+
}, function (obj) {
15041506
if (keepsState) {
15051507
expect(obj.other).toBe("new");
15061508
}

0 commit comments

Comments
 (0)