Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/sequential/test-vm-timeout-rethrow.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const spawn = require('child_process').spawn;

if (process.argv[2] === 'child') {
const code = 'let j = 0;\n' +
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you reduce the whole block to while(true); while you're at it? I.e. no need for declaring j either.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left it intentionally so it can be used in return, but with while(true); won't be necessary. Will remove it.

'for (let i = 0; i < 1000000; i++) j += add(i, i + 1);\n' +
'while(true);\n' +
'j;';

const ctx = vm.createContext({
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you drop theadd() function here as well?

Expand Down