mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
a3407b4ee8
Instead of using the public versions of the vm APIs internally, use the internal versions so that we can skip unnecessary argument validation. The public versions would need special care to the generation of host-defined options to hit the isolate compilation cache when imporModuleDynamically isn't used, while internally it's almost always used, so this allows us to handle the host-defined options separately. PR-URL: https://github.com/nodejs/node/pull/50137 Refs: https://github.com/nodejs/node/issues/35375 Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
90 lines
2.6 KiB
Plaintext
90 lines
2.6 KiB
Plaintext
[stdin]
|
|
[stdin]:1
|
|
with(this){__filename}
|
|
^^^^
|
|
|
|
SyntaxError: Strict mode code may not include a with statement
|
|
at makeContextifyScript (node:internal/vm:*:*)
|
|
at node:internal/process/execution:*:*
|
|
at [stdin]-wrapper:*:*
|
|
at runScript (node:internal/process/execution:*:*)
|
|
at evalScript (node:internal/process/execution:*:*)
|
|
at node:internal/main/eval_stdin:*:*
|
|
at Socket.<anonymous> (node:internal/process/execution:*:*)
|
|
at Socket.emit (node:events:*:*)
|
|
at endReadableNT (node:internal/streams/readable:*:*)
|
|
at process.processTicksAndRejections (node:internal/process/task_queues:*:*)
|
|
|
|
Node.js *
|
|
42
|
|
42
|
|
[stdin]:1
|
|
throw new Error("hello")
|
|
^
|
|
|
|
Error: hello
|
|
at [stdin]:1:7
|
|
at runScriptInThisContext (node:internal/vm:*:*)
|
|
at node:internal/process/execution:*:*
|
|
at [stdin]-wrapper:*:*
|
|
at runScript (node:internal/process/execution:*:*)
|
|
at evalScript (node:internal/process/execution:*:*)
|
|
at node:internal/main/eval_stdin:*:*
|
|
at Socket.<anonymous> (node:internal/process/execution:*:*)
|
|
at Socket.emit (node:events:*:*)
|
|
at endReadableNT (node:internal/streams/readable:*:*)
|
|
|
|
Node.js *
|
|
[stdin]:1
|
|
throw new Error("hello")
|
|
^
|
|
|
|
Error: hello
|
|
at [stdin]:1:*
|
|
at runScriptInThisContext (node:internal/vm:*:*)
|
|
at node:internal/process/execution:*:*
|
|
at [stdin]-wrapper:*:*
|
|
at runScript (node:internal/process/execution:*:*)
|
|
at evalScript (node:internal/process/execution:*:*)
|
|
at node:internal/main/eval_stdin:*:*
|
|
at Socket.<anonymous> (node:internal/process/execution:*:*)
|
|
at Socket.emit (node:events:*:*)
|
|
at endReadableNT (node:internal/streams/readable:*:*)
|
|
|
|
Node.js *
|
|
100
|
|
[stdin]:1
|
|
let x = 100; y = x;
|
|
^
|
|
|
|
ReferenceError: y is not defined
|
|
at [stdin]:1:16
|
|
at runScriptInThisContext (node:internal/vm:*:*)
|
|
at node:internal/process/execution:*:*
|
|
at [stdin]-wrapper:*:*
|
|
at runScript (node:internal/process/execution:*:*)
|
|
at evalScript (node:internal/process/execution:*:*)
|
|
at node:internal/main/eval_stdin:*:*
|
|
at Socket.<anonymous> (node:internal/process/execution:*:*)
|
|
at Socket.emit (node:events:*:*)
|
|
at endReadableNT (node:internal/streams/readable:*:*)
|
|
|
|
Node.js *
|
|
|
|
[stdin]:1
|
|
let ______________________________________________; throw 10
|
|
^
|
|
10
|
|
(Use `* --trace-uncaught ...` to show where the exception was thrown)
|
|
|
|
Node.js *
|
|
|
|
[stdin]:1
|
|
let ______________________________________________; throw 10
|
|
^
|
|
10
|
|
(Use `* --trace-uncaught ...` to show where the exception was thrown)
|
|
|
|
Node.js *
|
|
done
|