Skip to content

Commit 87648e2

Browse files
hashseedMylesBorins
authored andcommitted
test: force context allocation in test module
V8's behavior changed in c3bd741efd. Top-level variables in a module are no longer context-allocated by default. PR-URL: #18312 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 3d7bdb4 commit 87648e2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/fixtures/es-modules/loop.mjs

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,7 @@ while (t > 0) {
77
console.log(`Outputed message #${k++}`);
88
}
99
}
10-
process.exit(55);
10+
process.exit(55);
11+
12+
// test/parallel/test-inspector-esm.js expects t and k to be context-allocated.
13+
(function force_context_allocation() { return t + k; })

0 commit comments

Comments
 (0)