-
-
Notifications
You must be signed in to change notification settings - Fork 35.6k
vm.Script should support timeouts #20982
Copy link
Copy link
Closed
Labels
docIssues and PRs related to the documentations.Issues and PRs related to the documentations.vmIssues and PRs related to the vm subsystem.Issues and PRs related to the vm subsystem.
Metadata
Metadata
Assignees
Labels
docIssues and PRs related to the documentations.Issues and PRs related to the documentations.vmIssues and PRs related to the vm subsystem.Issues and PRs related to the vm subsystem.
Type
Fields
Give feedbackNo fields configured for issues without a type.
10.2.1Darwin Simens-MacBook-Pro.local 17.4.0 Darwin Kernel Version 17.4.0: Sun Dec 17 09:19:54 PST 2017; root:xnu-4570.41.2~1/RELEASE_X86_64 x86_64vmAccording to the docs, you should be able to pass
timeoutwhen doingnew Script. This seemingly does not work.Running the following snippet will successfully throw an error after one second:
The following will not:
I did some digging (which might not be useful at all), and to my untrained eyes it looks like
new Scriptconstructor ignorestimeoutargument:node/lib/vm.js
Lines 45 to 52 in 9461f32
Reported in jsdom/jsdom#2238, /cc @TimothyGu