node/src
Gus Caplan b0f114ddb0
loader: fix up #18394
This commit fixes up some issues in #18394.

* Switch vm.Module internals to use the new link method properly
* Fix bug with ModuleWrap::Link
* Add tests for ModuleWrap::Link

PR-URL: https://github.com/nodejs/node/pull/18509
Fixes: https://github.com/nodejs/node/issues/18249
Refs: https://github.com/nodejs/node/pull/18394
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2018-02-04 13:49:06 -08:00
..
res meta: restore original copyright header 2017-03-10 11:23:48 -08:00
tracing src: use uv_hrtime as tracing timestamp 2018-01-24 09:58:28 -08:00
CNNICHashWhitelist.inc crypto: Remove expired certs from CNNIC whitelist 2017-02-04 00:20:10 +09:00
StartComAndWoSignData.inc crypto: add cert check issued by StartCom/WoSign 2017-02-04 00:19:59 +09:00
aliased_buffer.h async_hooks: use typed array stack as fast path 2017-12-27 19:48:07 +01:00
async_wrap-inl.h src: rename base-object -> base_object 2017-11-17 12:49:10 +01:00
async_wrap.cc async_hooks: clean up comments 2018-02-01 09:56:51 -08:00
async_wrap.h tls: make deprecated tls.createSecurePair() use public API 2018-01-14 14:49:41 +01:00
backtrace_posix.cc src: remove superfluous check in backtrace_posix.cc 2017-11-18 20:58:12 +01:00
backtrace_win32.cc src: implement backtrace-on-abort for windows 2017-11-15 19:28:13 +01:00
base64.h src: make base64.h self-contained 2017-11-27 07:21:08 +01:00
base_object-inl.h src: use std::unique_ptr in base-object-inl.h 2017-11-19 09:20:26 +01:00
base_object.h src, test: node internals' postmortem metadata 2018-01-26 08:55:36 +08:00
cares_wrap.cc lib,src: port isIPv4() to js 2018-01-29 14:45:06 +01:00
connect_wrap.cc src: rename req-wrap -> req_wrap 2017-11-17 12:49:20 +01:00
connect_wrap.h src: rename req-wrap -> req_wrap 2017-11-17 12:49:20 +01:00
connection_wrap.cc src: refactor stream callbacks and ownership 2018-02-01 10:53:26 +01:00
connection_wrap.h src: rename StreamWrap to LibuvStreamWrap 2017-10-13 13:05:49 -07:00
env-inl.h timers: refactor error handling 2018-02-04 11:04:12 -05:00
env.cc async_wrap: schedule destroy hook as unref 2018-01-21 12:39:41 -05:00
env.h timers: refactor error handling 2018-02-04 11:04:12 -05:00
freelist.h http2: introducing HTTP/2 2017-08-04 12:55:44 -07:00
fs_event_wrap.cc src: make FSEventWrap/StatWatcher::Start more robust 2017-12-13 06:32:55 +01:00
handle_wrap.cc src: rename async-wrap -> async_wrap 2017-11-17 12:49:00 +01:00
handle_wrap.h src, test: node internals' postmortem metadata 2018-01-26 08:55:36 +08:00
inspector_agent.cc vm: allow modifying context name in inspector 2017-12-23 14:05:18 +08:00
inspector_agent.h src: remove duplicate words in comments 2018-01-02 00:31:03 +01:00
inspector_io.cc inspector: Fix crash for WS connection 2017-12-11 15:53:21 -08:00
inspector_io.h inspector: Fix crash for WS connection 2017-12-11 15:53:21 -08:00
inspector_js_api.cc src: rename base-object -> base_object 2017-11-17 12:49:10 +01:00
inspector_socket.cc inspector: make Coverity happy 2017-12-27 19:41:08 +01:00
inspector_socket.h inspector: Fix crash for WS connection 2017-12-11 15:53:21 -08:00
inspector_socket_server.cc src: fix compile warnings introduced in 73ad3f9bea 2017-12-15 07:47:11 +01:00
inspector_socket_server.h inspector: Fix crash for WS connection 2017-12-11 15:53:21 -08:00
js_stream.cc src: refactor stream callbacks and ownership 2018-02-01 10:53:26 +01:00
js_stream.h src: remove redundant `JSStream::DoAfterWrite` 2017-12-21 20:56:13 +01:00
module_wrap.cc loader: fix up #18394 2018-02-04 13:49:06 -08:00
module_wrap.h src,lib: implement import.meta 2018-02-01 13:46:56 +01:00
node.cc timers: refactor error handling 2018-02-04 11:04:12 -05:00
node.d
node.h tools: add cpplint rule for NULL usage 2017-12-01 07:45:05 +01:00
node.stp meta: restore original copyright header 2017-03-10 11:23:48 -08:00
node_api.cc n-api: implement wrapping using private properties 2018-02-02 20:20:20 -05:00
node_api.h src: remove duplicate words in comments 2018-01-02 00:31:03 +01:00
node_api_types.h n-api: check against invalid handle scope usage 2017-10-18 11:29:45 +02:00
node_buffer.cc src: introduce internal buffer slice constructor 2018-01-18 22:42:24 +01:00
node_buffer.h src: do not include internals from node_buffer.h 2017-09-22 16:28:52 +02:00
node_config.cc vm: add modules 2018-01-30 17:00:57 -08:00
node_constants.cc fs: move type checking to js 2017-12-22 12:49:10 -08:00
node_constants.h crypto: add sign/verify support for RSASSA-PSS 2017-04-01 13:27:52 +02:00
node_contextify.cc src: factor out some common vm functions 2018-01-30 17:00:57 -08:00
node_contextify.h src: factor out some common vm functions 2018-01-30 17:00:57 -08:00
node_counters.cc src: do not include x.h if x-inl.h is included 2017-10-30 18:56:38 +08:00
node_counters.h src: refactor `#include` handling 2017-09-14 17:38:38 +02:00
node_crypto.cc crypto: use non-deprecated v8::Object::Set 2018-02-01 10:33:39 +01:00
node_crypto.h tls: make deprecated tls.createSecurePair() use public API 2018-01-14 14:49:41 +01:00
node_crypto_bio.cc crypto: remove BIO_set_shutdown 2017-12-11 07:19:55 +01:00
node_crypto_bio.h crypto: make node_crypto_bio compat w/ OpenSSL 1.1 2017-11-11 20:42:49 +11:00
node_crypto_clienthello-inl.h crypto: add ocsp_request ClientHelloParser::Reset 2017-12-27 19:46:48 +01:00
node_crypto_clienthello.cc src: do not include x.h if x-inl.h is included 2017-10-30 18:56:38 +08:00
node_crypto_clienthello.h crypto: remove unused header in clienthello.h 2017-12-19 14:36:55 +01:00
node_crypto_groups.h meta: restore original copyright header 2017-03-10 11:23:48 -08:00
node_debug_options.cc src,lib,test,doc: correct misspellings 2017-06-17 19:17:46 +02:00
node_debug_options.h inspector: allow --inspect=host:port from js 2017-06-06 14:41:17 -07:00
node_domain.cc domain: further abstract usage in C++ 2018-01-29 11:37:29 -05:00
node_dtrace.cc src: do not include x.h if x-inl.h is included 2017-10-30 18:56:38 +08:00
node_dtrace.h src: refactor `#include` handling 2017-09-14 17:38:38 +02:00
node_file.cc fs: throw errors from fs.unlinkSync in JS 2018-02-01 15:52:52 +08:00
node_file.h fs: encapsulate FSReqWrap more 2018-01-18 14:06:33 -08:00
node_http2.cc src: refactor stream callbacks and ownership 2018-02-01 10:53:26 +01:00
node_http2.h src: refactor stream callbacks and ownership 2018-02-01 10:53:26 +01:00
node_http2_state.h http2: use aliased buffer for perf stats, add stats 2018-01-09 12:33:13 -08:00
node_http_parser.cc src: refactor stream callbacks and ownership 2018-02-01 10:53:26 +01:00
node_i18n.cc src: fix -Wimplicit-fallthrough warning 2018-01-19 13:05:49 +01:00
node_i18n.h src: refactor `#include` handling 2017-09-14 17:38:38 +02:00
node_internals.h vm: add modules 2018-01-30 17:00:57 -08:00
node_javascript.h src: refactor `#include` handling 2017-09-14 17:38:38 +02:00
node_lttng.cc src: do not include x.h if x-inl.h is included 2017-10-30 18:56:38 +08:00
node_lttng.h src: add include guards to internal headers 2016-05-25 09:54:24 +02:00
node_lttng_provider.h src: fix typos in node_lttng_provider.h 2017-03-10 19:26:18 +01:00
node_lttng_tp.h src: lint node_lttng_tp.h 2016-06-28 21:21:21 +02:00
node_main.cc src: remove duplicate words in comments 2018-01-02 00:31:03 +01:00
node_mutex.h src: use RAII for mutexes and condition variables 2016-06-21 10:29:14 +02:00
node_object_wrap.h meta: restore original copyright header 2017-03-10 11:23:48 -08:00
node_os.cc src: use nullptr instead of NULL 2017-12-01 07:45:00 +01:00
node_perf.cc src: remove unused variable 2018-01-27 19:17:16 -05:00
node_perf.h http2: perf_hooks integration 2018-01-02 08:56:30 -08:00
node_perf_common.h http2,perf_hooks: perf state using AliasedBuffer 2018-01-24 17:29:45 -08:00
node_platform.cc src: implement getting current time in NodePlatform 2017-12-06 12:52:07 +01:00
node_platform.h src: implement getting current time in NodePlatform 2017-12-06 12:52:07 +01:00
node_postmortem_metadata.cc src, test: node internals' postmortem metadata 2018-01-26 08:55:36 +08:00
node_provider.d src: remove unused dtrace probes 2015-02-02 21:55:56 +01:00
node_revert.h meta: merge TSC and CTC back into a single body 2017-08-29 08:39:25 -07:00
node_root_certs.h crypto: update root certificates 2017-05-29 08:45:07 -07:00
node_serdes.cc src: rename base-object -> base_object 2017-11-17 12:49:10 +01:00
node_stat_watcher.cc fs: use AliasedBuffer for fs_stats_field_array 2018-01-24 03:54:37 +08:00
node_stat_watcher.h src: rename async-wrap -> async_wrap 2017-11-17 12:49:00 +01:00
node_trace_events.cc trace_events: add executionAsyncId to init events 2017-11-24 21:52:11 +01:00
node_url.cc src: free memory before re-setting URLHost value 2018-02-01 11:05:45 +01:00
node_url.h src: improve module loader readability 2017-11-03 01:10:31 +01:00
node_util.cc src: explicitly register built-in modules 2017-11-13 23:17:34 +00:00
node_v8.cc src: explicitly register built-in modules 2017-11-13 23:17:34 +00:00
node_version.h src: update NODE_MODULE_VERSION to 61 2018-01-24 15:02:33 -08:00
node_watchdog.cc src: refactor `#include` handling 2017-09-14 17:38:38 +02:00
node_watchdog.h vm: fix race condition with timeout param 2017-05-23 21:00:40 +02:00
node_win32_etw_provider-inl.h tools: add cpplint rule for NULL usage 2017-12-01 07:45:05 +01:00
node_win32_etw_provider.cc src: fix etw provider include on Windows 2017-10-31 07:53:49 -07:00
node_win32_etw_provider.h meta: restore original copyright header 2017-03-10 11:23:48 -08:00
node_win32_perfctr_provider.cc src: fix size of CounterSet 2017-11-18 20:53:38 +01:00
node_win32_perfctr_provider.h meta: restore original copyright header 2017-03-10 11:23:48 -08:00
node_wrap.h src: remove unused includes from node_wrap.h 2017-10-15 15:18:08 -07:00
node_zlib.cc src: use non-deprecated versions of `->To*()` utils 2017-12-01 20:37:58 +01:00
nolttng_macros.py tracing: add lttng support for tracing on linux 2015-02-09 18:06:57 +01:00
noperfctr_macros.py src: rename perfctr_macros.py->noperfctr_macros.py 2017-10-11 07:42:02 +02:00
notrace_macros.py src: remove unused dtrace probes 2015-02-02 21:55:56 +01:00
pipe_wrap.cc src: refactor stream callbacks and ownership 2018-02-01 10:53:26 +01:00
pipe_wrap.h async_wrap: add provider types for net server 2017-11-28 02:50:54 +01:00
process_wrap.cc src: refactor stream callbacks and ownership 2018-02-01 10:53:26 +01:00
req_wrap-inl.h domain: re-implement domain over async_hook 2017-11-19 17:39:19 +01:00
req_wrap.h src, test: node internals' postmortem metadata 2018-01-26 08:55:36 +08:00
signal_wrap.cc src: rename async-wrap -> async_wrap 2017-11-17 12:49:00 +01:00
spawn_sync.cc src: make ownership of stdio_pipes explicit 2017-11-16 16:54:00 +01:00
spawn_sync.h src: make ownership of stdio_pipes explicit 2017-11-16 16:54:00 +01:00
stream_base-inl.h src: simplify handles for libuv streams 2018-02-01 10:53:53 +01:00
stream_base.cc src: simplify handles for libuv streams 2018-02-01 10:53:53 +01:00
stream_base.h src: simplify handles for libuv streams 2018-02-01 10:53:53 +01:00
stream_wrap.cc src: simplify handles for libuv streams 2018-02-01 10:53:53 +01:00
stream_wrap.h src: simplify handles for libuv streams 2018-02-01 10:53:53 +01:00
string_bytes.cc src: fix fs.write() externalized string handling 2018-01-23 19:17:39 +01:00
string_bytes.h src: fix fs.write() externalized string handling 2018-01-23 19:17:39 +01:00
string_search.cc src: fix readability/namespace cpplint warnings 2016-06-28 21:21:21 +02:00
string_search.h module: speed up package.json parsing more 2017-11-15 12:01:20 +01:00
tcp_wrap.cc src: refactor stream callbacks and ownership 2018-02-01 10:53:26 +01:00
tcp_wrap.h async_wrap: add provider types for net server 2017-11-28 02:50:54 +01:00
timer_wrap.cc timers: re-enter C++ less frequently 2018-02-04 11:04:12 -05:00
tls_wrap.cc src: refactor stream callbacks and ownership 2018-02-01 10:53:26 +01:00
tls_wrap.h src: refactor stream callbacks and ownership 2018-02-01 10:53:26 +01:00
tty_wrap.cc src: refactor stream callbacks and ownership 2018-02-01 10:53:26 +01:00
tty_wrap.h src: remove unused include in tty_wrap.h 2017-10-25 07:43:41 +02:00
udp_wrap.cc async_hooks: use scope for defaultTriggerAsyncId 2017-12-19 18:04:52 +01:00
udp_wrap.h src: replace SetAccessor w/ SetAccessorProperty 2017-12-17 12:45:39 -05:00
util-inl.h src, test: node internals' postmortem metadata 2018-01-26 08:55:36 +08:00
util.cc src: use uv_os_getpid() to get process id 2017-12-04 10:34:28 -05:00
util.h tls: remove cleartext input data queue 2018-01-07 22:36:08 +01:00
uv.cc util: implement util.getSystemErrorName() 2018-01-20 08:51:47 +08:00
v8abbr.h src: update postmortem constant name 2018-01-24 15:02:43 -08:00
v8ustack.d src: update ustack offset identifiers 2017-10-18 17:03:11 -07:00