mirror of
https://github.com/nodejs/node.git
synced 2024-11-28 14:33:11 +01: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>
78 lines
1.9 KiB
Plaintext
78 lines
1.9 KiB
Plaintext
[eval]
|
|
[eval]: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 [eval]-wrapper:*:*
|
|
at runScript (node:internal/process/execution:*:*)
|
|
at evalScript (node:internal/process/execution:*:*)
|
|
at node:internal/main/eval_string:*:*
|
|
|
|
Node.js *
|
|
42
|
|
42
|
|
[eval]:1
|
|
throw new Error("hello")
|
|
^
|
|
|
|
Error: hello
|
|
at [eval]:1:7
|
|
at runScriptInThisContext (node:internal/vm:*:*)
|
|
at node:internal/process/execution:*:*
|
|
at [eval]-wrapper:*:*
|
|
at runScript (node:internal/process/execution:*:*)
|
|
at evalScript (node:internal/process/execution:*:*)
|
|
at node:internal/main/eval_string:*:*
|
|
|
|
Node.js *
|
|
|
|
[eval]:1
|
|
throw new Error("hello")
|
|
^
|
|
|
|
Error: hello
|
|
at [eval]:1:7
|
|
at runScriptInThisContext (node:internal/vm:*:*)
|
|
at node:internal/process/execution:*:*
|
|
at [eval]-wrapper:*:*
|
|
at runScript (node:internal/process/execution:*:*)
|
|
at evalScript (node:internal/process/execution:*:*)
|
|
at node:internal/main/eval_string:*:*
|
|
|
|
Node.js *
|
|
100
|
|
[eval]:1
|
|
var x = 100; y = x;
|
|
^
|
|
|
|
ReferenceError: y is not defined
|
|
at [eval]:1:16
|
|
at runScriptInThisContext (node:internal/vm:*:*)
|
|
at node:internal/process/execution:*:*
|
|
at [eval]-wrapper:*:*
|
|
at runScript (node:internal/process/execution:*:*)
|
|
at evalScript (node:internal/process/execution:*:*)
|
|
at node:internal/main/eval_string:*:*
|
|
|
|
Node.js *
|
|
|
|
[eval]:1
|
|
var ______________________________________________; throw 10
|
|
^
|
|
10
|
|
(Use `* --trace-uncaught ...` to show where the exception was thrown)
|
|
|
|
Node.js *
|
|
|
|
[eval]:1
|
|
var ______________________________________________; throw 10
|
|
^
|
|
10
|
|
(Use `* --trace-uncaught ...` to show where the exception was thrown)
|
|
|
|
Node.js *
|
|
done
|