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 committed Jan 26, 2018
1 parent 756a34e commit fa33f02
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/fixtures/es-modules/loop.mjs
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 fa33f02

Please sign in to comment.