From 62db5c2f263c047215943307894ed4805fb22a7c Mon Sep 17 00:00:00 2001 From: Yang Guo Date: Tue, 23 Jan 2018 10:29:26 +0100 Subject: [PATCH 1/2] 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. --- test/fixtures/es-modules/loop.mjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/fixtures/es-modules/loop.mjs b/test/fixtures/es-modules/loop.mjs index 33a382bdde7dab..81004e44cdcf5b 100644 --- a/test/fixtures/es-modules/loop.mjs +++ b/test/fixtures/es-modules/loop.mjs @@ -7,4 +7,6 @@ while (t > 0) { console.log(`Outputed message #${k++}`); } } -process.exit(55); \ No newline at end of file +process.exit(55); + +(function force_context_allocation() { return t + k; }) From b5cb15199ecb47f189d0966f397f141251236dc6 Mon Sep 17 00:00:00 2001 From: Yang Guo Date: Thu, 25 Jan 2018 09:46:32 +0100 Subject: [PATCH 2/2] Address comment. --- test/fixtures/es-modules/loop.mjs | 1 + 1 file changed, 1 insertion(+) diff --git a/test/fixtures/es-modules/loop.mjs b/test/fixtures/es-modules/loop.mjs index 81004e44cdcf5b..edd111abb9e9b7 100644 --- a/test/fixtures/es-modules/loop.mjs +++ b/test/fixtures/es-modules/loop.mjs @@ -9,4 +9,5 @@ while (t > 0) { } process.exit(55); +// test/parallel/test-inspector-esm.js expects t and k to be context-allocated. (function force_context_allocation() { return t + k; })