| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
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++.
|
@joyeecheung sadly an error occured when I tried to trigger a build :( |
Sorry, something went wrong.
| Local<Value> main_script_v; | ||
| if (main_script_id == nullptr) { | ||
| // TODO(joyeecheung): make this mandatory - we may also create an overload | ||
| // for main_script that is a Local<Function>. |
There was a problem hiding this comment.
Just to make sure I understand this correctly, overload means an overload of StartExecution() that takes a Local<Function>? I like that idea. :)
Sorry, something went wrong.
There was a problem hiding this comment.
@addaleax Yeah, and maybe we could also use an overload with a C++ callback that takes some useful arguments (maybe Environment?)
Sorry, something went wrong.
| // directory which will be executed instead of Node's normal loading. | ||
| if (NativeModule.exists('_third_party_main')) { | ||
| function startMainThreadExecution(mainScript) { | ||
| if (mainScript) { |
There was a problem hiding this comment.
This bit here is temporary - I think it would be better to do the branching in C++ and directly compileAndCall the main scripts instead. For per-process CLI options like --help we could branch in node::Start() since they do not make a lot of sense for either embedders or the workers anyway. Although unfortunately for _third_party_main we have to keep a driver that wrap it into a process.nextTick() (or maybe there is a cleverer way out?)
Sorry, something went wrong.
Sorry, something went wrong.
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: nodejs#25474 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
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: #25474 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
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: nodejs#25474 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
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: nodejs#25474 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
| Back | FazBrowse Home | New Git URL |
The idea is to allow the C++ layer to run arbitrary scripts
as the main script. This paves the way for
execution modes (those usually do not make sense for the
embedders).
Also moves the handling of _third_party_main.js into C++.
Checklist