Skip to content

Commit

Permalink
test: force context allocation in test module
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
hashseed authored and MylesBorins committed Feb 21, 2018
1 parent cc80914 commit b5267a6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/fixtures/es-modules/loop.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,7 @@ while (t > 0) {
console.log(`Outputed message #${k++}`);
}
}
process.exit(55);
process.exit(55);

// test/parallel/test-inspector-esm.js expects t and k to be context-allocated.
(function force_context_allocation() { return t + k; })

0 comments on commit b5267a6

Please sign in to comment.