diff options
author | Anna Henningsen <anna@addaleax.net> | 2017-10-27 01:43:51 +0200 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2017-11-03 01:10:31 +0100 |
commit | e22a8f17a5d70355062b483337692e45954380a0 (patch) | |
tree | 054e2fe3fca52a86e8ddcc98879052bc9674f804 /src/env.h | |
parent | 89b3228f4d1a7f00b8ff195964895061e45861d1 (diff) | |
download | android-node-v8-e22a8f17a5d70355062b483337692e45954380a0.tar.gz android-node-v8-e22a8f17a5d70355062b483337692e45954380a0.tar.bz2 android-node-v8-e22a8f17a5d70355062b483337692e45954380a0.zip |
src: improve module loader readability
Various improvements on readability, performance and
conformity to the Node core coding style in the ESM loader C++ code:
- `isolate` for the `Isolate*`, `context` for the `Local<Context>`
- Less reliance on `auto` where it’s unnecessary/increases cognitive
overhead
- Shorter paths to failure via `.ToLocal()` & co
- Do not keep pending exceptions around e.g. for failed `JSON` parsing
- Use `Maybe` types to get explicit error status forwarding
- Remove an unnecessary handle scope
- Add `nullptr` checks for unwrapped host objects
- Remove unused code
- Use `CamelCase` for function names
- Use `const Foo&` instead of copying values whenever possible
- Pass along the `Environment*` explicitly
PR-URL: https://github.com/nodejs/node/pull/16536
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Diffstat (limited to 'src/env.h')
-rw-r--r-- | src/env.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -185,6 +185,7 @@ class ModuleWrap; V(kill_signal_string, "killSignal") \ V(length_string, "length") \ V(mac_string, "mac") \ + V(main_string, "main") \ V(max_buffer_string, "maxBuffer") \ V(message_string, "message") \ V(minttl_string, "minttl") \ |