mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
2c7f4f474b
The idea is to allow the C++ layer to run arbitrary scripts as the main script. This paves the way for - cctest of the execution of Node.js instances - Earlier handling of per-process CLI options that affect execution modes (those usually do not make sense for the embedders). - Targets like mkcodecache or mksnapshot. Also moves the handling of `_third_party_main.js` into C++. PR-URL: https://github.com/nodejs/node/pull/25474 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
68 lines
2.1 KiB
Plaintext
68 lines
2.1 KiB
Plaintext
[eval]
|
|
[eval]:1
|
|
with(this){__filename}
|
|
^^^^
|
|
SyntaxError: Strict mode code may not include a with statement
|
|
at new Script (vm.js:*:*)
|
|
at createScript (vm.js:*:*)
|
|
at Object.runInThisContext (vm.js:*:*)
|
|
at Object.<anonymous> ([eval]-wrapper:*:*)
|
|
at Module._compile (internal/modules/cjs/loader.js:*:*)
|
|
at evalScript (internal/process/execution.js:*:*)
|
|
at executeUserCode (internal/bootstrap/node.js:*:*)
|
|
at startMainThreadExecution (internal/bootstrap/node.js:*:*)
|
|
42
|
|
42
|
|
[eval]:1
|
|
throw new Error("hello")
|
|
^
|
|
|
|
Error: hello
|
|
at [eval]:1:7
|
|
at Script.runInThisContext (vm.js:*:*)
|
|
at Object.runInThisContext (vm.js:*:*)
|
|
at Object.<anonymous> ([eval]-wrapper:*:*)
|
|
at Module._compile (internal/modules/cjs/loader.js:*:*)
|
|
at evalScript (internal/process/execution.js:*:*)
|
|
at executeUserCode (internal/bootstrap/node.js:*:*)
|
|
at startMainThreadExecution (internal/bootstrap/node.js:*:*)
|
|
|
|
[eval]:1
|
|
throw new Error("hello")
|
|
^
|
|
|
|
Error: hello
|
|
at [eval]:1:7
|
|
at Script.runInThisContext (vm.js:*:*)
|
|
at Object.runInThisContext (vm.js:*:*)
|
|
at Object.<anonymous> ([eval]-wrapper:*:*)
|
|
at Module._compile (internal/modules/cjs/loader.js:*:*)
|
|
at evalScript (internal/process/execution.js:*:*)
|
|
at executeUserCode (internal/bootstrap/node.js:*:*)
|
|
at startMainThreadExecution (internal/bootstrap/node.js:*:*)
|
|
100
|
|
[eval]:1
|
|
var x = 100; y = x;
|
|
^
|
|
|
|
ReferenceError: y is not defined
|
|
at [eval]:1:16
|
|
at Script.runInThisContext (vm.js:*:*)
|
|
at Object.runInThisContext (vm.js:*:*)
|
|
at Object.<anonymous> ([eval]-wrapper:*:*)
|
|
at Module._compile (internal/modules/cjs/loader.js:*:*)
|
|
at evalScript (internal/process/execution.js:*:*)
|
|
at executeUserCode (internal/bootstrap/node.js:*:*)
|
|
at startMainThreadExecution (internal/bootstrap/node.js:*:*)
|
|
|
|
[eval]:1
|
|
var ______________________________________________; throw 10
|
|
^
|
|
10
|
|
|
|
[eval]:1
|
|
var ______________________________________________; throw 10
|
|
^
|
|
10
|
|
done
|