@encharm/cws 4.4.0 → 4.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bindings/cws_darwin_arm64_node115.node +0 -0
- package/dist/bindings/cws_darwin_arm64_node127.node +0 -0
- package/dist/bindings/cws_linux_arm64_node115.node +0 -0
- package/dist/bindings/cws_linux_arm64_node127.node +0 -0
- package/dist/bindings/cws_linux_x64_node108.node +0 -0
- package/dist/bindings/cws_linux_x64_node115.node +0 -0
- package/dist/bindings/cws_linux_x64_node127.node +0 -0
- package/dist/bindings/cws_win32_x64_node108.node +0 -0
- package/dist/bindings/cws_win32_x64_node115.node +0 -0
- package/dist/bindings/cws_win32_x64_node127.node +0 -0
- package/dist/bindings/cws_win32_x64_node83.node +0 -0
- package/dist/bindings/cws_win32_x64_node93.node +0 -0
- package/package.json +1 -1
- package/src/Addon.h +20 -24
- package/src/Socket.h +0 -1
- package/src/headers/20/acorn_version.h +1 -1
- package/src/headers/20/connection_wrap.h +1 -0
- package/src/headers/20/crypto/crypto_keys.h +3 -0
- package/src/headers/20/crypto/crypto_tls.h +12 -3
- package/src/headers/20/crypto/crypto_util.h +3 -2
- package/src/headers/20/env_properties.h +3 -1
- package/src/headers/20/js_native_api.h +11 -1
- package/src/headers/20/js_native_api_v8.h +40 -3
- package/src/headers/20/js_native_api_v8_internals.h +6 -0
- package/src/headers/20/module_wrap.h +1 -1
- package/src/headers/20/node.h +2 -0
- package/src/headers/20/node_api.h +8 -7
- package/src/headers/20/node_constants.h +3 -0
- package/src/headers/20/node_contextify.h +24 -0
- package/src/headers/20/node_file-inl.h +32 -0
- package/src/headers/20/node_file.h +25 -12
- package/src/headers/20/node_options.h +9 -9
- package/src/headers/20/node_version.h +1 -1
- package/src/headers/20/permission/child_process_permission.h +2 -1
- package/src/headers/20/permission/fs_permission.h +11 -9
- package/src/headers/20/permission/inspector_permission.h +29 -0
- package/src/headers/20/permission/permission.h +4 -1
- package/src/headers/20/permission/permission_base.h +6 -2
- package/src/headers/20/permission/worker_permission.h +2 -1
- package/src/headers/20/undici_version.h +2 -2
- package/src/headers/22/acorn_version.h +6 -0
- package/src/headers/22/aliased_buffer-inl.h +243 -0
- package/src/headers/22/aliased_buffer.h +206 -0
- package/src/headers/{18 → 22}/async_wrap-inl.h +8 -6
- package/src/headers/{18 → 22}/async_wrap.h +65 -59
- package/src/headers/{16 → 22}/base_object-inl.h +57 -117
- package/src/headers/{18 → 22}/base_object.h +58 -30
- package/src/headers/22/base_object_types.h +74 -0
- package/src/headers/22/blob_serializer_deserializer-inl.h +385 -0
- package/src/headers/22/blob_serializer_deserializer.h +132 -0
- package/src/headers/{16 → 22}/callback_queue.h +1 -0
- package/src/headers/{16 → 22}/cares_wrap.h +27 -20
- package/src/headers/22/cjs_module_lexer_version.h +6 -0
- package/src/headers/22/cleanup_queue-inl.h +62 -0
- package/src/headers/22/cleanup_queue.h +85 -0
- package/src/headers/22/compile_cache.h +104 -0
- package/src/headers/{18 → 22}/crypto/crypto_clienthello.h +1 -1
- package/src/headers/{18 → 22}/crypto/crypto_context.h +31 -7
- package/src/headers/{18 → 22}/crypto/crypto_keys.h +118 -148
- package/src/headers/{18 → 22}/crypto/crypto_tls.h +20 -5
- package/src/headers/{18 → 22}/crypto/crypto_util.h +219 -263
- package/src/headers/22/crypto/ncrypto.h +752 -0
- package/src/headers/{16 → 22}/debug_utils-inl.h +15 -7
- package/src/headers/{18 → 22}/debug_utils.h +25 -19
- package/src/headers/22/encoding_binding.h +59 -0
- package/src/headers/{14 → 22}/env-inl.h +276 -409
- package/src/headers/22/env.h +1266 -0
- package/src/headers/22/env_properties.h +497 -0
- package/src/headers/{18 → 22}/handle_wrap.h +2 -0
- package/src/headers/{18 → 22}/histogram.h +88 -48
- package/src/headers/{16 → 22}/inspector_agent.h +17 -1
- package/src/headers/{16 → 22}/inspector_profiler.h +15 -13
- package/src/headers/{18 → 22}/js_native_api.h +78 -30
- package/src/headers/{18 → 22}/js_native_api_types.h +46 -1
- package/src/headers/{18 → 22}/js_native_api_v8.h +206 -161
- package/src/headers/{18 → 22}/js_native_api_v8_internals.h +6 -0
- package/src/headers/22/json_parser.h +40 -0
- package/src/headers/{16 → 22}/json_utils.h +19 -8
- package/src/headers/{18 → 22}/memory_tracker-inl.h +16 -13
- package/src/headers/{14 → 22}/memory_tracker.h +13 -8
- package/src/headers/{16 → 22}/module_wrap.h +49 -19
- package/src/headers/22/ncrypto/ncrypto.h +752 -0
- package/src/headers/{18 → 22}/node.h +465 -68
- package/src/headers/{18 → 22}/node_api.h +66 -81
- package/src/headers/{18 → 22}/node_api_internals.h +8 -4
- package/src/headers/{18 → 22}/node_api_types.h +5 -0
- package/src/headers/22/node_binding.h +154 -0
- package/src/headers/{18 → 22}/node_blob.h +46 -78
- package/src/headers/{18 → 22}/node_bob-inl.h +1 -2
- package/src/headers/{18 → 22}/node_bob.h +2 -6
- package/src/headers/{18 → 22}/node_buffer.h +1 -1
- package/src/headers/22/node_builtins.h +220 -0
- package/src/headers/{18 → 22}/node_constants.h +3 -5
- package/src/headers/22/node_context_data.h +168 -0
- package/src/headers/22/node_contextify.h +199 -0
- package/src/headers/{16 → 22}/node_crypto.h +1 -2
- package/src/headers/22/node_dotenv.h +45 -0
- package/src/headers/{18 → 22}/node_errors.h +86 -27
- package/src/headers/22/node_exit_code.h +54 -0
- package/src/headers/22/node_external_reference.h +249 -0
- package/src/headers/{18 → 22}/node_file-inl.h +127 -30
- package/src/headers/{16 → 22}/node_file.h +122 -11
- package/src/headers/{18 → 22}/node_http2.h +28 -11
- package/src/headers/{16 → 22}/node_http2_state.h +34 -25
- package/src/headers/{18 → 22}/node_http_common-inl.h +2 -1
- package/src/headers/{18 → 22}/node_http_common.h +56 -55
- package/src/headers/{16 → 22}/node_i18n.h +5 -18
- package/src/headers/{18 → 22}/node_internals.h +121 -59
- package/src/headers/{18 → 22}/node_main_instance.h +4 -31
- package/src/headers/{18 → 22}/node_messaging.h +27 -10
- package/src/headers/{18 → 22}/node_metadata.h +23 -1
- package/src/headers/{18 → 22}/node_options-inl.h +24 -11
- package/src/headers/{18 → 22}/node_options.h +124 -39
- package/src/headers/{18 → 22}/node_perf.h +0 -2
- package/src/headers/{18 → 22}/node_perf_common.h +20 -9
- package/src/headers/{18 → 22}/node_platform.h +11 -5
- package/src/headers/{18 → 22}/node_process.h +26 -14
- package/src/headers/22/node_realm-inl.h +145 -0
- package/src/headers/22/node_realm.h +184 -0
- package/src/headers/{16 → 22}/node_report.h +13 -17
- package/src/headers/{16 → 22}/node_revert.h +3 -3
- package/src/headers/{16 → 22}/node_root_certs.h +902 -461
- package/src/headers/22/node_sea.h +64 -0
- package/src/headers/22/node_shadow_realm.h +46 -0
- package/src/headers/22/node_snapshot_builder.h +57 -0
- package/src/headers/22/node_snapshotable.h +174 -0
- package/src/headers/{18 → 22}/node_sockaddr.h +2 -2
- package/src/headers/{16 → 22}/node_stat_watcher.h +2 -1
- package/src/headers/22/node_threadsafe_cow-inl.h +54 -0
- package/src/headers/22/node_threadsafe_cow.h +105 -0
- package/src/headers/22/node_union_bytes.h +81 -0
- package/src/headers/22/node_url.h +96 -0
- package/src/headers/22/node_v8.h +77 -0
- package/src/headers/{14 → 22}/node_v8_platform-inl.h +17 -6
- package/src/headers/{18 → 22}/node_version.h +20 -8
- package/src/headers/22/node_wasi.h +185 -0
- package/src/headers/{14 → 22}/node_watchdog.h +2 -0
- package/src/headers/{18 → 22}/node_worker.h +7 -2
- package/src/headers/22/permission/child_process_permission.h +31 -0
- package/src/headers/22/permission/fs_permission.h +167 -0
- package/src/headers/22/permission/inspector_permission.h +31 -0
- package/src/headers/22/permission/permission.h +99 -0
- package/src/headers/22/permission/permission_base.h +60 -0
- package/src/headers/22/permission/wasi_permission.h +31 -0
- package/src/headers/22/permission/worker_permission.h +31 -0
- package/src/headers/{16 → 22}/req_wrap-inl.h +7 -6
- package/src/headers/{14 → 22}/spawn_sync.h +3 -3
- package/src/headers/{18 → 22}/stream_base-inl.h +0 -135
- package/src/headers/{18 → 22}/stream_base.h +35 -16
- package/src/headers/{18 → 22}/stream_pipe.h +3 -4
- package/src/headers/{16 → 22}/stream_wrap.h +2 -1
- package/src/headers/{18 → 22}/string_bytes.h +5 -14
- package/src/headers/{14 → 22}/string_decoder-inl.h +0 -6
- package/src/headers/{16 → 22}/string_decoder.h +0 -1
- package/src/headers/{18 → 22}/tcp_wrap.h +1 -1
- package/src/headers/{18 → 22}/threadpoolwork-inl.h +14 -1
- package/src/headers/22/timers.h +76 -0
- package/src/headers/{18 → 22}/tracing/trace_event.h +7 -5
- package/src/headers/{16 → 22}/udp_wrap.h +8 -5
- package/src/headers/22/undici_version.h +6 -0
- package/src/headers/{18 → 22}/util-inl.h +97 -127
- package/src/headers/{18 → 22}/util.h +293 -106
- package/src/headers/{18 → 22}/v8-fast-api-calls.h +103 -58
- package/dist/bindings/cws_darwin_arm64_node83.node +0 -0
- package/dist/bindings/cws_darwin_arm64_node93.node +0 -0
- package/dist/bindings/cws_darwin_x64_node83.node +0 -0
- package/dist/bindings/cws_darwin_x64_node93.node +0 -0
- package/dist/bindings/cws_linux_arm64_node83.node +0 -0
- package/dist/bindings/cws_linux_arm64_node93.node +0 -0
- package/dist/bindings/cws_linux_x64_node83.node +0 -0
- package/dist/bindings/cws_linux_x64_node93.node +0 -0
- package/src/headers/14/aliased_buffer.h +0 -263
- package/src/headers/14/allocated_buffer-inl.h +0 -110
- package/src/headers/14/allocated_buffer.h +0 -73
- package/src/headers/14/async_wrap-inl.h +0 -94
- package/src/headers/14/async_wrap.h +0 -230
- package/src/headers/14/base64.h +0 -183
- package/src/headers/14/base_object-inl.h +0 -371
- package/src/headers/14/base_object.h +0 -281
- package/src/headers/14/callback_queue-inl.h +0 -97
- package/src/headers/14/callback_queue.h +0 -78
- package/src/headers/14/debug_utils-inl.h +0 -223
- package/src/headers/14/debug_utils.h +0 -181
- package/src/headers/14/env.h +0 -1388
- package/src/headers/14/handle_wrap.h +0 -117
- package/src/headers/14/histogram-inl.h +0 -83
- package/src/headers/14/histogram.h +0 -98
- package/src/headers/14/inspector_agent.h +0 -149
- package/src/headers/14/inspector_profiler.h +0 -137
- package/src/headers/14/js_native_api.h +0 -544
- package/src/headers/14/js_native_api_types.h +0 -143
- package/src/headers/14/js_native_api_v8.h +0 -301
- package/src/headers/14/js_native_api_v8_internals.h +0 -38
- package/src/headers/14/json_utils.h +0 -161
- package/src/headers/14/memory_tracker-inl.h +0 -355
- package/src/headers/14/module_wrap.h +0 -99
- package/src/headers/14/node.h +0 -1032
- package/src/headers/14/node_api.h +0 -255
- package/src/headers/14/node_api_types.h +0 -44
- package/src/headers/14/node_binding.h +0 -99
- package/src/headers/14/node_buffer.h +0 -92
- package/src/headers/14/node_constants.h +0 -84
- package/src/headers/14/node_context_data.h +0 -44
- package/src/headers/14/node_contextify.h +0 -161
- package/src/headers/14/node_crypto.h +0 -865
- package/src/headers/14/node_crypto_bio.h +0 -195
- package/src/headers/14/node_crypto_clienthello-inl.h +0 -91
- package/src/headers/14/node_crypto_clienthello.h +0 -132
- package/src/headers/14/node_crypto_common.h +0 -138
- package/src/headers/14/node_crypto_groups.h +0 -415
- package/src/headers/14/node_dtrace.h +0 -86
- package/src/headers/14/node_errors.h +0 -214
- package/src/headers/14/node_file-inl.h +0 -306
- package/src/headers/14/node_file.h +0 -417
- package/src/headers/14/node_http2.h +0 -1191
- package/src/headers/14/node_http2_state.h +0 -149
- package/src/headers/14/node_http_common-inl.h +0 -194
- package/src/headers/14/node_http_common.h +0 -529
- package/src/headers/14/node_i18n.h +0 -144
- package/src/headers/14/node_internals.h +0 -405
- package/src/headers/14/node_main_instance.h +0 -96
- package/src/headers/14/node_mem.h +0 -45
- package/src/headers/14/node_messaging.h +0 -303
- package/src/headers/14/node_metadata.h +0 -109
- package/src/headers/14/node_mutex.h +0 -247
- package/src/headers/14/node_native_module.h +0 -101
- package/src/headers/14/node_native_module_env.h +0 -66
- package/src/headers/14/node_options-inl.h +0 -451
- package/src/headers/14/node_options.h +0 -481
- package/src/headers/14/node_perf.h +0 -181
- package/src/headers/14/node_perf_common.h +0 -97
- package/src/headers/14/node_platform.h +0 -189
- package/src/headers/14/node_process.h +0 -40
- package/src/headers/14/node_report.h +0 -47
- package/src/headers/14/node_revert.h +0 -72
- package/src/headers/14/node_root_certs.h +0 -3458
- package/src/headers/14/node_sockaddr-inl.h +0 -170
- package/src/headers/14/node_sockaddr.h +0 -123
- package/src/headers/14/node_stat_watcher.h +0 -70
- package/src/headers/14/node_union_bytes.h +0 -103
- package/src/headers/14/node_url.h +0 -188
- package/src/headers/14/node_version.h +0 -98
- package/src/headers/14/node_wasi.h +0 -108
- package/src/headers/14/node_win32_etw_provider-inl.h +0 -287
- package/src/headers/14/node_win32_etw_provider.h +0 -99
- package/src/headers/14/node_worker.h +0 -141
- package/src/headers/14/pipe_wrap.h +0 -78
- package/src/headers/14/req_wrap-inl.h +0 -170
- package/src/headers/14/req_wrap.h +0 -77
- package/src/headers/14/stream_base-inl.h +0 -275
- package/src/headers/14/stream_base.h +0 -434
- package/src/headers/14/stream_pipe.h +0 -73
- package/src/headers/14/stream_wrap.h +0 -130
- package/src/headers/14/string_bytes.h +0 -129
- package/src/headers/14/string_decoder.h +0 -50
- package/src/headers/14/string_search.h +0 -638
- package/src/headers/14/tcp_wrap.h +0 -101
- package/src/headers/14/threadpoolwork-inl.h +0 -57
- package/src/headers/14/tls_wrap.h +0 -222
- package/src/headers/14/tracing/agent.h +0 -195
- package/src/headers/14/tracing/trace_event.h +0 -720
- package/src/headers/14/tty_wrap.h +0 -64
- package/src/headers/14/udp_wrap.h +0 -227
- package/src/headers/14/util-inl.h +0 -566
- package/src/headers/14/util.h +0 -804
- package/src/headers/14/v8abbr.h +0 -124
- package/src/headers/16/aliased_buffer.h +0 -315
- package/src/headers/16/aliased_struct-inl.h +0 -54
- package/src/headers/16/aliased_struct.h +0 -63
- package/src/headers/16/allocated_buffer-inl.h +0 -110
- package/src/headers/16/allocated_buffer.h +0 -73
- package/src/headers/16/async_wrap-inl.h +0 -94
- package/src/headers/16/async_wrap.h +0 -246
- package/src/headers/16/base64-inl.h +0 -189
- package/src/headers/16/base64.h +0 -69
- package/src/headers/16/base_object.h +0 -294
- package/src/headers/16/connect_wrap.h +0 -26
- package/src/headers/16/connection_wrap.h +0 -30
- package/src/headers/16/crypto/crypto_aes.h +0 -89
- package/src/headers/16/crypto/crypto_bio.h +0 -194
- package/src/headers/16/crypto/crypto_cipher.h +0 -286
- package/src/headers/16/crypto/crypto_clienthello-inl.h +0 -90
- package/src/headers/16/crypto/crypto_clienthello.h +0 -131
- package/src/headers/16/crypto/crypto_common.h +0 -187
- package/src/headers/16/crypto/crypto_context.h +0 -147
- package/src/headers/16/crypto/crypto_dh.h +0 -157
- package/src/headers/16/crypto/crypto_dsa.h +0 -76
- package/src/headers/16/crypto/crypto_ec.h +0 -169
- package/src/headers/16/crypto/crypto_groups.h +0 -415
- package/src/headers/16/crypto/crypto_hash.h +0 -89
- package/src/headers/16/crypto/crypto_hkdf.h +0 -66
- package/src/headers/16/crypto/crypto_hmac.h +0 -94
- package/src/headers/16/crypto/crypto_keygen.h +0 -301
- package/src/headers/16/crypto/crypto_keys.h +0 -412
- package/src/headers/16/crypto/crypto_pbkdf2.h +0 -76
- package/src/headers/16/crypto/crypto_random.h +0 -130
- package/src/headers/16/crypto/crypto_rsa.h +0 -141
- package/src/headers/16/crypto/crypto_scrypt.h +0 -87
- package/src/headers/16/crypto/crypto_sig.h +0 -167
- package/src/headers/16/crypto/crypto_spkac.h +0 -20
- package/src/headers/16/crypto/crypto_timing.h +0 -20
- package/src/headers/16/crypto/crypto_tls.h +0 -292
- package/src/headers/16/crypto/crypto_util.h +0 -736
- package/src/headers/16/crypto/crypto_x509.h +0 -141
- package/src/headers/16/debug_utils.h +0 -184
- package/src/headers/16/diagnosticfilename-inl.h +0 -33
- package/src/headers/16/env-inl.h +0 -1277
- package/src/headers/16/env.h +0 -1629
- package/src/headers/16/handle_wrap.h +0 -121
- package/src/headers/16/histogram-inl.h +0 -88
- package/src/headers/16/histogram.h +0 -216
- package/src/headers/16/inspector_io.h +0 -78
- package/src/headers/16/inspector_socket.h +0 -60
- package/src/headers/16/inspector_socket_server.h +0 -110
- package/src/headers/16/js_native_api.h +0 -561
- package/src/headers/16/js_native_api_types.h +0 -160
- package/src/headers/16/js_native_api_v8.h +0 -451
- package/src/headers/16/js_native_api_v8_internals.h +0 -39
- package/src/headers/16/js_stream.h +0 -52
- package/src/headers/16/memory_tracker-inl.h +0 -356
- package/src/headers/16/memory_tracker.h +0 -284
- package/src/headers/16/node.d +0 -315
- package/src/headers/16/node.h +0 -1132
- package/src/headers/16/node.stp +0 -146
- package/src/headers/16/node_api.h +0 -275
- package/src/headers/16/node_api_internals.h +0 -30
- package/src/headers/16/node_api_types.h +0 -50
- package/src/headers/16/node_binding.h +0 -99
- package/src/headers/16/node_blob.h +0 -191
- package/src/headers/16/node_bob-inl.h +0 -37
- package/src/headers/16/node_bob.h +0 -111
- package/src/headers/16/node_buffer.h +0 -92
- package/src/headers/16/node_constants.h +0 -84
- package/src/headers/16/node_context_data.h +0 -44
- package/src/headers/16/node_contextify.h +0 -196
- package/src/headers/16/node_dir.h +0 -52
- package/src/headers/16/node_dtrace.h +0 -86
- package/src/headers/16/node_errors.h +0 -277
- package/src/headers/16/node_external_reference.h +0 -129
- package/src/headers/16/node_file-inl.h +0 -306
- package/src/headers/16/node_http2.h +0 -1140
- package/src/headers/16/node_http_common-inl.h +0 -200
- package/src/headers/16/node_http_common.h +0 -531
- package/src/headers/16/node_internals.h +0 -421
- package/src/headers/16/node_main_instance.h +0 -103
- package/src/headers/16/node_mem-inl.h +0 -112
- package/src/headers/16/node_messaging.h +0 -373
- package/src/headers/16/node_metadata.h +0 -122
- package/src/headers/16/node_native_module.h +0 -101
- package/src/headers/16/node_native_module_env.h +0 -68
- package/src/headers/16/node_object_wrap.h +0 -132
- package/src/headers/16/node_options-inl.h +0 -477
- package/src/headers/16/node_options.h +0 -494
- package/src/headers/16/node_perf.h +0 -185
- package/src/headers/16/node_perf_common.h +0 -89
- package/src/headers/16/node_platform.h +0 -192
- package/src/headers/16/node_process.h +0 -43
- package/src/headers/16/node_provider.d +0 -80
- package/src/headers/16/node_snapshotable.h +0 -137
- package/src/headers/16/node_sockaddr-inl.h +0 -266
- package/src/headers/16/node_sockaddr.h +0 -405
- package/src/headers/16/node_union_bytes.h +0 -103
- package/src/headers/16/node_url.h +0 -205
- package/src/headers/16/node_v8.h +0 -41
- package/src/headers/16/node_v8_platform-inl.h +0 -194
- package/src/headers/16/node_version.h +0 -98
- package/src/headers/16/node_wasi.h +0 -108
- package/src/headers/16/node_watchdog.h +0 -152
- package/src/headers/16/node_win32_etw_provider-inl.h +0 -288
- package/src/headers/16/node_win32_etw_provider.h +0 -99
- package/src/headers/16/node_worker.h +0 -145
- package/src/headers/16/req_wrap.h +0 -77
- package/src/headers/16/spawn_sync.h +0 -242
- package/src/headers/16/stream_base-inl.h +0 -303
- package/src/headers/16/stream_base.h +0 -454
- package/src/headers/16/stream_pipe.h +0 -73
- package/src/headers/16/string_bytes.h +0 -122
- package/src/headers/16/string_decoder-inl.h +0 -37
- package/src/headers/16/string_search.h +0 -638
- package/src/headers/16/tcp_wrap.h +0 -103
- package/src/headers/16/threadpoolwork-inl.h +0 -57
- package/src/headers/16/timer_wrap.h +0 -84
- package/src/headers/16/tracing/agent.h +0 -195
- package/src/headers/16/tracing/node_trace_buffer.h +0 -83
- package/src/headers/16/tracing/node_trace_writer.h +0 -75
- package/src/headers/16/tracing/trace_event.h +0 -720
- package/src/headers/16/tracing/trace_event_common.h +0 -1109
- package/src/headers/16/tracing/traced_value.h +0 -70
- package/src/headers/16/tty_wrap.h +0 -66
- package/src/headers/16/util-inl.h +0 -575
- package/src/headers/16/util.h +0 -824
- package/src/headers/16/v8abbr.h +0 -123
- package/src/headers/16/v8ustack.d +0 -695
- package/src/headers/18/aliased_buffer.h +0 -315
- package/src/headers/18/aliased_struct-inl.h +0 -54
- package/src/headers/18/aliased_struct.h +0 -63
- package/src/headers/18/base64-inl.h +0 -189
- package/src/headers/18/base64.h +0 -69
- package/src/headers/18/base_object-inl.h +0 -374
- package/src/headers/18/callback_queue-inl.h +0 -97
- package/src/headers/18/callback_queue.h +0 -78
- package/src/headers/18/cares_wrap.h +0 -523
- package/src/headers/18/connect_wrap.h +0 -26
- package/src/headers/18/connection_wrap.h +0 -30
- package/src/headers/18/crypto/crypto_aes.h +0 -89
- package/src/headers/18/crypto/crypto_bio.h +0 -194
- package/src/headers/18/crypto/crypto_cipher.h +0 -291
- package/src/headers/18/crypto/crypto_clienthello-inl.h +0 -90
- package/src/headers/18/crypto/crypto_common.h +0 -151
- package/src/headers/18/crypto/crypto_dh.h +0 -156
- package/src/headers/18/crypto/crypto_dsa.h +0 -77
- package/src/headers/18/crypto/crypto_ec.h +0 -170
- package/src/headers/18/crypto/crypto_groups.h +0 -415
- package/src/headers/18/crypto/crypto_hash.h +0 -89
- package/src/headers/18/crypto/crypto_hkdf.h +0 -65
- package/src/headers/18/crypto/crypto_hmac.h +0 -94
- package/src/headers/18/crypto/crypto_keygen.h +0 -305
- package/src/headers/18/crypto/crypto_pbkdf2.h +0 -76
- package/src/headers/18/crypto/crypto_random.h +0 -130
- package/src/headers/18/crypto/crypto_rsa.h +0 -141
- package/src/headers/18/crypto/crypto_scrypt.h +0 -87
- package/src/headers/18/crypto/crypto_sig.h +0 -168
- package/src/headers/18/crypto/crypto_spkac.h +0 -21
- package/src/headers/18/crypto/crypto_timing.h +0 -20
- package/src/headers/18/crypto/crypto_x509.h +0 -143
- package/src/headers/18/debug_utils-inl.h +0 -223
- package/src/headers/18/diagnosticfilename-inl.h +0 -33
- package/src/headers/18/env-inl.h +0 -1308
- package/src/headers/18/env.h +0 -1667
- package/src/headers/18/inspector_agent.h +0 -144
- package/src/headers/18/inspector_io.h +0 -78
- package/src/headers/18/inspector_profiler.h +0 -149
- package/src/headers/18/inspector_socket.h +0 -60
- package/src/headers/18/inspector_socket_server.h +0 -110
- package/src/headers/18/js_stream.h +0 -52
- package/src/headers/18/json_utils.h +0 -161
- package/src/headers/18/memory_tracker.h +0 -284
- package/src/headers/18/module_wrap.h +0 -116
- package/src/headers/18/node_binding.h +0 -99
- package/src/headers/18/node_context_data.h +0 -44
- package/src/headers/18/node_contextify.h +0 -196
- package/src/headers/18/node_crypto.h +0 -57
- package/src/headers/18/node_dir.h +0 -52
- package/src/headers/18/node_dtrace.h +0 -86
- package/src/headers/18/node_external_reference.h +0 -145
- package/src/headers/18/node_file.h +0 -426
- package/src/headers/18/node_http2_state.h +0 -149
- package/src/headers/18/node_i18n.h +0 -145
- package/src/headers/18/node_mem-inl.h +0 -112
- package/src/headers/18/node_mem.h +0 -45
- package/src/headers/18/node_mutex.h +0 -323
- package/src/headers/18/node_native_module.h +0 -109
- package/src/headers/18/node_native_module_env.h +0 -71
- package/src/headers/18/node_object_wrap.h +0 -132
- package/src/headers/18/node_process-inl.h +0 -26
- package/src/headers/18/node_report.h +0 -47
- package/src/headers/18/node_revert.h +0 -82
- package/src/headers/18/node_root_certs.h +0 -3246
- package/src/headers/18/node_snapshot_builder.h +0 -43
- package/src/headers/18/node_snapshotable.h +0 -130
- package/src/headers/18/node_stat_watcher.h +0 -72
- package/src/headers/18/node_union_bytes.h +0 -103
- package/src/headers/18/node_url.h +0 -205
- package/src/headers/18/node_v8.h +0 -41
- package/src/headers/18/node_v8_platform-inl.h +0 -194
- package/src/headers/18/node_wasi.h +0 -108
- package/src/headers/18/node_watchdog.h +0 -152
- package/src/headers/18/node_win32_etw_provider-inl.h +0 -288
- package/src/headers/18/node_win32_etw_provider.h +0 -99
- package/src/headers/18/pipe_wrap.h +0 -80
- package/src/headers/18/req_wrap-inl.h +0 -170
- package/src/headers/18/spawn_sync.h +0 -242
- package/src/headers/18/stream_wrap.h +0 -133
- package/src/headers/18/string_decoder-inl.h +0 -37
- package/src/headers/18/string_decoder.h +0 -50
- package/src/headers/18/string_search.h +0 -638
- package/src/headers/18/tracing/node_trace_buffer.h +0 -83
- package/src/headers/18/tracing/node_trace_writer.h +0 -75
- package/src/headers/18/tracing/trace_event_common.h +0 -1109
- package/src/headers/18/tracing/traced_value.h +0 -70
- package/src/headers/18/udp_wrap.h +0 -227
- package/src/headers/18/v8abbr.h +0 -123
- /package/src/headers/{14 → 20}/tracing/node_trace_buffer.h +0 -0
- /package/src/headers/{14 → 20}/tracing/node_trace_writer.h +0 -0
- /package/src/headers/{14 → 20}/tracing/traced_value.h +0 -0
- /package/src/headers/{14 → 22}/aliased_struct-inl.h +0 -0
- /package/src/headers/{14 → 22}/aliased_struct.h +0 -0
- /package/src/headers/{16 → 22}/callback_queue-inl.h +0 -0
- /package/src/headers/{14 → 22}/connect_wrap.h +0 -0
- /package/src/headers/{14 → 22}/connection_wrap.h +0 -0
- /package/src/headers/{14 → 22}/diagnosticfilename-inl.h +0 -0
- /package/src/headers/{18 → 22}/histogram-inl.h +0 -0
- /package/src/headers/{14 → 22}/inspector_io.h +0 -0
- /package/src/headers/{14 → 22}/inspector_socket.h +0 -0
- /package/src/headers/{14 → 22}/inspector_socket_server.h +0 -0
- /package/src/headers/{14 → 22}/js_stream.h +0 -0
- /package/src/headers/{14 → 22}/node_dir.h +0 -0
- /package/src/headers/{14 → 22}/node_mem-inl.h +0 -0
- /package/src/headers/{16 → 22}/node_mem.h +0 -0
- /package/src/headers/{16 → 22}/node_mutex.h +0 -0
- /package/src/headers/{14 → 22}/node_object_wrap.h +0 -0
- /package/src/headers/{16 → 22}/node_process-inl.h +0 -0
- /package/src/headers/{18 → 22}/node_sockaddr-inl.h +0 -0
- /package/src/headers/{18 → 22}/node_wasm_web_api.h +0 -0
- /package/src/headers/{16 → 22}/pipe_wrap.h +0 -0
- /package/src/headers/{18 → 22}/req_wrap.h +0 -0
- /package/src/headers/{18 → 22}/timer_wrap-inl.h +0 -0
- /package/src/headers/{18 → 22}/timer_wrap.h +0 -0
- /package/src/headers/{18 → 22}/tracing/agent.h +0 -0
- /package/src/headers/{14 → 22}/tracing/trace_event_common.h +0 -0
- /package/src/headers/{18 → 22}/tty_wrap.h +0 -0
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
#ifndef SRC_NODE_PERF_COMMON_H_
|
|
2
|
-
#define SRC_NODE_PERF_COMMON_H_
|
|
3
|
-
|
|
4
|
-
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
|
|
5
|
-
|
|
6
|
-
#include "aliased_buffer.h"
|
|
7
|
-
#include "node.h"
|
|
8
|
-
#include "uv.h"
|
|
9
|
-
#include "v8.h"
|
|
10
|
-
|
|
11
|
-
#include <algorithm>
|
|
12
|
-
#include <iostream>
|
|
13
|
-
#include <map>
|
|
14
|
-
#include <string>
|
|
15
|
-
|
|
16
|
-
namespace node {
|
|
17
|
-
namespace performance {
|
|
18
|
-
|
|
19
|
-
#define PERFORMANCE_NOW() uv_hrtime()
|
|
20
|
-
|
|
21
|
-
// These occur before the environment is created. Cache them
|
|
22
|
-
// here and add them to the milestones when the env is init'd.
|
|
23
|
-
extern uint64_t performance_v8_start;
|
|
24
|
-
|
|
25
|
-
#define NODE_PERFORMANCE_MILESTONES(V) \
|
|
26
|
-
V(ENVIRONMENT, "environment") \
|
|
27
|
-
V(NODE_START, "nodeStart") \
|
|
28
|
-
V(V8_START, "v8Start") \
|
|
29
|
-
V(LOOP_START, "loopStart") \
|
|
30
|
-
V(LOOP_EXIT, "loopExit") \
|
|
31
|
-
V(BOOTSTRAP_COMPLETE, "bootstrapComplete")
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
#define NODE_PERFORMANCE_ENTRY_TYPES(V) \
|
|
35
|
-
V(GC, "gc") \
|
|
36
|
-
V(HTTP, "http") \
|
|
37
|
-
V(HTTP2, "http2")
|
|
38
|
-
|
|
39
|
-
enum PerformanceMilestone {
|
|
40
|
-
#define V(name, _) NODE_PERFORMANCE_MILESTONE_##name,
|
|
41
|
-
NODE_PERFORMANCE_MILESTONES(V)
|
|
42
|
-
#undef V
|
|
43
|
-
NODE_PERFORMANCE_MILESTONE_INVALID
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
enum PerformanceEntryType {
|
|
47
|
-
#define V(name, _) NODE_PERFORMANCE_ENTRY_TYPE_##name,
|
|
48
|
-
NODE_PERFORMANCE_ENTRY_TYPES(V)
|
|
49
|
-
#undef V
|
|
50
|
-
NODE_PERFORMANCE_ENTRY_TYPE_INVALID
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
class PerformanceState {
|
|
54
|
-
public:
|
|
55
|
-
struct SerializeInfo {
|
|
56
|
-
AliasedBufferIndex root;
|
|
57
|
-
AliasedBufferIndex milestones;
|
|
58
|
-
AliasedBufferIndex observers;
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
explicit PerformanceState(v8::Isolate* isolate, const SerializeInfo* info);
|
|
62
|
-
SerializeInfo Serialize(v8::Local<v8::Context> context,
|
|
63
|
-
v8::SnapshotCreator* creator);
|
|
64
|
-
void Deserialize(v8::Local<v8::Context> context);
|
|
65
|
-
friend std::ostream& operator<<(std::ostream& o, const SerializeInfo& i);
|
|
66
|
-
|
|
67
|
-
AliasedUint8Array root;
|
|
68
|
-
AliasedFloat64Array milestones;
|
|
69
|
-
AliasedUint32Array observers;
|
|
70
|
-
|
|
71
|
-
uint64_t performance_last_gc_start_mark = 0;
|
|
72
|
-
|
|
73
|
-
void Mark(enum PerformanceMilestone milestone,
|
|
74
|
-
uint64_t ts = PERFORMANCE_NOW());
|
|
75
|
-
|
|
76
|
-
private:
|
|
77
|
-
struct performance_state_internal {
|
|
78
|
-
// doubles first so that they are always sizeof(double)-aligned
|
|
79
|
-
double milestones[NODE_PERFORMANCE_MILESTONE_INVALID];
|
|
80
|
-
uint32_t observers[NODE_PERFORMANCE_ENTRY_TYPE_INVALID];
|
|
81
|
-
};
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
} // namespace performance
|
|
85
|
-
} // namespace node
|
|
86
|
-
|
|
87
|
-
#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
|
|
88
|
-
|
|
89
|
-
#endif // SRC_NODE_PERF_COMMON_H_
|
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
#ifndef SRC_NODE_PLATFORM_H_
|
|
2
|
-
#define SRC_NODE_PLATFORM_H_
|
|
3
|
-
|
|
4
|
-
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
|
|
5
|
-
|
|
6
|
-
#include <queue>
|
|
7
|
-
#include <unordered_map>
|
|
8
|
-
#include <vector>
|
|
9
|
-
#include <functional>
|
|
10
|
-
|
|
11
|
-
#include "libplatform/libplatform.h"
|
|
12
|
-
#include "node.h"
|
|
13
|
-
#include "node_mutex.h"
|
|
14
|
-
#include "uv.h"
|
|
15
|
-
|
|
16
|
-
namespace node {
|
|
17
|
-
|
|
18
|
-
class NodePlatform;
|
|
19
|
-
class IsolateData;
|
|
20
|
-
class PerIsolatePlatformData;
|
|
21
|
-
|
|
22
|
-
template <class T>
|
|
23
|
-
class TaskQueue {
|
|
24
|
-
public:
|
|
25
|
-
TaskQueue();
|
|
26
|
-
~TaskQueue() = default;
|
|
27
|
-
|
|
28
|
-
void Push(std::unique_ptr<T> task);
|
|
29
|
-
std::unique_ptr<T> Pop();
|
|
30
|
-
std::unique_ptr<T> BlockingPop();
|
|
31
|
-
std::queue<std::unique_ptr<T>> PopAll();
|
|
32
|
-
void NotifyOfCompletion();
|
|
33
|
-
void BlockingDrain();
|
|
34
|
-
void Stop();
|
|
35
|
-
|
|
36
|
-
private:
|
|
37
|
-
Mutex lock_;
|
|
38
|
-
ConditionVariable tasks_available_;
|
|
39
|
-
ConditionVariable tasks_drained_;
|
|
40
|
-
int outstanding_tasks_;
|
|
41
|
-
bool stopped_;
|
|
42
|
-
std::queue<std::unique_ptr<T>> task_queue_;
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
struct DelayedTask {
|
|
46
|
-
std::unique_ptr<v8::Task> task;
|
|
47
|
-
uv_timer_t timer;
|
|
48
|
-
double timeout;
|
|
49
|
-
std::shared_ptr<PerIsolatePlatformData> platform_data;
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
// This acts as the foreground task runner for a given Isolate.
|
|
53
|
-
class PerIsolatePlatformData :
|
|
54
|
-
public IsolatePlatformDelegate,
|
|
55
|
-
public v8::TaskRunner,
|
|
56
|
-
public std::enable_shared_from_this<PerIsolatePlatformData> {
|
|
57
|
-
public:
|
|
58
|
-
PerIsolatePlatformData(v8::Isolate* isolate, uv_loop_t* loop);
|
|
59
|
-
~PerIsolatePlatformData() override;
|
|
60
|
-
|
|
61
|
-
std::shared_ptr<v8::TaskRunner> GetForegroundTaskRunner() override;
|
|
62
|
-
void PostTask(std::unique_ptr<v8::Task> task) override;
|
|
63
|
-
void PostIdleTask(std::unique_ptr<v8::IdleTask> task) override;
|
|
64
|
-
void PostDelayedTask(std::unique_ptr<v8::Task> task,
|
|
65
|
-
double delay_in_seconds) override;
|
|
66
|
-
bool IdleTasksEnabled() override { return false; }
|
|
67
|
-
|
|
68
|
-
// Non-nestable tasks are treated like regular tasks.
|
|
69
|
-
bool NonNestableTasksEnabled() const override { return true; }
|
|
70
|
-
bool NonNestableDelayedTasksEnabled() const override { return true; }
|
|
71
|
-
void PostNonNestableTask(std::unique_ptr<v8::Task> task) override;
|
|
72
|
-
void PostNonNestableDelayedTask(std::unique_ptr<v8::Task> task,
|
|
73
|
-
double delay_in_seconds) override;
|
|
74
|
-
|
|
75
|
-
void AddShutdownCallback(void (*callback)(void*), void* data);
|
|
76
|
-
void Shutdown();
|
|
77
|
-
|
|
78
|
-
// Returns true if work was dispatched or executed. New tasks that are
|
|
79
|
-
// posted during flushing of the queue are postponed until the next
|
|
80
|
-
// flushing.
|
|
81
|
-
bool FlushForegroundTasksInternal();
|
|
82
|
-
|
|
83
|
-
const uv_loop_t* event_loop() const { return loop_; }
|
|
84
|
-
|
|
85
|
-
private:
|
|
86
|
-
void DeleteFromScheduledTasks(DelayedTask* task);
|
|
87
|
-
void DecreaseHandleCount();
|
|
88
|
-
|
|
89
|
-
static void FlushTasks(uv_async_t* handle);
|
|
90
|
-
void RunForegroundTask(std::unique_ptr<v8::Task> task);
|
|
91
|
-
static void RunForegroundTask(uv_timer_t* timer);
|
|
92
|
-
|
|
93
|
-
struct ShutdownCallback {
|
|
94
|
-
void (*cb)(void*);
|
|
95
|
-
void* data;
|
|
96
|
-
};
|
|
97
|
-
typedef std::vector<ShutdownCallback> ShutdownCbList;
|
|
98
|
-
ShutdownCbList shutdown_callbacks_;
|
|
99
|
-
// shared_ptr to self to keep this object alive during shutdown.
|
|
100
|
-
std::shared_ptr<PerIsolatePlatformData> self_reference_;
|
|
101
|
-
uint32_t uv_handle_count_ = 1; // 1 = flush_tasks_
|
|
102
|
-
|
|
103
|
-
v8::Isolate* const isolate_;
|
|
104
|
-
uv_loop_t* const loop_;
|
|
105
|
-
uv_async_t* flush_tasks_ = nullptr;
|
|
106
|
-
TaskQueue<v8::Task> foreground_tasks_;
|
|
107
|
-
TaskQueue<DelayedTask> foreground_delayed_tasks_;
|
|
108
|
-
|
|
109
|
-
// Use a custom deleter because libuv needs to close the handle first.
|
|
110
|
-
typedef std::unique_ptr<DelayedTask, void(*)(DelayedTask*)>
|
|
111
|
-
DelayedTaskPointer;
|
|
112
|
-
std::vector<DelayedTaskPointer> scheduled_delayed_tasks_;
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
// This acts as the single worker thread task runner for all Isolates.
|
|
116
|
-
class WorkerThreadsTaskRunner {
|
|
117
|
-
public:
|
|
118
|
-
explicit WorkerThreadsTaskRunner(int thread_pool_size);
|
|
119
|
-
|
|
120
|
-
void PostTask(std::unique_ptr<v8::Task> task);
|
|
121
|
-
void PostDelayedTask(std::unique_ptr<v8::Task> task,
|
|
122
|
-
double delay_in_seconds);
|
|
123
|
-
|
|
124
|
-
void BlockingDrain();
|
|
125
|
-
void Shutdown();
|
|
126
|
-
|
|
127
|
-
int NumberOfWorkerThreads() const;
|
|
128
|
-
|
|
129
|
-
private:
|
|
130
|
-
TaskQueue<v8::Task> pending_worker_tasks_;
|
|
131
|
-
|
|
132
|
-
class DelayedTaskScheduler;
|
|
133
|
-
std::unique_ptr<DelayedTaskScheduler> delayed_task_scheduler_;
|
|
134
|
-
|
|
135
|
-
std::vector<std::unique_ptr<uv_thread_t>> threads_;
|
|
136
|
-
};
|
|
137
|
-
|
|
138
|
-
class NodePlatform : public MultiIsolatePlatform {
|
|
139
|
-
public:
|
|
140
|
-
NodePlatform(int thread_pool_size,
|
|
141
|
-
v8::TracingController* tracing_controller);
|
|
142
|
-
~NodePlatform() override;
|
|
143
|
-
|
|
144
|
-
void DrainTasks(v8::Isolate* isolate) override;
|
|
145
|
-
void Shutdown();
|
|
146
|
-
|
|
147
|
-
// v8::Platform implementation.
|
|
148
|
-
int NumberOfWorkerThreads() override;
|
|
149
|
-
void CallOnWorkerThread(std::unique_ptr<v8::Task> task) override;
|
|
150
|
-
void CallDelayedOnWorkerThread(std::unique_ptr<v8::Task> task,
|
|
151
|
-
double delay_in_seconds) override;
|
|
152
|
-
bool IdleTasksEnabled(v8::Isolate* isolate) override;
|
|
153
|
-
double MonotonicallyIncreasingTime() override;
|
|
154
|
-
double CurrentClockTimeMillis() override;
|
|
155
|
-
v8::TracingController* GetTracingController() override;
|
|
156
|
-
bool FlushForegroundTasks(v8::Isolate* isolate) override;
|
|
157
|
-
std::unique_ptr<v8::JobHandle> PostJob(
|
|
158
|
-
v8::TaskPriority priority,
|
|
159
|
-
std::unique_ptr<v8::JobTask> job_task) override;
|
|
160
|
-
|
|
161
|
-
void RegisterIsolate(v8::Isolate* isolate, uv_loop_t* loop) override;
|
|
162
|
-
void RegisterIsolate(v8::Isolate* isolate,
|
|
163
|
-
IsolatePlatformDelegate* delegate) override;
|
|
164
|
-
|
|
165
|
-
void UnregisterIsolate(v8::Isolate* isolate) override;
|
|
166
|
-
void AddIsolateFinishedCallback(v8::Isolate* isolate,
|
|
167
|
-
void (*callback)(void*), void* data) override;
|
|
168
|
-
|
|
169
|
-
std::shared_ptr<v8::TaskRunner> GetForegroundTaskRunner(
|
|
170
|
-
v8::Isolate* isolate) override;
|
|
171
|
-
|
|
172
|
-
Platform::StackTracePrinter GetStackTracePrinter() override;
|
|
173
|
-
|
|
174
|
-
private:
|
|
175
|
-
IsolatePlatformDelegate* ForIsolate(v8::Isolate* isolate);
|
|
176
|
-
std::shared_ptr<PerIsolatePlatformData> ForNodeIsolate(v8::Isolate* isolate);
|
|
177
|
-
|
|
178
|
-
Mutex per_isolate_mutex_;
|
|
179
|
-
using DelegatePair = std::pair<
|
|
180
|
-
IsolatePlatformDelegate*, std::shared_ptr<PerIsolatePlatformData>>;
|
|
181
|
-
std::unordered_map<v8::Isolate*, DelegatePair> per_isolate_;
|
|
182
|
-
|
|
183
|
-
v8::TracingController* tracing_controller_;
|
|
184
|
-
std::shared_ptr<WorkerThreadsTaskRunner> worker_thread_task_runner_;
|
|
185
|
-
bool has_shut_down_ = false;
|
|
186
|
-
};
|
|
187
|
-
|
|
188
|
-
} // namespace node
|
|
189
|
-
|
|
190
|
-
#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
|
|
191
|
-
|
|
192
|
-
#endif // SRC_NODE_PLATFORM_H_
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
#ifndef SRC_NODE_PROCESS_H_
|
|
2
|
-
#define SRC_NODE_PROCESS_H_
|
|
3
|
-
|
|
4
|
-
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
|
|
5
|
-
|
|
6
|
-
#include "v8.h"
|
|
7
|
-
|
|
8
|
-
namespace node {
|
|
9
|
-
|
|
10
|
-
v8::MaybeLocal<v8::Object> CreateEnvVarProxy(v8::Local<v8::Context> context,
|
|
11
|
-
v8::Isolate* isolate);
|
|
12
|
-
|
|
13
|
-
// Most of the time, it's best to use `console.error` to write
|
|
14
|
-
// to the process.stderr stream. However, in some cases, such as
|
|
15
|
-
// when debugging the stream.Writable class or the process.nextTick
|
|
16
|
-
// function, it is useful to bypass JavaScript entirely.
|
|
17
|
-
void RawDebug(const v8::FunctionCallbackInfo<v8::Value>& args);
|
|
18
|
-
|
|
19
|
-
v8::MaybeLocal<v8::Value> ProcessEmit(Environment* env,
|
|
20
|
-
const char* event,
|
|
21
|
-
v8::Local<v8::Value> message);
|
|
22
|
-
|
|
23
|
-
v8::Maybe<bool> ProcessEmitWarningGeneric(Environment* env,
|
|
24
|
-
const char* warning,
|
|
25
|
-
const char* type = nullptr,
|
|
26
|
-
const char* code = nullptr);
|
|
27
|
-
|
|
28
|
-
template <typename... Args>
|
|
29
|
-
inline v8::Maybe<bool> ProcessEmitWarning(Environment* env,
|
|
30
|
-
const char* fmt,
|
|
31
|
-
Args&&... args);
|
|
32
|
-
v8::Maybe<bool> ProcessEmitExperimentalWarning(Environment* env,
|
|
33
|
-
const char* warning);
|
|
34
|
-
v8::Maybe<bool> ProcessEmitDeprecationWarning(Environment* env,
|
|
35
|
-
const char* warning,
|
|
36
|
-
const char* deprecation_code);
|
|
37
|
-
|
|
38
|
-
v8::MaybeLocal<v8::Object> CreateProcessObject(Environment* env);
|
|
39
|
-
void PatchProcessObject(const v8::FunctionCallbackInfo<v8::Value>& args);
|
|
40
|
-
|
|
41
|
-
} // namespace node
|
|
42
|
-
#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
|
|
43
|
-
#endif // SRC_NODE_PROCESS_H_
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
/* Copyright Joyent, Inc. and other Node contributors.
|
|
2
|
-
*
|
|
3
|
-
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
4
|
-
* copy of this software and associated documentation files (the
|
|
5
|
-
* "Software"), to deal in the Software without restriction, including
|
|
6
|
-
* without limitation the rights to use, copy, modify, merge, publish,
|
|
7
|
-
* distribute, sublicense, and/or sell copies of the Software, and to permit
|
|
8
|
-
* persons to whom the Software is furnished to do so, subject to the
|
|
9
|
-
* following conditions:
|
|
10
|
-
*
|
|
11
|
-
* The above copyright notice and this permission notice shall be included
|
|
12
|
-
* in all copies or substantial portions of the Software.
|
|
13
|
-
*
|
|
14
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
15
|
-
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
16
|
-
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
|
17
|
-
* NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
18
|
-
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
19
|
-
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
20
|
-
* USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
/*
|
|
24
|
-
* DTrace provider for node.js.
|
|
25
|
-
*/
|
|
26
|
-
|
|
27
|
-
/*
|
|
28
|
-
* In order to have the information we need here to create the provider,
|
|
29
|
-
* we must declare bogus definitions for our depended-upon structures. And
|
|
30
|
-
* yes, the fact that we need to do this represents a shortcoming in DTrace,
|
|
31
|
-
* one that would be resolved by that elusive El Dorado: dynamic translators.
|
|
32
|
-
*/
|
|
33
|
-
|
|
34
|
-
typedef struct {
|
|
35
|
-
int dummy;
|
|
36
|
-
} node_dtrace_connection_t;
|
|
37
|
-
|
|
38
|
-
typedef struct {
|
|
39
|
-
int dummy;
|
|
40
|
-
} node_connection_t;
|
|
41
|
-
|
|
42
|
-
typedef struct {
|
|
43
|
-
int dummy;
|
|
44
|
-
} node_dtrace_http_server_request_t;
|
|
45
|
-
|
|
46
|
-
typedef struct {
|
|
47
|
-
int dummy;
|
|
48
|
-
} node_dtrace_http_client_request_t;
|
|
49
|
-
|
|
50
|
-
typedef struct {
|
|
51
|
-
int dummy;
|
|
52
|
-
} node_http_request_t;
|
|
53
|
-
|
|
54
|
-
provider node {
|
|
55
|
-
probe net__server__connection(node_dtrace_connection_t *c,
|
|
56
|
-
const char *a, int p, int fd) : (node_connection_t *c, string a, int p,
|
|
57
|
-
int fd);
|
|
58
|
-
probe net__stream__end(node_dtrace_connection_t *c, const char *a,
|
|
59
|
-
int p, int fd) : (node_connection_t *c, string a, int p, int fd);
|
|
60
|
-
probe http__server__request(node_dtrace_http_server_request_t *h,
|
|
61
|
-
node_dtrace_connection_t *c, const char *a, int p, const char *m,
|
|
62
|
-
const char *u, int fd) : (node_http_request_t *h, node_connection_t *c,
|
|
63
|
-
string a, int p, string m, string u, int fd);
|
|
64
|
-
probe http__server__response(node_dtrace_connection_t *c, const char *a,
|
|
65
|
-
int p, int fd) : (node_connection_t *c, string a, int p, int fd);
|
|
66
|
-
probe http__client__request(node_dtrace_http_client_request_t *h,
|
|
67
|
-
node_dtrace_connection_t *c, const char *a, int p, const char *m,
|
|
68
|
-
const char *u, int fd) : (node_http_request_t *h, node_connection_t *c,
|
|
69
|
-
string a, int p, string m, string u, int fd);
|
|
70
|
-
probe http__client__response(node_dtrace_connection_t *c, const char *a,
|
|
71
|
-
int p, int fd) : (node_connection_t *c, string a, int p, int fd);
|
|
72
|
-
probe gc__start(int t, int f, void *isolate);
|
|
73
|
-
probe gc__done(int t, int f, void *isolate);
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
#pragma D attributes Evolving/Evolving/ISA provider node provider
|
|
77
|
-
#pragma D attributes Private/Private/Unknown provider node module
|
|
78
|
-
#pragma D attributes Private/Private/Unknown provider node function
|
|
79
|
-
#pragma D attributes Private/Private/ISA provider node name
|
|
80
|
-
#pragma D attributes Evolving/Evolving/ISA provider node args
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
#ifndef SRC_NODE_SNAPSHOTABLE_H_
|
|
3
|
-
#define SRC_NODE_SNAPSHOTABLE_H_
|
|
4
|
-
|
|
5
|
-
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
|
|
6
|
-
|
|
7
|
-
#include "base_object.h"
|
|
8
|
-
#include "util.h"
|
|
9
|
-
|
|
10
|
-
namespace node {
|
|
11
|
-
|
|
12
|
-
class Environment;
|
|
13
|
-
struct EnvSerializeInfo;
|
|
14
|
-
struct SnapshotData;
|
|
15
|
-
|
|
16
|
-
#define SERIALIZABLE_OBJECT_TYPES(V) \
|
|
17
|
-
V(fs_binding_data, fs::BindingData) \
|
|
18
|
-
V(v8_binding_data, v8_utils::BindingData) \
|
|
19
|
-
V(blob_binding_data, BlobBindingData)
|
|
20
|
-
|
|
21
|
-
enum class EmbedderObjectType : uint8_t {
|
|
22
|
-
k_default = 0,
|
|
23
|
-
#define V(PropertyName, NativeType) k_##PropertyName,
|
|
24
|
-
SERIALIZABLE_OBJECT_TYPES(V)
|
|
25
|
-
#undef V
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
// When serializing an embedder object, we'll serialize the native states
|
|
29
|
-
// into a chunk that can be mapped into a subclass of InternalFieldInfo,
|
|
30
|
-
// and pass it into the V8 callback as the payload of StartupData.
|
|
31
|
-
// TODO(joyeecheung): the classification of types seem to be wrong.
|
|
32
|
-
// We'd need a type for each field of each class of native object.
|
|
33
|
-
// Maybe it's fine - we'll just use the type to invoke BaseObject constructors
|
|
34
|
-
// and specify that the BaseObject has only one field for us to serialize.
|
|
35
|
-
// And for non-BaseObject embedder objects, we'll use field-wise types.
|
|
36
|
-
// The memory chunk looks like this:
|
|
37
|
-
//
|
|
38
|
-
// [ type ] - EmbedderObjectType (a uint8_t)
|
|
39
|
-
// [ length ] - a size_t
|
|
40
|
-
// [ ... ] - custom bytes of size |length - header size|
|
|
41
|
-
struct InternalFieldInfo {
|
|
42
|
-
EmbedderObjectType type;
|
|
43
|
-
size_t length;
|
|
44
|
-
|
|
45
|
-
InternalFieldInfo() = delete;
|
|
46
|
-
|
|
47
|
-
static InternalFieldInfo* New(EmbedderObjectType type) {
|
|
48
|
-
return New(type, sizeof(InternalFieldInfo));
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
static InternalFieldInfo* New(EmbedderObjectType type, size_t length) {
|
|
52
|
-
InternalFieldInfo* result =
|
|
53
|
-
reinterpret_cast<InternalFieldInfo*>(::operator new[](length));
|
|
54
|
-
result->type = type;
|
|
55
|
-
result->length = length;
|
|
56
|
-
return result;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
InternalFieldInfo* Copy() const {
|
|
60
|
-
InternalFieldInfo* result =
|
|
61
|
-
reinterpret_cast<InternalFieldInfo*>(::operator new[](length));
|
|
62
|
-
memcpy(result, this, length);
|
|
63
|
-
return result;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
void Delete() { ::operator delete[](this); }
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
// An interface for snapshotable native objects to inherit from.
|
|
70
|
-
// Use the SERIALIZABLE_OBJECT_METHODS() macro in the class to define
|
|
71
|
-
// the following methods to implement:
|
|
72
|
-
//
|
|
73
|
-
// - PrepareForSerialization(): This would be run prior to context
|
|
74
|
-
// serialization. Use this method to e.g. release references that
|
|
75
|
-
// can be re-initialized, or perform property store operations
|
|
76
|
-
// that needs a V8 context.
|
|
77
|
-
// - Serialize(): This would be called during context serialization,
|
|
78
|
-
// once for each embedder field of the object.
|
|
79
|
-
// Allocate and construct an InternalFieldInfo object that contains
|
|
80
|
-
// data that can be used to deserialize native states.
|
|
81
|
-
// - Deserialize(): This would be called after the context is
|
|
82
|
-
// deserialized and the object graph is complete, once for each
|
|
83
|
-
// embedder field of the object. Use this to restore native states
|
|
84
|
-
// in the object.
|
|
85
|
-
class SnapshotableObject : public BaseObject {
|
|
86
|
-
public:
|
|
87
|
-
SnapshotableObject(Environment* env,
|
|
88
|
-
v8::Local<v8::Object> wrap,
|
|
89
|
-
EmbedderObjectType type = EmbedderObjectType::k_default);
|
|
90
|
-
const char* GetTypeNameChars() const;
|
|
91
|
-
|
|
92
|
-
virtual void PrepareForSerialization(v8::Local<v8::Context> context,
|
|
93
|
-
v8::SnapshotCreator* creator) = 0;
|
|
94
|
-
virtual InternalFieldInfo* Serialize(int index) = 0;
|
|
95
|
-
bool is_snapshotable() const override { return true; }
|
|
96
|
-
// We'll make sure that the type is set in the constructor
|
|
97
|
-
EmbedderObjectType type() { return type_; }
|
|
98
|
-
|
|
99
|
-
private:
|
|
100
|
-
EmbedderObjectType type_;
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
#define SERIALIZABLE_OBJECT_METHODS() \
|
|
104
|
-
void PrepareForSerialization(v8::Local<v8::Context> context, \
|
|
105
|
-
v8::SnapshotCreator* creator) override; \
|
|
106
|
-
InternalFieldInfo* Serialize(int index) override; \
|
|
107
|
-
static void Deserialize(v8::Local<v8::Context> context, \
|
|
108
|
-
v8::Local<v8::Object> holder, \
|
|
109
|
-
int index, \
|
|
110
|
-
InternalFieldInfo* info);
|
|
111
|
-
|
|
112
|
-
v8::StartupData SerializeNodeContextInternalFields(v8::Local<v8::Object> holder,
|
|
113
|
-
int index,
|
|
114
|
-
void* env);
|
|
115
|
-
void DeserializeNodeInternalFields(v8::Local<v8::Object> holder,
|
|
116
|
-
int index,
|
|
117
|
-
v8::StartupData payload,
|
|
118
|
-
void* env);
|
|
119
|
-
void SerializeBindingData(Environment* env,
|
|
120
|
-
v8::SnapshotCreator* creator,
|
|
121
|
-
EnvSerializeInfo* info);
|
|
122
|
-
|
|
123
|
-
bool IsSnapshotableType(FastStringKey key);
|
|
124
|
-
|
|
125
|
-
class SnapshotBuilder {
|
|
126
|
-
public:
|
|
127
|
-
static std::string Generate(const std::vector<std::string> args,
|
|
128
|
-
const std::vector<std::string> exec_args);
|
|
129
|
-
static void Generate(SnapshotData* out,
|
|
130
|
-
const std::vector<std::string> args,
|
|
131
|
-
const std::vector<std::string> exec_args);
|
|
132
|
-
};
|
|
133
|
-
} // namespace node
|
|
134
|
-
|
|
135
|
-
#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
|
|
136
|
-
|
|
137
|
-
#endif // SRC_NODE_SNAPSHOTABLE_H_
|