1 #ifndef SRC_ENV_PROPERTIES_H_ 2 #define SRC_ENV_PROPERTIES_H_ 3 4 #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS 5 6 // PER_ISOLATE_* macros: We have a lot of per-isolate properties 7 // and adding and maintaining their getters and setters by hand would be 8 // difficult so let's make the preprocessor generate them for us. 9 // 10 // In each macro, `V` is expected to be the name of a macro or function which 11 // accepts the number of arguments provided in each tuple in the macro body, 12 // typically two. The named function will be invoked against each tuple. 13 // 14 // Make sure that any macro V defined for use with the PER_ISOLATE_* macros is 15 // undefined again after use. 16 17 // Private symbols are per-isolate primitives but Environment proxies them 18 // for the sake of convenience. Strings should be ASCII-only and have a 19 // "node:" prefix to avoid name clashes with third-party code. 20 #define PER_ISOLATE_PRIVATE_SYMBOL_PROPERTIES(V) \ 21 V(arrow_message_private_symbol, "node:arrowMessage") \ 22 V(contextify_context_private_symbol, "node:contextify:context") \ 23 V(decorated_private_symbol, "node:decorated") \ 24 V(host_defined_option_symbol, "node:host_defined_option_symbol") \ 25 V(jsvm_type_tag, "node:napi:type_tag") \ 26 V(jsvm_wrapper, "node:napi:wrapper") \ 27 V(untransferable_object_private_symbol, "node:untransferableObject") \ 28 V(exiting_aliased_Uint32Array, "node:exiting_aliased_Uint32Array") \ 29 V(require_private_symbol, "node:require_private_symbol") 30 31 // Symbols are per-isolate primitives but Environment proxies them 32 // for the sake of convenience. 33 #define PER_ISOLATE_SYMBOL_PROPERTIES(V) \ 34 V(default_host_defined_options, "default_host_defined_options") \ 35 V(fs_use_promises_symbol, "fs_use_promises_symbol") \ 36 V(async_id_symbol, "async_id_symbol") \ 37 V(handle_onclose_symbol, "handle_onclose") \ 38 V(no_message_symbol, "no_message_symbol") \ 39 V(messaging_deserialize_symbol, "messaging_deserialize_symbol") \ 40 V(messaging_transfer_symbol, "messaging_transfer_symbol") \ 41 V(messaging_clone_symbol, "messaging_clone_symbol") \ 42 V(messaging_transfer_list_symbol, "messaging_transfer_list_symbol") \ 43 V(oninit_symbol, "oninit") \ 44 V(owner_symbol, "owner_symbol") \ 45 V(onpskexchange_symbol, "onpskexchange") \ 46 V(resource_symbol, "resource_symbol") \ 47 V(trigger_async_id_symbol, "trigger_async_id_symbol") \ 48 V(vm_dynamic_import_missing_flag, "vm_dynamic_import_missing_flag") 49 50 // Strings are per-isolate primitives but Environment proxies them 51 // for the sake of convenience. Strings should be ASCII-only. 52 #define PER_ISOLATE_STRING_PROPERTIES(V) \ 53 V(ack_string, "ack") \ 54 V(address_string, "address") \ 55 V(aliases_string, "aliases") \ 56 V(alpn_callback_string, "ALPNCallback") \ 57 V(args_string, "args") \ 58 V(asn1curve_string, "asn1Curve") \ 59 V(async_ids_stack_string, "async_ids_stack") \ 60 V(bits_string, "bits") \ 61 V(block_list_string, "blockList") \ 62 V(buffer_string, "buffer") \ 63 V(bytes_parsed_string, "bytesParsed") \ 64 V(bytes_read_string, "bytesRead") \ 65 V(bytes_written_string, "bytesWritten") \ 66 V(ca_string, "ca") \ 67 V(cached_data_produced_string, "cachedDataProduced") \ 68 V(cached_data_rejected_string, "cachedDataRejected") \ 69 V(cached_data_string, "cachedData") \ 70 V(cache_key_string, "cacheKey") \ 71 V(change_string, "change") \ 72 V(channel_string, "channel") \ 73 V(chunks_sent_since_last_write_string, "chunksSentSinceLastWrite") \ 74 V(clone_unsupported_type_str, "Cannot transfer object of unsupported type.") \ 75 V(code_string, "code") \ 76 V(commonjs_string, "commonjs") \ 77 V(config_string, "config") \ 78 V(constants_string, "constants") \ 79 V(crypto_dh_string, "dh") \ 80 V(crypto_dsa_string, "dsa") \ 81 V(crypto_ec_string, "ec") \ 82 V(crypto_ed25519_string, "ed25519") \ 83 V(crypto_ed448_string, "ed448") \ 84 V(crypto_x25519_string, "x25519") \ 85 V(crypto_x448_string, "x448") \ 86 V(crypto_rsa_string, "rsa") \ 87 V(crypto_rsa_pss_string, "rsa-pss") \ 88 V(cwd_string, "cwd") \ 89 V(data_string, "data") \ 90 V(default_is_true_string, "defaultIsTrue") \ 91 V(deserialize_info_string, "deserializeInfo") \ 92 V(dest_string, "dest") \ 93 V(destroyed_string, "destroyed") \ 94 V(detached_string, "detached") \ 95 V(dh_string, "DH") \ 96 V(divisor_length_string, "divisorLength") \ 97 V(dns_a_string, "A") \ 98 V(dns_aaaa_string, "AAAA") \ 99 V(dns_caa_string, "CAA") \ 100 V(dns_critical_string, "critical") \ 101 V(dns_cname_string, "CNAME") \ 102 V(dns_mx_string, "MX") \ 103 V(dns_naptr_string, "NAPTR") \ 104 V(dns_ns_string, "NS") \ 105 V(dns_ptr_string, "PTR") \ 106 V(dns_soa_string, "SOA") \ 107 V(dns_srv_string, "SRV") \ 108 V(dns_txt_string, "TXT") \ 109 V(done_string, "done") \ 110 V(duration_string, "duration") \ 111 V(ecdh_string, "ECDH") \ 112 V(emit_string, "emit") \ 113 V(emit_warning_string, "emitWarning") \ 114 V(empty_object_string, "{}") \ 115 V(encoding_string, "encoding") \ 116 V(entries_string, "entries") \ 117 V(entry_type_string, "entryType") \ 118 V(env_pairs_string, "envPairs") \ 119 V(env_var_settings_string, "envVarSettings") \ 120 V(errno_string, "errno") \ 121 V(error_string, "error") \ 122 V(exchange_string, "exchange") \ 123 V(exit_code_string, "exitCode") \ 124 V(expire_string, "expire") \ 125 V(exponent_string, "exponent") \ 126 V(exports_string, "exports") \ 127 V(ext_key_usage_string, "ext_key_usage") \ 128 V(external_stream_string, "_externalStream") \ 129 V(family_string, "family") \ 130 V(fatal_exception_string, "_fatalException") \ 131 V(fd_string, "fd") \ 132 V(fields_string, "fields") \ 133 V(file_string, "file") \ 134 V(filename_string, "filename") \ 135 V(fingerprint256_string, "fingerprint256") \ 136 V(fingerprint512_string, "fingerprint512") \ 137 V(fingerprint_string, "fingerprint") \ 138 V(flags_string, "flags") \ 139 V(flowlabel_string, "flowlabel") \ 140 V(fragment_string, "fragment") \ 141 V(frames_received_string, "framesReceived") \ 142 V(frames_sent_string, "framesSent") \ 143 V(function_string, "function") \ 144 V(get_string, "get") \ 145 V(get_data_clone_error_string, "_getDataCloneError") \ 146 V(get_shared_array_buffer_id_string, "_getSharedArrayBufferId") \ 147 V(gid_string, "gid") \ 148 V(h2_string, "h2") \ 149 V(handle_string, "handle") \ 150 V(hash_algorithm_string, "hashAlgorithm") \ 151 V(help_text_string, "helpText") \ 152 V(homedir_string, "homedir") \ 153 V(host_string, "host") \ 154 V(hostmaster_string, "hostmaster") \ 155 V(http_1_1_string, "http/1.1") \ 156 V(id_string, "id") \ 157 V(identity_string, "identity") \ 158 V(ignore_string, "ignore") \ 159 V(infoaccess_string, "infoAccess") \ 160 V(inherit_string, "inherit") \ 161 V(input_string, "input") \ 162 V(internal_binding_string, "internalBinding") \ 163 V(internal_string, "internal") \ 164 V(ipv4_string, "IPv4") \ 165 V(ipv6_string, "IPv6") \ 166 V(isclosing_string, "isClosing") \ 167 V(issuer_string, "issuer") \ 168 V(issuercert_string, "issuerCertificate") \ 169 V(jwk_crv_string, "crv") \ 170 V(jwk_d_string, "d") \ 171 V(jwk_dp_string, "dp") \ 172 V(jwk_dq_string, "dq") \ 173 V(jwk_dsa_string, "DSA") \ 174 V(jwk_e_string, "e") \ 175 V(jwk_ec_string, "EC") \ 176 V(jwk_g_string, "g") \ 177 V(jwk_k_string, "k") \ 178 V(jwk_p_string, "p") \ 179 V(jwk_q_string, "q") \ 180 V(jwk_qi_string, "qi") \ 181 V(jwk_kty_string, "kty") \ 182 V(jwk_n_string, "n") \ 183 V(jwk_oct_string, "oct") \ 184 V(jwk_okp_string, "OKP") \ 185 V(jwk_rsa_string, "RSA") \ 186 V(jwk_x_string, "x") \ 187 V(jwk_y_string, "y") \ 188 V(kill_signal_string, "killSignal") \ 189 V(kind_string, "kind") \ 190 V(length_string, "length") \ 191 V(library_string, "library") \ 192 V(mac_string, "mac") \ 193 V(max_buffer_string, "maxBuffer") \ 194 V(max_concurrent_streams_string, "maxConcurrentStreams") \ 195 V(message_port_constructor_string, "MessagePort") \ 196 V(message_port_string, "messagePort") \ 197 V(message_string, "message") \ 198 V(messageerror_string, "messageerror") \ 199 V(mgf1_hash_algorithm_string, "mgf1HashAlgorithm") \ 200 V(minttl_string, "minttl") \ 201 V(module_string, "module") \ 202 V(modulus_string, "modulus") \ 203 V(modulus_length_string, "modulusLength") \ 204 V(name_string, "name") \ 205 V(named_curve_string, "namedCurve") \ 206 V(netmask_string, "netmask") \ 207 V(next_string, "next") \ 208 V(nistcurve_string, "nistCurve") \ 209 V(node_string, "node") \ 210 V(nsname_string, "nsname") \ 211 V(object_string, "Object") \ 212 V(ocsp_request_string, "OCSPRequest") \ 213 V(oncertcb_string, "oncertcb") \ 214 V(onchange_string, "onchange") \ 215 V(onclienthello_string, "onclienthello") \ 216 V(oncomplete_string, "oncomplete") \ 217 V(onconnection_string, "onconnection") \ 218 V(ondone_string, "ondone") \ 219 V(onerror_string, "onerror") \ 220 V(onexit_string, "onexit") \ 221 V(onhandshakedone_string, "onhandshakedone") \ 222 V(onhandshakestart_string, "onhandshakestart") \ 223 V(onkeylog_string, "onkeylog") \ 224 V(onmessage_string, "onmessage") \ 225 V(onnewsession_string, "onnewsession") \ 226 V(onocspresponse_string, "onocspresponse") \ 227 V(onreadstart_string, "onreadstart") \ 228 V(onreadstop_string, "onreadstop") \ 229 V(onshutdown_string, "onshutdown") \ 230 V(onsignal_string, "onsignal") \ 231 V(onunpipe_string, "onunpipe") \ 232 V(onwrite_string, "onwrite") \ 233 V(openssl_error_stack, "opensslErrorStack") \ 234 V(options_string, "options") \ 235 V(order_string, "order") \ 236 V(output_string, "output") \ 237 V(overlapped_string, "overlapped") \ 238 V(parse_error_string, "Parse Error") \ 239 V(password_string, "password") \ 240 V(path_string, "path") \ 241 V(pending_handle_string, "pendingHandle") \ 242 V(pid_string, "pid") \ 243 V(ping_rtt_string, "pingRTT") \ 244 V(pipe_source_string, "pipeSource") \ 245 V(pipe_string, "pipe") \ 246 V(pipe_target_string, "pipeTarget") \ 247 V(port1_string, "port1") \ 248 V(port2_string, "port2") \ 249 V(port_string, "port") \ 250 V(preference_string, "preference") \ 251 V(primordials_string, "primordials") \ 252 V(priority_string, "priority") \ 253 V(process_string, "process") \ 254 V(promise_string, "promise") \ 255 V(psk_string, "psk") \ 256 V(pubkey_string, "pubkey") \ 257 V(public_exponent_string, "publicExponent") \ 258 V(query_string, "query") \ 259 V(rate_string, "rate") \ 260 V(raw_string, "raw") \ 261 V(read_host_object_string, "_readHostObject") \ 262 V(readable_string, "readable") \ 263 V(reason_string, "reason") \ 264 V(refresh_string, "refresh") \ 265 V(regexp_string, "regexp") \ 266 V(rename_string, "rename") \ 267 V(replacement_string, "replacement") \ 268 V(require_string, "require") \ 269 V(retry_string, "retry") \ 270 V(salt_length_string, "saltLength") \ 271 V(scheme_string, "scheme") \ 272 V(scopeid_string, "scopeid") \ 273 V(serial_number_string, "serialNumber") \ 274 V(serial_string, "serial") \ 275 V(servername_string, "servername") \ 276 V(service_string, "service") \ 277 V(session_id_string, "sessionId") \ 278 V(set_string, "set") \ 279 V(shell_string, "shell") \ 280 V(signal_string, "signal") \ 281 V(sink_string, "sink") \ 282 V(size_string, "size") \ 283 V(sni_context_err_string, "Invalid SNI context") \ 284 V(sni_context_string, "sni_context") \ 285 V(source_string, "source") \ 286 V(source_map_url_string, "sourceMapURL") \ 287 V(stack_string, "stack") \ 288 V(standard_name_string, "standardName") \ 289 V(start_time_string, "startTime") \ 290 V(state_string, "state") \ 291 V(stats_string, "stats") \ 292 V(status_string, "status") \ 293 V(stdio_string, "stdio") \ 294 V(stream_average_duration_string, "streamAverageDuration") \ 295 V(stream_count_string, "streamCount") \ 296 V(subject_string, "subject") \ 297 V(subjectaltname_string, "subjectaltname") \ 298 V(syscall_string, "syscall") \ 299 V(target_string, "target") \ 300 V(thread_id_string, "threadId") \ 301 V(ticketkeycallback_string, "onticketkeycallback") \ 302 V(timeout_string, "timeout") \ 303 V(time_to_first_byte_string, "timeToFirstByte") \ 304 V(time_to_first_byte_sent_string, "timeToFirstByteSent") \ 305 V(time_to_first_header_string, "timeToFirstHeader") \ 306 V(tls_ticket_string, "tlsTicket") \ 307 V(transfer_string, "transfer") \ 308 V(ttl_string, "ttl") \ 309 V(type_string, "type") \ 310 V(uid_string, "uid") \ 311 V(unknown_string, "<unknown>") \ 312 V(url_special_ftp_string, "ftp:") \ 313 V(url_special_file_string, "file:") \ 314 V(url_special_http_string, "http:") \ 315 V(url_special_https_string, "https:") \ 316 V(url_special_ws_string, "ws:") \ 317 V(url_special_wss_string, "wss:") \ 318 V(url_string, "url") \ 319 V(username_string, "username") \ 320 V(valid_from_string, "valid_from") \ 321 V(valid_to_string, "valid_to") \ 322 V(value_string, "value") \ 323 V(verify_error_string, "verifyError") \ 324 V(version_string, "version") \ 325 V(weight_string, "weight") \ 326 V(windows_hide_string, "windowsHide") \ 327 V(windows_verbatim_arguments_string, "windowsVerbatimArguments") \ 328 V(wrap_string, "wrap") \ 329 V(writable_string, "writable") \ 330 V(write_host_object_string, "_writeHostObject") \ 331 V(write_queue_size_string, "writeQueueSize") \ 332 V(x_forwarded_string, "x-forwarded-for") 333 334 #define PER_ISOLATE_TEMPLATE_PROPERTIES(V) \ 335 V(async_wrap_ctor_template, v8::FunctionTemplate) \ 336 V(async_wrap_object_ctor_template, v8::FunctionTemplate) \ 337 V(base_object_ctor_template, v8::FunctionTemplate) \ 338 V(binding_data_ctor_template, v8::FunctionTemplate) \ 339 V(blob_constructor_template, v8::FunctionTemplate) \ 340 V(blocklist_constructor_template, v8::FunctionTemplate) \ 341 V(contextify_global_template, v8::ObjectTemplate) \ 342 V(contextify_wrapper_template, v8::ObjectTemplate) \ 343 V(crypto_key_object_handle_constructor, v8::FunctionTemplate) \ 344 V(env_proxy_template, v8::ObjectTemplate) \ 345 V(env_proxy_ctor_template, v8::FunctionTemplate) \ 346 V(dir_instance_template, v8::ObjectTemplate) \ 347 V(fd_constructor_template, v8::ObjectTemplate) \ 348 V(fdclose_constructor_template, v8::ObjectTemplate) \ 349 V(filehandlereadwrap_template, v8::ObjectTemplate) \ 350 V(fsreqpromise_constructor_template, v8::ObjectTemplate) \ 351 V(handle_wrap_ctor_template, v8::FunctionTemplate) \ 352 V(histogram_ctor_template, v8::FunctionTemplate) \ 353 V(http2settings_constructor_template, v8::ObjectTemplate) \ 354 V(http2stream_constructor_template, v8::ObjectTemplate) \ 355 V(http2ping_constructor_template, v8::ObjectTemplate) \ 356 V(i18n_converter_template, v8::ObjectTemplate) \ 357 V(intervalhistogram_constructor_template, v8::FunctionTemplate) \ 358 V(libuv_stream_wrap_ctor_template, v8::FunctionTemplate) \ 359 V(message_port_constructor_template, v8::FunctionTemplate) \ 360 V(microtask_queue_ctor_template, v8::FunctionTemplate) \ 361 V(pipe_constructor_template, v8::FunctionTemplate) \ 362 V(promise_wrap_template, v8::ObjectTemplate) \ 363 V(sab_lifetimepartner_constructor_template, v8::FunctionTemplate) \ 364 V(script_context_constructor_template, v8::FunctionTemplate) \ 365 V(secure_context_constructor_template, v8::FunctionTemplate) \ 366 V(shutdown_wrap_template, v8::ObjectTemplate) \ 367 V(socketaddress_constructor_template, v8::FunctionTemplate) \ 368 V(streambaseoutputstream_constructor_template, v8::ObjectTemplate) \ 369 V(qlogoutputstream_constructor_template, v8::ObjectTemplate) \ 370 V(tcp_constructor_template, v8::FunctionTemplate) \ 371 V(tty_constructor_template, v8::FunctionTemplate) \ 372 V(write_wrap_template, v8::ObjectTemplate) \ 373 V(worker_heap_snapshot_taker_template, v8::ObjectTemplate) \ 374 V(x509_constructor_template, v8::FunctionTemplate) 375 376 #define PER_REALM_STRONG_PERSISTENT_VALUES(V) \ 377 V(async_hooks_after_function, v8::Function) \ 378 V(async_hooks_before_function, v8::Function) \ 379 V(async_hooks_callback_trampoline, v8::Function) \ 380 V(async_hooks_binding, v8::Object) \ 381 V(async_hooks_destroy_function, v8::Function) \ 382 V(async_hooks_init_function, v8::Function) \ 383 V(async_hooks_promise_resolve_function, v8::Function) \ 384 V(buffer_prototype_object, v8::Object) \ 385 V(crypto_key_object_constructor, v8::Function) \ 386 V(crypto_key_object_private_constructor, v8::Function) \ 387 V(crypto_key_object_public_constructor, v8::Function) \ 388 V(crypto_key_object_secret_constructor, v8::Function) \ 389 V(domexception_function, v8::Function) \ 390 V(enhance_fatal_stack_after_inspector, v8::Function) \ 391 V(enhance_fatal_stack_before_inspector, v8::Function) \ 392 V(get_source_map_error_source, v8::Function) \ 393 V(host_import_module_dynamically_callback, v8::Function) \ 394 V(host_initialize_import_meta_object_callback, v8::Function) \ 395 V(http2session_on_altsvc_function, v8::Function) \ 396 V(http2session_on_error_function, v8::Function) \ 397 V(http2session_on_frame_error_function, v8::Function) \ 398 V(http2session_on_goaway_data_function, v8::Function) \ 399 V(http2session_on_headers_function, v8::Function) \ 400 V(http2session_on_origin_function, v8::Function) \ 401 V(http2session_on_ping_function, v8::Function) \ 402 V(http2session_on_priority_function, v8::Function) \ 403 V(http2session_on_settings_function, v8::Function) \ 404 V(http2session_on_stream_close_function, v8::Function) \ 405 V(http2session_on_stream_trailers_function, v8::Function) \ 406 V(internal_binding_loader, v8::Function) \ 407 V(immediate_callback_function, v8::Function) \ 408 V(inspector_console_extension_installer, v8::Function) \ 409 V(inspector_disable_async_hooks, v8::Function) \ 410 V(inspector_enable_async_hooks, v8::Function) \ 411 V(maybe_cache_generated_source_map, v8::Function) \ 412 V(messaging_deserialize_create_object, v8::Function) \ 413 V(message_port, v8::Object) \ 414 V(builtin_module_require, v8::Function) \ 415 V(performance_entry_callback, v8::Function) \ 416 V(performance_entry_template, v8::Function) \ 417 V(prepare_stack_trace_callback, v8::Function) \ 418 V(process_object, v8::Object) \ 419 V(primordials, v8::Object) \ 420 V(primordials_safe_map_prototype_object, v8::Object) \ 421 V(primordials_safe_set_prototype_object, v8::Object) \ 422 V(primordials_safe_weak_map_prototype_object, v8::Object) \ 423 V(primordials_safe_weak_set_prototype_object, v8::Object) \ 424 V(promise_hook_handler, v8::Function) \ 425 V(promise_reject_callback, v8::Function) \ 426 V(snapshot_serialize_callback, v8::Function) \ 427 V(snapshot_deserialize_callback, v8::Function) \ 428 V(snapshot_deserialize_main, v8::Function) \ 429 V(source_map_cache_getter, v8::Function) \ 430 V(tick_callback_function, v8::Function) \ 431 V(timers_callback_function, v8::Function) \ 432 V(tls_wrap_constructor_function, v8::Function) \ 433 V(trace_category_state_function, v8::Function) \ 434 V(udp_constructor_function, v8::Function) \ 435 V(url_constructor_function, v8::Function) \ 436 V(wasm_streaming_compilation_impl, v8::Function) \ 437 V(wasm_streaming_object_constructor, v8::Function) 438 439 #endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS 440 441 #endif // SRC_ENV_PROPERTIES_H_ 442