Skip to content

Commit b619e41

Browse files
committed
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
1 parent 1c07724 commit b619e41

File tree

4 files changed

+227
-207
lines changed

4 files changed

+227
-207
lines changed

src/env.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ class ModuleWrap;
184184
V(kill_signal_string, "killSignal") \
185185
V(length_string, "length") \
186186
V(mac_string, "mac") \
187+
V(main_string, "main") \
187188
V(max_buffer_string, "maxBuffer") \
188189
V(message_string, "message") \
189190
V(minttl_string, "minttl") \

0 commit comments

Comments
 (0)