diff --git a/DEPS b/DEPS index 9dab0e707a..7b11f64d40 100644 --- a/DEPS +++ b/DEPS @@ -4,7 +4,7 @@ vars = { 'chromium_version': '143.0.7499.0', 'node_version': - 'v22.20.0', + 'v24.10.0', 'nan_version': '675cefebca42410733da8a454c8d9391fcebfbc2', 'squirrel.mac_version': diff --git a/lib/browser/api/net-fetch.ts b/lib/browser/api/net-fetch.ts index 54fdc788d6..40e1a635fd 100644 --- a/lib/browser/api/net-fetch.ts +++ b/lib/browser/api/net-fetch.ts @@ -119,7 +119,10 @@ export function fetchWithSession (input: RequestInfo, init: (RequestInit & {bypa p.reject(err); }); - if (!req.body?.pipeTo(Writable.toWeb(r as unknown as Writable)).then(() => r.end())) { r.end(); } + // pipeTo expects a WritableStream. Node.js' Writable.toWeb returns WritableStream, + // which causes a TS structural mismatch. + const writable = Writable.toWeb(r as unknown as Writable) as unknown as WritableStream; + if (!req.body?.pipeTo(writable).then(() => r.end())) { r.end(); } return p.promise; } diff --git a/lib/browser/api/protocol.ts b/lib/browser/api/protocol.ts index cb6a1492eb..9fd579b986 100644 --- a/lib/browser/api/protocol.ts +++ b/lib/browser/api/protocol.ts @@ -4,6 +4,8 @@ import { createReadStream } from 'fs'; import { Readable } from 'stream'; import { ReadableStream } from 'stream/web'; +import type { ReadableStreamDefaultReader } from 'stream/web'; + // Global protocol APIs. const { registerSchemesAsPrivileged, getStandardSchemes, Protocol } = process._linkedBinding('electron_browser_protocol'); @@ -12,7 +14,7 @@ const ERR_UNEXPECTED = -9; const isBuiltInScheme = (scheme: string) => ['http', 'https', 'file'].includes(scheme); -function makeStreamFromPipe (pipe: any): ReadableStream { +function makeStreamFromPipe (pipe: any): ReadableStream { const buf = new Uint8Array(1024 * 1024 /* 1 MB */); return new ReadableStream({ async pull (controller) { @@ -38,21 +40,26 @@ function makeStreamFromFileInfo ({ filePath: string; offset?: number; length?: number; -}): ReadableStream { +}): ReadableStream { + // Node's Readable.toWeb produces a WHATWG ReadableStream whose chunks are Uint8Array. return Readable.toWeb(createReadStream(filePath, { start: offset, end: length >= 0 ? offset + length : undefined - })); + })) as ReadableStream; } function convertToRequestBody (uploadData: ProtocolRequest['uploadData']): RequestInit['body'] { if (!uploadData) return null; // Optimization: skip creating a stream if the request is just a single buffer. - if (uploadData.length === 1 && (uploadData[0] as any).type === 'rawData') return uploadData[0].bytes; + if (uploadData.length === 1 && (uploadData[0] as any).type === 'rawData') { + return uploadData[0].bytes as any; + } - const chunks = [...uploadData] as any[]; // TODO: types are wrong - let current: ReadableStreamDefaultReader | null = null; - return new ReadableStream({ + const chunks = [...uploadData] as any[]; // TODO: refine ProtocolRequest types + // Use Node's web stream types explicitly to avoid DOM lib vs Node lib structural mismatches. + // Generic ensures reader.read() returns value?: Uint8Array consistent with enqueue. + let current: ReadableStreamDefaultReader | null = null; + return new ReadableStream({ async pull (controller) { if (current) { const { done, value } = await current.read(); @@ -67,7 +74,7 @@ function convertToRequestBody (uploadData: ProtocolRequest['uploadData']): Reque if (!chunks.length) { return controller.close(); } const chunk = chunks.shift()!; if (chunk.type === 'rawData') { - controller.enqueue(chunk.bytes); + controller.enqueue(chunk.bytes as Uint8Array); } else if (chunk.type === 'file') { current = makeStreamFromFileInfo(chunk).getReader(); return this.pull!(controller); diff --git a/lib/browser/init.ts b/lib/browser/init.ts index 35cf6f8325..4a52cd0283 100644 --- a/lib/browser/init.ts +++ b/lib/browser/init.ts @@ -40,7 +40,7 @@ process.on('uncaughtException', function (error) { // Emit 'exit' event on quit. const { app } = require('electron'); -app.on('quit', (_event, exitCode) => { +app.on('quit', (_event: any, exitCode: number) => { process.emit('exit', exitCode); }); diff --git a/lib/node/asar-fs-wrapper.ts b/lib/node/asar-fs-wrapper.ts index bee5e33025..25eaf3a4a0 100644 --- a/lib/node/asar-fs-wrapper.ts +++ b/lib/node/asar-fs-wrapper.ts @@ -746,7 +746,7 @@ export const wrapFsWithAsar = (fs: Record) => { context.readdirResults.push(dirent); if (dirent!.isDirectory() || stat === 1) { - context.pathsQueue.push(path.join(dirent!.path, dirent!.name)); + context.pathsQueue.push(path.join(dirent!.parentPath, dirent!.name)); } } } diff --git a/npm/package.json b/npm/package.json index 96fd3c3ad0..5f029ee4c7 100644 --- a/npm/package.json +++ b/npm/package.json @@ -9,7 +9,7 @@ }, "dependencies": { "@electron/get": "^2.0.0", - "@types/node": "^22.7.7", + "@types/node": "^24.9.0", "extract-zip": "^2.0.1" }, "engines": { diff --git a/package.json b/package.json index 46faf05d9c..cb568d0ea5 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "@octokit/rest": "^20.1.2", "@primer/octicons": "^10.0.0", "@types/minimist": "^1.2.5", - "@types/node": "^22.7.7", + "@types/node": "^24.9.0", "@types/semver": "^7.5.8", "@types/stream-json": "^1.7.8", "@types/temp": "^0.9.4", diff --git a/patches/node/.patches b/patches/node/.patches index 523c726bd8..e080e149e4 100644 --- a/patches/node/.patches +++ b/patches/node/.patches @@ -17,48 +17,25 @@ chore_expose_importmoduledynamically_and.patch test_formally_mark_some_tests_as_flaky.patch fix_do_not_resolve_electron_entrypoints.patch ci_ensure_node_tests_set_electron_run_as_node.patch -fix_assert_module_in_the_renderer_process.patch fix_allow_passing_fileexists_fn_to_legacymainresolve.patch fix_remove_deprecated_errno_constants.patch build_enable_perfetto.patch -fix_add_source_location_for_v8_task_runner.patch -src_remove_dependency_on_wrapper-descriptor-based_cppheap.patch -test_update_v8-stats_test_for_v8_12_6.patch -src_do_not_use_soon-to-be-deprecated_v8_api.patch -src_stop_using_deprecated_fields_of_fastapicallbackoptions.patch -build_compile_with_c_20_support.patch -add_v8_taskpirority_to_foreground_task_runner_signature.patch -cli_remove_deprecated_v8_flag.patch build_restore_clang_as_default_compiler_on_macos.patch -fix_remove_outdated_v8_flags_from_node_cc.patch chore_disable_deprecation_ftbfs_in_simdjson_header.patch build_allow_unbundling_of_node_js_dependencies.patch -test_use_static_method_names_in_call_stacks.patch -fix_remove_fastapitypedarray_usage.patch -test_handle_explicit_resource_management_globals.patch build_change_crdtp_protocoltypetraits_signatures_to_avoid_conflict.patch fix_adjust_wpt_and_webidl_tests_for_enabled_float16array.patch -chore_add_createexternalizabletwobytestring_to_globals.patch refactor_attach_cppgc_heap_on_v8_isolate_creation.patch fix_ensure_traverseparent_bails_on_resource_path_exit.patch -cli_move_--trace-atomics-wait_to_eol.patch fix_cppgc_initializing_twice.patch -fix_task_starvation_in_inspector_context_test.patch fix_expose_readfilesync_override_for_modules.patch fix_array_out-of-bounds_read_in_boyer-moore_search.patch -chore_add_missing_include_of_iterator.patch test_accomodate_v8_thenable_stack_trace_change_in_snapshot.patch chore_exclude_electron_node_folder_from_exit-time-destructors.patch api_remove_deprecated_getisolate.patch -src_switch_from_get_setprototype_to_get_setprototypev2.patch -fix_replace_deprecated_setprototype.patch fix_redefined_macos_sdk_header_symbols.patch -src_simplify_string_bytes_with_views.patch -src_improve_utf8_string_generation_performance.patch -src_use_non-deprecated_utf8lengthv2_method.patch -src_use_non-deprecated_writeutf8v2_method.patch -src_refactor_writeucs2_and_remove_flags_argument.patch -src_use_string_writev2_in_twobytevalue.patch -node-api_use_writev2_in_napi_get_value_string_utf16.patch -node-api_use_writeonebytev2_in_napi_get_value_string_latin1.patch -src_migrate_writeonebyte_to_writeonebytev2.patch +fix_allow_disabling_fetch_in_renderer_and_worker_processes.patch +feat_disable_js_source_phase_imports_by_default.patch +fix_avoid_external_memory_leak_on_invalid_tls_protocol_versions.patch +lib_check_sharedarraybuffer_existence_in_fast-utf8-stream.patch +chore_handle_support_for_import_defer_as_ns_and_import_defer.patch diff --git a/patches/node/add_v8_taskpirority_to_foreground_task_runner_signature.patch b/patches/node/add_v8_taskpirority_to_foreground_task_runner_signature.patch deleted file mode 100644 index 8d89edc407..0000000000 --- a/patches/node/add_v8_taskpirority_to_foreground_task_runner_signature.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Calvin Watford -Date: Wed, 18 Sep 2024 16:25:05 -0600 -Subject: add v8::TaskPirority to foreground task runner signature - -For now, we ignore the priority parameter. We expect this will be fixed -naturally upstream, and we will be able to remove this patch in a future -Node.js upgrade. - -diff --git a/src/node_platform.cc b/src/node_platform.cc -index b24e170cb247261d4a16d77ad40df4dfd33709d9..5e31f984b5655ae2d1d7559b1bd550ba6dc90fb4 100644 ---- a/src/node_platform.cc -+++ b/src/node_platform.cc -@@ -688,8 +688,8 @@ bool NodePlatform::IdleTasksEnabled(Isolate* isolate) { - return ForIsolate(isolate)->IdleTasksEnabled(); - } - --std::shared_ptr --NodePlatform::GetForegroundTaskRunner(Isolate* isolate) { -+std::shared_ptr NodePlatform::GetForegroundTaskRunner( -+ Isolate* isolate, v8::TaskPriority priority) { - return ForIsolate(isolate)->GetForegroundTaskRunner(); - } - -diff --git a/src/node_platform.h b/src/node_platform.h -index a0222b4a1b074c6708e390d58d04221717069ac1..8015ca1801573c3a7c4a5db6d0f10b4016a9267c 100644 ---- a/src/node_platform.h -+++ b/src/node_platform.h -@@ -213,7 +213,7 @@ class NodePlatform : public MultiIsolatePlatform { - void (*callback)(void*), void* data) override; - - std::shared_ptr GetForegroundTaskRunner( -- v8::Isolate* isolate) override; -+ v8::Isolate* isolate, v8::TaskPriority priority) override; - - Platform::StackTracePrinter GetStackTracePrinter() override; - v8::PageAllocator* GetPageAllocator() override; diff --git a/patches/node/api_remove_deprecated_getisolate.patch b/patches/node/api_remove_deprecated_getisolate.patch index 59d8f6a7fc..11c2fad5df 100644 --- a/patches/node/api_remove_deprecated_getisolate.patch +++ b/patches/node/api_remove_deprecated_getisolate.patch @@ -6,10 +6,10 @@ Subject: Remove deprecated `GetIsolate` https://chromium-review.googlesource.com/c/v8/v8/+/6905244 diff --git a/src/api/environment.cc b/src/api/environment.cc -index 8e227ddd1be50c046a8cf2895a31d607eb7d31de..82f53bba29613de212f64be440ca20d7c630fddf 100644 +index 072deb1fa70313e33397f6ff994e3f3548e86092..14be033113bfb13c64e5f99446afaf0cb2aa16a9 100644 --- a/src/api/environment.cc +++ b/src/api/environment.cc -@@ -654,7 +654,7 @@ std::unique_ptr MultiIsolatePlatform::Create( +@@ -669,7 +669,7 @@ std::unique_ptr MultiIsolatePlatform::Create( MaybeLocal GetPerContextExports(Local context, IsolateData* isolate_data) { @@ -18,7 +18,7 @@ index 8e227ddd1be50c046a8cf2895a31d607eb7d31de..82f53bba29613de212f64be440ca20d7 EscapableHandleScope handle_scope(isolate); Local global = context->Global(); -@@ -700,7 +700,7 @@ void ProtoThrower(const FunctionCallbackInfo& info) { +@@ -715,7 +715,7 @@ void ProtoThrower(const FunctionCallbackInfo& info) { // This runs at runtime, regardless of whether the context // is created from a snapshot. Maybe InitializeContextRuntime(Local context) { @@ -27,7 +27,7 @@ index 8e227ddd1be50c046a8cf2895a31d607eb7d31de..82f53bba29613de212f64be440ca20d7 HandleScope handle_scope(isolate); // When `IsCodeGenerationFromStringsAllowed` is true, V8 takes the fast path -@@ -779,7 +779,7 @@ Maybe InitializeContextRuntime(Local context) { +@@ -794,7 +794,7 @@ Maybe InitializeContextRuntime(Local context) { } Maybe InitializeBaseContextForSnapshot(Local context) { @@ -36,7 +36,7 @@ index 8e227ddd1be50c046a8cf2895a31d607eb7d31de..82f53bba29613de212f64be440ca20d7 HandleScope handle_scope(isolate); // Delete `Intl.v8BreakIterator` -@@ -804,7 +804,7 @@ Maybe InitializeBaseContextForSnapshot(Local context) { +@@ -819,7 +819,7 @@ Maybe InitializeBaseContextForSnapshot(Local context) { } Maybe InitializeMainContextForSnapshot(Local context) { @@ -45,7 +45,7 @@ index 8e227ddd1be50c046a8cf2895a31d607eb7d31de..82f53bba29613de212f64be440ca20d7 HandleScope handle_scope(isolate); // Initialize the default values. -@@ -822,7 +822,7 @@ Maybe InitializeMainContextForSnapshot(Local context) { +@@ -837,7 +837,7 @@ Maybe InitializeMainContextForSnapshot(Local context) { MaybeLocal InitializePrivateSymbols(Local context, IsolateData* isolate_data) { CHECK(isolate_data); @@ -54,7 +54,7 @@ index 8e227ddd1be50c046a8cf2895a31d607eb7d31de..82f53bba29613de212f64be440ca20d7 EscapableHandleScope scope(isolate); Context::Scope context_scope(context); -@@ -846,7 +846,7 @@ MaybeLocal InitializePrivateSymbols(Local context, +@@ -861,7 +861,7 @@ MaybeLocal InitializePrivateSymbols(Local context, MaybeLocal InitializePerIsolateSymbols(Local context, IsolateData* isolate_data) { CHECK(isolate_data); @@ -63,7 +63,7 @@ index 8e227ddd1be50c046a8cf2895a31d607eb7d31de..82f53bba29613de212f64be440ca20d7 EscapableHandleScope scope(isolate); Context::Scope context_scope(context); -@@ -872,7 +872,7 @@ MaybeLocal InitializePerIsolateSymbols(Local context, +@@ -887,7 +887,7 @@ MaybeLocal InitializePerIsolateSymbols(Local context, Maybe InitializePrimordials(Local context, IsolateData* isolate_data) { // Run per-context JS files. @@ -73,7 +73,7 @@ index 8e227ddd1be50c046a8cf2895a31d607eb7d31de..82f53bba29613de212f64be440ca20d7 Local exports; diff --git a/src/base_object-inl.h b/src/base_object-inl.h -index 6f731b17fe0b84dd3d2c9bc9cfef1f8062a2c5f7..71a1072ed2decbee08d40eda7c47456be5093bc2 100644 +index cc60ddddb037e0279615bbe24821eb20fd8da677..37d83e41b618a07aca98118260abe9618f11256d 100644 --- a/src/base_object-inl.h +++ b/src/base_object-inl.h @@ -55,7 +55,6 @@ v8::Local BaseObject::object() const { @@ -85,10 +85,10 @@ index 6f731b17fe0b84dd3d2c9bc9cfef1f8062a2c5f7..71a1072ed2decbee08d40eda7c47456b return handle; diff --git a/src/crypto/crypto_context.cc b/src/crypto/crypto_context.cc -index a3d309d832c73ddc79564b9644d825bec7459e7f..580cbaf3858961f375ca2f53c48a07bcba82ef46 100644 +index 20d3c1d9d17fde18fc09b6ee219137831eb08a45..8fbf4f25a91b953f3d2868889c7ee06932ee3c5f 100644 --- a/src/crypto/crypto_context.cc +++ b/src/crypto/crypto_context.cc -@@ -967,7 +967,7 @@ bool ArrayOfStringsToX509s(Local context, +@@ -1022,7 +1022,7 @@ bool ArrayOfStringsToX509s(Local context, Local cert_array, std::vector* certs) { ClearErrorOnReturn clear_error_on_return; @@ -98,11 +98,11 @@ index a3d309d832c73ddc79564b9644d825bec7459e7f..580cbaf3858961f375ca2f53c48a07bc uint32_t array_length = cert_array->Length(); diff --git a/src/crypto/crypto_x509.cc b/src/crypto/crypto_x509.cc -index eb6dad44a49d997097c8fb5009eeb60a7305da27..fd29d17de195017970856ce30d7a9c5785b0b8ee 100644 +index 4c5427596d1c90d3a413cdd9ff4f1151e657073d..70135a6be65e41fcb3564ddf6d1e8083a59ef8bb 100644 --- a/src/crypto/crypto_x509.cc +++ b/src/crypto/crypto_x509.cc -@@ -97,7 +97,7 @@ MaybeLocal ToV8Value(Local context, BIOPointer&& bio) { - if (!bio) return {}; +@@ -107,7 +107,7 @@ MaybeLocal ToV8Value(Local context, BIOPointer&& bio) { + return {}; BUF_MEM* mem = bio; Local ret; - if (!String::NewFromUtf8(context->GetIsolate(), @@ -110,32 +110,8 @@ index eb6dad44a49d997097c8fb5009eeb60a7305da27..fd29d17de195017970856ce30d7a9c57 mem->data, NewStringType::kNormal, mem->length) -@@ -121,7 +121,7 @@ MaybeLocal ToV8Value(Local context, const ASN1_OBJECT* obj) { - } - - Local result; -- if (!String::NewFromUtf8(context->GetIsolate(), str).ToLocal(&result)) { -+ if (!String::NewFromUtf8(Isolate::GetCurrent(), str).ToLocal(&result)) { +@@ -121,7 +121,7 @@ MaybeLocal ToV8Value(Local context, const BIOPointer& bio) { return {}; - } - return result; -@@ -136,12 +136,12 @@ MaybeLocal ToV8Value(Local context, const ASN1_STRING* str) { - unsigned char* value_str; - int value_str_size = ASN1_STRING_to_UTF8(&value_str, str); - if (value_str_size < 0) { -- return Undefined(context->GetIsolate()); -+ return Undefined(Isolate::GetCurrent()); - } - DataPointer free_value_str(value_str, value_str_size); - - Local result; -- if (!String::NewFromUtf8(context->GetIsolate(), -+ if (!String::NewFromUtf8(Isolate::GetCurrent(), - reinterpret_cast(value_str), - NewStringType::kNormal, - value_str_size) -@@ -155,7 +155,7 @@ MaybeLocal ToV8Value(Local context, const BIOPointer& bio) { - if (!bio) return {}; BUF_MEM* mem = bio; Local ret; - if (!String::NewFromUtf8(context->GetIsolate(), @@ -144,23 +120,23 @@ index eb6dad44a49d997097c8fb5009eeb60a7305da27..fd29d17de195017970856ce30d7a9c57 NewStringType::kNormal, mem->length) diff --git a/src/encoding_binding.cc b/src/encoding_binding.cc -index 31ed995714bb99ab534f26ba9ebc6051c258a1c9..5ace688bb7ffc86eedf5aff11ab0ab487ad9440e 100644 +index 266f640fb1c6503a424e77cc41fc15bc658bb6a5..877ae8a18f6b8f2c7e3474dfba060d99db88e6b9 100644 --- a/src/encoding_binding.cc +++ b/src/encoding_binding.cc -@@ -73,7 +73,7 @@ void BindingData::Deserialize(Local context, +@@ -76,7 +76,7 @@ void BindingData::Deserialize(Local context, int index, InternalFieldInfoBase* info) { DCHECK_IS_SNAPSHOT_SLOT(index); -- v8::HandleScope scope(context->GetIsolate()); -+ v8::HandleScope scope(Isolate::GetCurrent()); +- HandleScope scope(context->GetIsolate()); ++ HandleScope scope(Isolate::GetCurrent()); Realm* realm = Realm::GetCurrent(context); // Recreate the buffer in the constructor. InternalFieldInfo* casted_info = static_cast(info); diff --git a/src/env.cc b/src/env.cc -index c6209cc7cf317de1bb9217e39dd760e5a83303e2..161d577e0ea6a251c83ba1903b1ec9a582a5317c 100644 +index a78817467518245c4a190e870e0eb30658eafcdb..13dcf0e9c2c86486d1e43763033f43ac4e6b6feb 100644 --- a/src/env.cc +++ b/src/env.cc -@@ -1748,10 +1748,10 @@ void AsyncHooks::Deserialize(Local context) { +@@ -1753,10 +1753,10 @@ void AsyncHooks::Deserialize(Local context) { context->GetDataFromSnapshotOnce( info_->js_execution_async_resources).ToLocalChecked(); } else { @@ -173,7 +149,7 @@ index c6209cc7cf317de1bb9217e39dd760e5a83303e2..161d577e0ea6a251c83ba1903b1ec9a5 // The native_execution_async_resources_ field requires v8::Local<> instances // for async calls whose resources were on the stack as JS objects when they -@@ -1791,7 +1791,7 @@ AsyncHooks::SerializeInfo AsyncHooks::Serialize(Local context, +@@ -1796,7 +1796,7 @@ AsyncHooks::SerializeInfo AsyncHooks::Serialize(Local context, info.async_id_fields = async_id_fields_.Serialize(context, creator); if (!js_execution_async_resources_.IsEmpty()) { info.js_execution_async_resources = creator->AddData( @@ -183,7 +159,7 @@ index c6209cc7cf317de1bb9217e39dd760e5a83303e2..161d577e0ea6a251c83ba1903b1ec9a5 } else { info.js_execution_async_resources = 0; diff --git a/src/inspector/network_agent.cc b/src/inspector/network_agent.cc -index 3b5d9615021101ad03d9dfef83e0c56b462b59ad..823e7b8d3d07eb2afa1cc62d3d9e2af20f4e2e89 100644 +index d136b72e598d07f3c2fcc9c2c8ba84f5ff1aaad7..649008aafc8d68cfecb02c28ad1e26a9b749f7bd 100644 --- a/src/inspector/network_agent.cc +++ b/src/inspector/network_agent.cc @@ -29,31 +29,31 @@ using v8::Value; @@ -296,6 +272,15 @@ index 3b5d9615021101ad03d9dfef83e0c56b462b59ad..823e7b8d3d07eb2afa1cc62d3d9e2af2 protocol::String url; if (!ObjectGetProtocolString(context, response, "url").To(&url)) { return {}; +@@ -210,7 +210,7 @@ std::unique_ptr createResponseFromObject( + + std::unique_ptr createWebSocketResponse( + v8::Local context, Local response) { +- HandleScope handle_scope(context->GetIsolate()); ++ HandleScope handle_scope(v8::Isolate::GetCurrent()); + int status; + if (!ObjectGetInt(context, response, "status").To(&status)) { + return {}; diff --git a/src/js_native_api_v8.h b/src/js_native_api_v8.h index 27aeac589b19cd681923fb848ce5f36c66fc05e2..5f2900869763f40cac54e3cb3fe2e24eda615410 100644 --- a/src/js_native_api_v8.h @@ -310,10 +295,37 @@ index 27aeac589b19cd681923fb848ce5f36c66fc05e2..5f2900869763f40cac54e3cb3fe2e24e module_api_version(module_api_version) { napi_clear_last_error(this); diff --git a/src/module_wrap.cc b/src/module_wrap.cc -index cbb3e7f4df72f83cb8a1afc25a7429218792e964..ffccac5589bfe12eaf7861364cc6f2e403d26679 100644 +index 8fed194cbae9ce75bd0805b4df30b4de64fbbefa..a584e3a80adb69d2028dc79450349823ab973a58 100644 --- a/src/module_wrap.cc +++ b/src/module_wrap.cc -@@ -865,7 +865,7 @@ MaybeLocal ModuleWrap::ResolveModuleCallback( +@@ -99,7 +99,7 @@ ModuleCacheKey ModuleCacheKey::From(Local context, + Local specifier, + Local import_attributes) { + CHECK_EQ(import_attributes->Length() % elements_per_attribute, 0); +- Isolate* isolate = context->GetIsolate(); ++ Isolate* isolate = Isolate::GetCurrent(); + std::size_t h1 = specifier->GetIdentityHash(); + size_t num_attributes = import_attributes->Length() / elements_per_attribute; + ImportAttributeVector attributes; +@@ -1022,7 +1022,7 @@ MaybeLocal ModuleWrap::ResolveModuleCallback( + return {}; + } + DCHECK_NOT_NULL(resolved_module); +- return resolved_module->module_.Get(context->GetIsolate()); ++ return resolved_module->module_.Get(Isolate::GetCurrent()); + } + + // static +@@ -1046,7 +1046,7 @@ MaybeLocal ModuleWrap::ResolveSourceCallback( + Local url = resolved_module->object() + ->GetInternalField(ModuleWrap::kURLSlot) + .As(); +- THROW_ERR_SOURCE_PHASE_NOT_DEFINED(context->GetIsolate(), url); ++ THROW_ERR_SOURCE_PHASE_NOT_DEFINED(Isolate::GetCurrent(), url); + return {}; + } + CHECK(module_source_object->IsObject()); +@@ -1059,7 +1059,7 @@ Maybe ModuleWrap::ResolveModule( Local specifier, Local import_attributes, Local referrer) { @@ -322,16 +334,16 @@ index cbb3e7f4df72f83cb8a1afc25a7429218792e964..ffccac5589bfe12eaf7861364cc6f2e4 Environment* env = Environment::GetCurrent(context); if (env == nullptr) { THROW_ERR_EXECUTION_ENVIRONMENT_NOT_AVAILABLE(isolate); -@@ -907,7 +907,7 @@ MaybeLocal ImportModuleDynamically( - Local resource_name, +@@ -1104,7 +1104,7 @@ MaybeLocal ImportModuleDynamicallyWithPhase( Local specifier, + ModuleImportPhase phase, Local import_attributes) { - Isolate* isolate = context->GetIsolate(); + Isolate* isolate = Isolate::GetCurrent(); Environment* env = Environment::GetCurrent(context); if (env == nullptr) { THROW_ERR_EXECUTION_ENVIRONMENT_NOT_AVAILABLE(isolate); -@@ -1131,7 +1131,7 @@ MaybeLocal LinkRequireFacadeWithOriginal( +@@ -1346,7 +1346,7 @@ MaybeLocal LinkRequireFacadeWithOriginal( Local import_attributes, Local referrer) { Environment* env = Environment::GetCurrent(context); @@ -341,10 +353,10 @@ index cbb3e7f4df72f83cb8a1afc25a7429218792e964..ffccac5589bfe12eaf7861364cc6f2e4 CHECK(!env->temporary_required_module_facade_original.IsEmpty()); return env->temporary_required_module_facade_original.Get(isolate); diff --git a/src/node.h b/src/node.h -index 16a0c71aef949b0ddd27def9dc843298f9a6b75f..28fa4cb3e7a621480a5ff11c48666c0de1363375 100644 +index 7fae281a6e0f3c1a9f0eb97536883bb26c16d94d..fb37310f44c8d06d1ab2697ed64a0b539776a411 100644 --- a/src/node.h +++ b/src/node.h -@@ -1050,7 +1050,7 @@ NODE_DEPRECATED("Use v8::Date::ValueOf() directly", +@@ -1064,7 +1064,7 @@ NODE_DEPRECATED("Use v8::Date::ValueOf() directly", #define NODE_DEFINE_CONSTANT(target, constant) \ do { \ @@ -353,7 +365,7 @@ index 16a0c71aef949b0ddd27def9dc843298f9a6b75f..28fa4cb3e7a621480a5ff11c48666c0d v8::Local context = isolate->GetCurrentContext(); \ v8::Local constant_name = v8::String::NewFromUtf8Literal( \ isolate, #constant, v8::NewStringType::kInternalized); \ -@@ -1066,7 +1066,7 @@ NODE_DEPRECATED("Use v8::Date::ValueOf() directly", +@@ -1080,7 +1080,7 @@ NODE_DEPRECATED("Use v8::Date::ValueOf() directly", #define NODE_DEFINE_HIDDEN_CONSTANT(target, constant) \ do { \ @@ -363,7 +375,7 @@ index 16a0c71aef949b0ddd27def9dc843298f9a6b75f..28fa4cb3e7a621480a5ff11c48666c0d v8::Local constant_name = v8::String::NewFromUtf8Literal( \ isolate, #constant, v8::NewStringType::kInternalized); \ diff --git a/src/node_blob.cc b/src/node_blob.cc -index 9b9956f5ee3150a80f040cd0dbb9ef6589295600..14de0dad25fbf854ea23eb25abd6f9f2179e0dad 100644 +index d278a32c9934c15bc721da164efccca7bc7e7111..ab862bf93a411e6ae6da7c9f9706cee279a0ad70 100644 --- a/src/node_blob.cc +++ b/src/node_blob.cc @@ -554,7 +554,7 @@ void BlobBindingData::Deserialize(Local context, @@ -376,10 +388,10 @@ index 9b9956f5ee3150a80f040cd0dbb9ef6589295600..14de0dad25fbf854ea23eb25abd6f9f2 BlobBindingData* binding = realm->AddBindingData(holder); CHECK_NOT_NULL(binding); diff --git a/src/node_builtins.cc b/src/node_builtins.cc -index 4b288e0f89e0156cb5b0555c0259b2c1150770db..bc87057c8473d4731de55b909c58106217b32d1b 100644 +index e69eb280050cae0c0f394b2f956eef947e628904..9bb4576fcf4f07550e7d6f4ff2310cedc8093c5f 100644 --- a/src/node_builtins.cc +++ b/src/node_builtins.cc -@@ -275,7 +275,7 @@ MaybeLocal BuiltinLoader::LookupAndCompileInternal( +@@ -274,7 +274,7 @@ MaybeLocal BuiltinLoader::LookupAndCompileInternal( const char* id, LocalVector* parameters, Realm* optional_realm) { @@ -388,7 +400,7 @@ index 4b288e0f89e0156cb5b0555c0259b2c1150770db..bc87057c8473d4731de55b909c581062 EscapableHandleScope scope(isolate); Local source; -@@ -397,7 +397,7 @@ void BuiltinLoader::SaveCodeCache(const char* id, Local fun) { +@@ -396,7 +396,7 @@ void BuiltinLoader::SaveCodeCache(const char* id, Local fun) { MaybeLocal BuiltinLoader::LookupAndCompile(Local context, const char* id, Realm* optional_realm) { @@ -397,7 +409,7 @@ index 4b288e0f89e0156cb5b0555c0259b2c1150770db..bc87057c8473d4731de55b909c581062 LocalVector parameters(isolate); // Detects parameters of the scripts based on module ids. // internal/bootstrap/realm: process, getLinkedBinding, -@@ -451,7 +451,7 @@ MaybeLocal BuiltinLoader::LookupAndCompile(Local context, +@@ -450,7 +450,7 @@ MaybeLocal BuiltinLoader::LookupAndCompile(Local context, MaybeLocal BuiltinLoader::CompileAndCall(Local context, const char* id, Realm* realm) { @@ -406,7 +418,7 @@ index 4b288e0f89e0156cb5b0555c0259b2c1150770db..bc87057c8473d4731de55b909c581062 // Detects parameters of the scripts based on module ids. // internal/bootstrap/realm: process, getLinkedBinding, // getInternalBinding, primordials -@@ -507,7 +507,7 @@ MaybeLocal BuiltinLoader::CompileAndCall(Local context, +@@ -506,7 +506,7 @@ MaybeLocal BuiltinLoader::CompileAndCall(Local context, if (!maybe_fn.ToLocal(&fn)) { return MaybeLocal(); } @@ -415,12 +427,12 @@ index 4b288e0f89e0156cb5b0555c0259b2c1150770db..bc87057c8473d4731de55b909c581062 return fn->Call(context, undefined, argc, argv); } -@@ -546,14 +546,14 @@ bool BuiltinLoader::CompileAllBuiltinsAndCopyCodeCache( +@@ -544,14 +544,14 @@ bool BuiltinLoader::CompileAllBuiltinsAndCopyCodeCache( to_eager_compile_.emplace(id); } -- v8::TryCatch bootstrapCatch(context->GetIsolate()); -+ v8::TryCatch bootstrapCatch(Isolate::GetCurrent()); +- TryCatch bootstrapCatch(context->GetIsolate()); ++ TryCatch bootstrapCatch(Isolate::GetCurrent()); auto fn = LookupAndCompile(context, id.data(), nullptr); if (bootstrapCatch.HasCaught()) { per_process::Debug(DebugCategory::CODE_CACHE, @@ -433,10 +445,10 @@ index 4b288e0f89e0156cb5b0555c0259b2c1150770db..bc87057c8473d4731de55b909c581062 // This is used by the snapshot builder, so save the code cache // unconditionally. diff --git a/src/node_constants.cc b/src/node_constants.cc -index cbcecfba33070b820aca0e2814982160a97a6378..b1ee513fc0873a51b4885f612dbf7b950b5cf2ca 100644 +index fea0426496978c0003fe1481afcf93fc9c23edca..c9588880d05435ab9f4e23fcff74c93309664270 100644 --- a/src/node_constants.cc +++ b/src/node_constants.cc -@@ -1264,7 +1264,7 @@ void CreatePerContextProperties(Local target, +@@ -1265,7 +1265,7 @@ void CreatePerContextProperties(Local target, Local unused, Local context, void* priv) { @@ -444,12 +456,12 @@ index cbcecfba33070b820aca0e2814982160a97a6378..b1ee513fc0873a51b4885f612dbf7b95 + Isolate* isolate = Isolate::GetCurrent(); Environment* env = Environment::GetCurrent(context); - CHECK(target->SetPrototype(env->context(), Null(env->isolate())).FromJust()); + CHECK( diff --git a/src/node_contextify.cc b/src/node_contextify.cc -index 21a08a738e5c3506d27e402762a4a267e9278588..475b5628f9b82a2b9b86343f25759c1e6814f816 100644 +index 3c234205e89be7e976dae5c3fcc73ca67953e034..e66d4fcb0c064f96cdb819c783027d864fe88d12 100644 --- a/src/node_contextify.cc +++ b/src/node_contextify.cc -@@ -111,7 +111,7 @@ namespace { +@@ -113,7 +113,7 @@ namespace { // Convert an int to a V8 Name (String or Symbol). MaybeLocal Uint32ToName(Local context, uint32_t index) { @@ -458,7 +470,7 @@ index 21a08a738e5c3506d27e402762a4a267e9278588..475b5628f9b82a2b9b86343f25759c1e } } // anonymous namespace -@@ -682,7 +682,7 @@ Intercepted ContextifyContext::PropertyDefinerCallback( +@@ -677,7 +677,7 @@ Intercepted ContextifyContext::PropertyDefinerCallback( } Local context = ctx->context(); @@ -467,7 +479,7 @@ index 21a08a738e5c3506d27e402762a4a267e9278588..475b5628f9b82a2b9b86343f25759c1e PropertyAttribute attributes = PropertyAttribute::None; bool is_declared = -@@ -1657,7 +1657,7 @@ static MaybeLocal CompileFunctionForCJSLoader( +@@ -1666,7 +1666,7 @@ static MaybeLocal CompileFunctionForCJSLoader( bool* cache_rejected, bool is_cjs_scope, ScriptCompiler::CachedData* cached_data) { @@ -477,10 +489,10 @@ index 21a08a738e5c3506d27e402762a4a267e9278588..475b5628f9b82a2b9b86343f25759c1e Local symbol = env->vm_dynamic_import_default_internal(); diff --git a/src/node_env_var.cc b/src/node_env_var.cc -index 492d5f455f45a5c8a957ecdabed38709a633f640..48f9917113555c7ed87e37750c45d152fa4b68f8 100644 +index 6aad252eb5681bb9ab9890812602b43c418e7a7f..5f7ef8cc58f589ba30a44abaaaaaf1514458c3f0 100644 --- a/src/node_env_var.cc +++ b/src/node_env_var.cc -@@ -295,7 +295,7 @@ std::shared_ptr KVStore::CreateMapKVStore() { +@@ -311,7 +311,7 @@ std::shared_ptr KVStore::CreateMapKVStore() { Maybe KVStore::AssignFromObject(Local context, Local entries) { @@ -490,7 +502,7 @@ index 492d5f455f45a5c8a957ecdabed38709a633f640..48f9917113555c7ed87e37750c45d152 Local keys; if (!entries->GetOwnPropertyNames(context).ToLocal(&keys)) diff --git a/src/node_errors.cc b/src/node_errors.cc -index befb642f1effa3c4139e4cd99ff64d9c5175fd72..9c068afd1c4c3fadeee4ba035e67ec4ae72c7f73 100644 +index 4386a1bc5678e351ce084cd2c47202561619b164..8d51201ad24999ed8f54e16c7878432d41841cf2 100644 --- a/src/node_errors.cc +++ b/src/node_errors.cc @@ -633,7 +633,7 @@ v8::ModifyCodeGenerationFromStringsResult ModifyCodeGenerationFromStrings( @@ -511,9 +523,9 @@ index befb642f1effa3c4139e4cd99ff64d9c5175fd72..9c068afd1c4c3fadeee4ba035e67ec4a switch (message->ErrorLevel()) { case Isolate::MessageErrorLevel::kMessageWarning: { Environment* env = Environment::GetCurrent(isolate); -@@ -1118,7 +1118,7 @@ void Initialize(Local target, +@@ -1161,7 +1161,7 @@ void Initialize(Local target, SetMethod( - context, target, "triggerUncaughtException", TriggerUncaughtException); + context, target, "getErrorSourcePositions", GetErrorSourcePositions); - Isolate* isolate = context->GetIsolate(); + Isolate* isolate = Isolate::GetCurrent(); @@ -521,10 +533,10 @@ index befb642f1effa3c4139e4cd99ff64d9c5175fd72..9c068afd1c4c3fadeee4ba035e67ec4a READONLY_PROPERTY(target, "exitCodes", exit_codes); diff --git a/src/node_file.cc b/src/node_file.cc -index d7009937b31729f33d9c45cbda7f5440fbdac2aa..e57a3140cd90d7e7852a0c6892091e50b850ae64 100644 +index d73dac2ee3f1cf1cac6845fae0f702c9fba8fcef..969e7d08086f8442bed476feaf15599b8c79db7c 100644 --- a/src/node_file.cc +++ b/src/node_file.cc -@@ -3753,7 +3753,7 @@ void BindingData::Deserialize(Local context, +@@ -3874,7 +3874,7 @@ void BindingData::Deserialize(Local context, int index, InternalFieldInfoBase* info) { DCHECK_IS_SNAPSHOT_SLOT(index); @@ -534,10 +546,10 @@ index d7009937b31729f33d9c45cbda7f5440fbdac2aa..e57a3140cd90d7e7852a0c6892091e50 InternalFieldInfo* casted_info = static_cast(info); BindingData* binding = diff --git a/src/node_messaging.cc b/src/node_messaging.cc -index 1eff9399ff87510164390a1dfea84158a8856b86..e912562d768308906286890b7015cf2c462bac49 100644 +index 57e068ae249d618c2658638f9f3b03e1fedb6524..8c51ae4e0a435971c6d0288af87810877dd31a49 100644 --- a/src/node_messaging.cc +++ b/src/node_messaging.cc -@@ -253,7 +253,7 @@ namespace { +@@ -254,7 +254,7 @@ namespace { MaybeLocal GetEmitMessageFunction(Local context, IsolateData* isolate_data) { @@ -546,7 +558,7 @@ index 1eff9399ff87510164390a1dfea84158a8856b86..e912562d768308906286890b7015cf2c Local per_context_bindings; Local emit_message_val; if (!GetPerContextExports(context, isolate_data) -@@ -268,7 +268,7 @@ MaybeLocal GetEmitMessageFunction(Local context, +@@ -269,7 +269,7 @@ MaybeLocal GetEmitMessageFunction(Local context, } MaybeLocal GetDOMException(Local context) { @@ -555,7 +567,7 @@ index 1eff9399ff87510164390a1dfea84158a8856b86..e912562d768308906286890b7015cf2c Local per_context_bindings; Local domexception_ctor_val; if (!GetPerContextExports(context).ToLocal(&per_context_bindings) || -@@ -283,7 +283,7 @@ MaybeLocal GetDOMException(Local context) { +@@ -284,7 +284,7 @@ MaybeLocal GetDOMException(Local context) { } void ThrowDataCloneException(Local context, Local message) { @@ -564,7 +576,7 @@ index 1eff9399ff87510164390a1dfea84158a8856b86..e912562d768308906286890b7015cf2c Local argv[] = {message, FIXED_ONE_BYTE_STRING(isolate, "DataCloneError")}; Local exception; -@@ -1464,7 +1464,7 @@ BaseObjectPtr JSTransferable::Data::Deserialize( +@@ -1477,7 +1477,7 @@ BaseObjectPtr JSTransferable::Data::Deserialize( Maybe JSTransferable::Data::FinalizeTransferWrite( Local context, ValueSerializer* serializer) { @@ -574,10 +586,10 @@ index 1eff9399ff87510164390a1dfea84158a8856b86..e912562d768308906286890b7015cf2c data_.Reset(); return ret; diff --git a/src/node_modules.cc b/src/node_modules.cc -index 6204986dc97686a248d6ae483f3a413ee5c51e47..c0108310df81c9bd1756a6fb92466a7f84e53f7c 100644 +index bdbc511ef3f680bbac6770b89f47acaee95d56a2..d8477191efafba3c41c06d765f4b03bd00b8573c 100644 --- a/src/node_modules.cc +++ b/src/node_modules.cc -@@ -64,7 +64,7 @@ void BindingData::Deserialize(v8::Local context, +@@ -69,7 +69,7 @@ void BindingData::Deserialize(v8::Local context, int index, InternalFieldInfoBase* info) { DCHECK_IS_SNAPSHOT_SLOT(index); @@ -586,7 +598,7 @@ index 6204986dc97686a248d6ae483f3a413ee5c51e47..c0108310df81c9bd1756a6fb92466a7f Realm* realm = Realm::GetCurrent(context); BindingData* binding = realm->AddBindingData(holder); CHECK_NOT_NULL(binding); -@@ -706,7 +706,7 @@ void BindingData::CreatePerContextProperties(Local target, +@@ -735,7 +735,7 @@ void BindingData::CreatePerContextProperties(Local target, Realm* realm = Realm::GetCurrent(context); realm->AddBindingData(target); @@ -596,10 +608,10 @@ index 6204986dc97686a248d6ae483f3a413ee5c51e47..c0108310df81c9bd1756a6fb92466a7f #define V(status) \ diff --git a/src/node_process_methods.cc b/src/node_process_methods.cc -index 1cb08b715865f8337e0292fc8e2a26488ba21694..2bd20fc173d4110282ee736e49b49ce0859088f3 100644 +index e453bacc3e5247493a3582c24174bfe6e590825d..fe4aad63bc877be105830a80aa6be10ce3f8fda4 100644 --- a/src/node_process_methods.cc +++ b/src/node_process_methods.cc -@@ -736,7 +736,7 @@ void BindingData::Deserialize(Local context, +@@ -737,7 +737,7 @@ void BindingData::Deserialize(Local context, int index, InternalFieldInfoBase* info) { DCHECK_IS_SNAPSHOT_SLOT(index); @@ -609,10 +621,10 @@ index 1cb08b715865f8337e0292fc8e2a26488ba21694..2bd20fc173d4110282ee736e49b49ce0 // Recreate the buffer in the constructor. InternalFieldInfo* casted_info = static_cast(info); diff --git a/src/node_realm.cc b/src/node_realm.cc -index cd2b4c0107594a8ba9bf671669e4c82326719908..d18945085ff1860bbe3796e0b47904210aafd941 100644 +index 2a5fe9fe501d1fd9356eeb7d044a872fa5a55f38..39f6f142044c42904d234da20a266315346c135a 100644 --- a/src/node_realm.cc +++ b/src/node_realm.cc -@@ -19,7 +19,7 @@ using v8::String; +@@ -22,7 +22,7 @@ using v8::String; using v8::Value; Realm::Realm(Environment* env, v8::Local context, Kind kind) @@ -620,12 +632,12 @@ index cd2b4c0107594a8ba9bf671669e4c82326719908..d18945085ff1860bbe3796e0b4790421 + : env_(env), isolate_(v8::Isolate::GetCurrent()), kind_(kind) { context_.Reset(isolate_, context); env->AssignToContext(context, this, ContextInfo("")); - } + // The environment can also purge empty wrappers in the check callback, diff --git a/src/node_report.cc b/src/node_report.cc -index df73a8204bc0917073a70ca68d019ceab3159b08..d7bb94db78b3a729f25ceaf66d193032056b36ff 100644 +index c82c6bcc083ba60137e83b3c291130636db3162f..0d06f61d7fb2472a3d7a66854040dc493406b79e 100644 --- a/src/node_report.cc +++ b/src/node_report.cc -@@ -399,7 +399,7 @@ static void PrintJavaScriptErrorProperties(JSONWriter* writer, +@@ -400,7 +400,7 @@ static void PrintJavaScriptErrorProperties(JSONWriter* writer, if (!error.IsEmpty() && error->IsObject()) { TryCatch try_catch(isolate); Local error_obj = error.As(); @@ -635,10 +647,10 @@ index df73a8204bc0917073a70ca68d019ceab3159b08..d7bb94db78b3a729f25ceaf66d193032 if (!error_obj->GetOwnPropertyNames(context).ToLocal(&keys)) { return writer->json_objectend(); // the end of 'errorProperties' diff --git a/src/node_snapshotable.cc b/src/node_snapshotable.cc -index 69d8d15d8989ed31a19489e68588e730760c8ffb..d342a5ff91bbd9cb73c02c26ae3a36b9d0dc7b47 100644 +index c2e24b4645e7903e08c80aead1c18c7bcff1bd89..e34d24d51d5c090b560d06f727043f20924e6f46 100644 --- a/src/node_snapshotable.cc +++ b/src/node_snapshotable.cc -@@ -1613,7 +1613,7 @@ void BindingData::Deserialize(Local context, +@@ -1614,7 +1614,7 @@ void BindingData::Deserialize(Local context, int index, InternalFieldInfoBase* info) { DCHECK_IS_SNAPSHOT_SLOT(index); @@ -648,10 +660,10 @@ index 69d8d15d8989ed31a19489e68588e730760c8ffb..d342a5ff91bbd9cb73c02c26ae3a36b9 // Recreate the buffer in the constructor. InternalFieldInfo* casted_info = static_cast(info); diff --git a/src/node_sqlite.cc b/src/node_sqlite.cc -index 8b6fe36e1fece112269ebf193d6322a4d1dacc0a..96101167016573e80fff520256ebb78c71d83302 100644 +index 7bb4d4108c8326d69da5236c7ea7f00ddb68cea9..cf9ce6686cffca7e700a0e20cb9f776a5f0f7c4a 100644 --- a/src/node_sqlite.cc +++ b/src/node_sqlite.cc -@@ -1858,7 +1858,7 @@ bool StatementSync::BindParams(const FunctionCallbackInfo& args) { +@@ -2020,7 +2020,7 @@ bool StatementSync::BindParams(const FunctionCallbackInfo& args) { if (args[0]->IsObject() && !args[0]->IsArrayBufferView()) { Local obj = args[0].As(); @@ -661,7 +673,7 @@ index 8b6fe36e1fece112269ebf193d6322a4d1dacc0a..96101167016573e80fff520256ebb78c if (!obj->GetOwnPropertyNames(context).ToLocal(&keys)) { return false; diff --git a/src/node_task_queue.cc b/src/node_task_queue.cc -index c4257110d8b52017fccd8e1e746b557a0b7084df..6f00da0b515397d300e387f03f4a2bf71155cfe0 100644 +index d33ee3c26c111e53edf27e6368ca8f64ff30a349..f1c53c44f201b295888e7932c5e3e2b19cb9c319 100644 --- a/src/node_task_queue.cc +++ b/src/node_task_queue.cc @@ -48,7 +48,7 @@ void PromiseRejectCallback(PromiseRejectMessage message) { @@ -674,10 +686,10 @@ index c4257110d8b52017fccd8e1e746b557a0b7084df..6f00da0b515397d300e387f03f4a2bf7 Environment* env = Environment::GetCurrent(isolate); diff --git a/src/node_url.cc b/src/node_url.cc -index 09589e85e8bc131811204833d9a76f98c7b2a102..1154b452151b6b597aed67effbb3796c635d236b 100644 +index 9d1e8ec05161570db11f7b662395509774668d78..9b91f83d879ea02fd3d61913c8dfd35b3bf1ac31 100644 --- a/src/node_url.cc +++ b/src/node_url.cc -@@ -69,7 +69,7 @@ void BindingData::Deserialize(Local context, +@@ -70,7 +70,7 @@ void BindingData::Deserialize(Local context, int index, InternalFieldInfoBase* info) { DCHECK_IS_SNAPSHOT_SLOT(index); @@ -687,10 +699,10 @@ index 09589e85e8bc131811204833d9a76f98c7b2a102..1154b452151b6b597aed67effbb3796c BindingData* binding = realm->AddBindingData(holder); CHECK_NOT_NULL(binding); diff --git a/src/node_v8.cc b/src/node_v8.cc -index 430d5dd4f808af7b1790bd62f06d47b86100d4e9..08a741216d88c95d580e9281e174550001ff2b21 100644 +index 98e392f6d7118bee8a3d0bce4de1ded76a293001..152b030198c6b36efd2be6c06f5c6e8bbc7cfadb 100644 --- a/src/node_v8.cc +++ b/src/node_v8.cc -@@ -157,7 +157,7 @@ void BindingData::Deserialize(Local context, +@@ -158,7 +158,7 @@ void BindingData::Deserialize(Local context, int index, InternalFieldInfoBase* info) { DCHECK_IS_SNAPSHOT_SLOT(index); @@ -700,10 +712,10 @@ index 430d5dd4f808af7b1790bd62f06d47b86100d4e9..08a741216d88c95d580e9281e1745500 // Recreate the buffer in the constructor. InternalFieldInfo* casted_info = static_cast(info); diff --git a/src/node_wasi.cc b/src/node_wasi.cc -index 3f91b651b83a20e70d5b368e012f5ee4b9d16092..40c601acd752b559f7ffbc00c15728fbb5275ac5 100644 +index 370221d3cddc201180260ecb3a222bc831c91093..f5aff2f65fe6b9f48cf970ab3e7c57cfe4885f85 100644 --- a/src/node_wasi.cc +++ b/src/node_wasi.cc -@@ -49,7 +49,7 @@ using v8::WasmMemoryObject; +@@ -50,7 +50,7 @@ using v8::WasmMemoryObject; static MaybeLocal WASIException(Local context, int errorno, const char* syscall) { @@ -712,20 +724,22 @@ index 3f91b651b83a20e70d5b368e012f5ee4b9d16092..40c601acd752b559f7ffbc00c15728fb Environment* env = Environment::GetCurrent(context); CHECK_NOT_NULL(env); const char* err_name = uvwasi_embedder_err_code_to_string(errorno); -@@ -275,7 +275,7 @@ R WASI::WasiFunction::FastCallback( +@@ -275,8 +275,8 @@ R WASI::WasiFunction::FastCallback( return EinvalError(); } -- v8::Isolate* isolate = receiver->GetIsolate(); -+ v8::Isolate* isolate = v8::Isolate::GetCurrent(); - v8::HandleScope handle_scope(isolate); +- Isolate* isolate = receiver->GetIsolate(); +- HandleScope scope(isolate); ++ Isolate* isolate = Isolate::GetCurrent(); ++ HandleScope handle_scope(isolate); if (wasi->memory_.IsEmpty()) { THROW_ERR_WASI_NOT_STARTED(isolate); + return EinvalError(); diff --git a/src/node_webstorage.cc b/src/node_webstorage.cc -index 74ece724e207a69e2457598a199c12f1cebcfd4a..1705e430099c5a363e02010f83d729b0aa54f8e5 100644 +index cc90af827a3fbd14fb4cbfbfd39cc661f22cf6e1..5819d9bca845e0eed6d4d93564469d8f3c36200b 100644 --- a/src/node_webstorage.cc +++ b/src/node_webstorage.cc -@@ -58,7 +58,7 @@ using v8::Value; +@@ -57,7 +57,7 @@ using v8::Value; } while (0) static void ThrowQuotaExceededException(Local context) { @@ -734,7 +748,7 @@ index 74ece724e207a69e2457598a199c12f1cebcfd4a..1705e430099c5a363e02010f83d729b0 auto dom_exception_str = FIXED_ONE_BYTE_STRING(isolate, "DOMException"); auto err_name = FIXED_ONE_BYTE_STRING(isolate, "QuotaExceededError"); auto err_message = -@@ -434,7 +434,7 @@ Maybe Storage::Store(Local key, Local value) { +@@ -433,7 +433,7 @@ Maybe Storage::Store(Local key, Local value) { } static MaybeLocal Uint32ToName(Local context, uint32_t index) { @@ -744,10 +758,10 @@ index 74ece724e207a69e2457598a199c12f1cebcfd4a..1705e430099c5a363e02010f83d729b0 static void Clear(const FunctionCallbackInfo& info) { diff --git a/src/node_worker.cc b/src/node_worker.cc -index 8555ab556b5b74a1cf9cf30747f1f417bfe4e4d9..1a2532337504444d59098304b87e0d65f16e838c 100644 +index 62c53368d1173edb7eb42e3337049c46fd7cdda9..7d08d8af7f6d99f7bd41cb7eb91063c630b3f87b 100644 --- a/src/node_worker.cc +++ b/src/node_worker.cc -@@ -1289,8 +1289,6 @@ void GetEnvMessagePort(const FunctionCallbackInfo& args) { +@@ -1466,8 +1466,6 @@ void GetEnvMessagePort(const FunctionCallbackInfo& args) { Local port = env->message_port(); CHECK_IMPLIES(!env->is_main_thread(), !port.IsEmpty()); if (!port.IsEmpty()) { @@ -757,10 +771,10 @@ index 8555ab556b5b74a1cf9cf30747f1f417bfe4e4d9..1a2532337504444d59098304b87e0d65 } } diff --git a/src/timers.cc b/src/timers.cc -index bf90e68479da141265f748775acacab513b8d437..5f0d07b4ac1d9b8df6c8bb059e5d07ac1a882b36 100644 +index da4206187f7c7d2becb8a101c1ff5346a10e13f4..03f0910926f3d403121e227cee32a546b2394e04 100644 --- a/src/timers.cc +++ b/src/timers.cc -@@ -117,7 +117,7 @@ void BindingData::Deserialize(Local context, +@@ -114,7 +114,7 @@ void BindingData::Deserialize(Local context, int index, InternalFieldInfoBase* info) { DCHECK_IS_SNAPSHOT_SLOT(index); @@ -770,10 +784,10 @@ index bf90e68479da141265f748775acacab513b8d437..5f0d07b4ac1d9b8df6c8bb059e5d07ac // Recreate the buffer in the constructor. BindingData* binding = realm->AddBindingData(holder); diff --git a/src/util-inl.h b/src/util-inl.h -index b21f7a8260ca6a4701f8904b9cb641428db80772..16fe55f3054fd20544babd63ff204330cb47c1a7 100644 +index 9d4db311024c5f526fc3c00764fff686af044026..da9268dcf2ff432ddeec7c0f61a147b73f3130e2 100644 --- a/src/util-inl.h +++ b/src/util-inl.h -@@ -326,14 +326,14 @@ v8::Maybe FromV8Array(v8::Local context, +@@ -336,14 +336,14 @@ v8::Maybe FromV8Array(v8::Local context, std::vector>* out) { uint32_t count = js_array->Length(); out->reserve(count); @@ -790,7 +804,7 @@ index b21f7a8260ca6a4701f8904b9cb641428db80772..16fe55f3054fd20544babd63ff204330 if (str.size() >= static_cast(v8::String::kMaxLength)) [[unlikely]] { // V8 only has a TODO comment about adding an exception when the maximum // string size is exceeded. -@@ -349,7 +349,7 @@ v8::MaybeLocal ToV8Value(v8::Local context, +@@ -359,7 +359,7 @@ v8::MaybeLocal ToV8Value(v8::Local context, v8::MaybeLocal ToV8Value(v8::Local context, v8_inspector::StringView str, v8::Isolate* isolate) { @@ -799,7 +813,7 @@ index b21f7a8260ca6a4701f8904b9cb641428db80772..16fe55f3054fd20544babd63ff204330 if (str.length() >= static_cast(v8::String::kMaxLength)) [[unlikely]] { // V8 only has a TODO comment about adding an exception when the maximum -@@ -376,7 +376,7 @@ template +@@ -386,7 +386,7 @@ template v8::MaybeLocal ToV8Value(v8::Local context, const std::vector& vec, v8::Isolate* isolate) { @@ -808,7 +822,7 @@ index b21f7a8260ca6a4701f8904b9cb641428db80772..16fe55f3054fd20544babd63ff204330 v8::EscapableHandleScope handle_scope(isolate); MaybeStackBuffer, 128> arr(vec.size()); -@@ -393,7 +393,7 @@ template +@@ -403,7 +403,7 @@ template v8::MaybeLocal ToV8Value(v8::Local context, const std::set& set, v8::Isolate* isolate) { @@ -817,7 +831,16 @@ index b21f7a8260ca6a4701f8904b9cb641428db80772..16fe55f3054fd20544babd63ff204330 v8::Local set_js = v8::Set::New(isolate); v8::HandleScope handle_scope(isolate); -@@ -412,7 +412,7 @@ template +@@ -422,7 +422,7 @@ template + v8::MaybeLocal ToV8Value(v8::Local context, + const std::ranges::elements_view& vec, + v8::Isolate* isolate) { +- if (isolate == nullptr) isolate = context->GetIsolate(); ++ if (isolate == nullptr) isolate = v8::Isolate::GetCurrent(); + v8::EscapableHandleScope handle_scope(isolate); + + MaybeStackBuffer, 128> arr(vec.size()); +@@ -441,7 +441,7 @@ template v8::MaybeLocal ToV8Value(v8::Local context, const std::unordered_map& map, v8::Isolate* isolate) { @@ -826,7 +849,7 @@ index b21f7a8260ca6a4701f8904b9cb641428db80772..16fe55f3054fd20544babd63ff204330 v8::EscapableHandleScope handle_scope(isolate); v8::Local ret = v8::Map::New(isolate); -@@ -455,7 +455,7 @@ template +@@ -484,7 +484,7 @@ template v8::MaybeLocal ToV8Value(v8::Local context, const T& number, v8::Isolate* isolate) { @@ -835,7 +858,7 @@ index b21f7a8260ca6a4701f8904b9cb641428db80772..16fe55f3054fd20544babd63ff204330 return ConvertNumberToV8Value(isolate, number); } -@@ -468,7 +468,7 @@ v8::Local ToV8ValuePrimitiveArray(v8::Local context, +@@ -497,7 +497,7 @@ v8::Local ToV8ValuePrimitiveArray(v8::Local context, std::is_floating_point_v, "Only primitive types (bool, integral, floating-point) are supported."); @@ -844,11 +867,20 @@ index b21f7a8260ca6a4701f8904b9cb641428db80772..16fe55f3054fd20544babd63ff204330 v8::EscapableHandleScope handle_scope(isolate); v8::LocalVector elements(isolate); +@@ -731,7 +731,7 @@ inline v8::MaybeLocal NewDictionaryInstanceNullProto( + if (value.IsEmpty()) return v8::MaybeLocal(); + } + v8::Local obj = tmpl->NewInstance(context, property_values); +- if (obj->SetPrototypeV2(context, v8::Null(context->GetIsolate())) ++ if (obj->SetPrototypeV2(context, v8::Null(v8::Isolate::GetCurrent())) + .IsNothing()) { + return v8::MaybeLocal(); + } diff --git a/src/util.cc b/src/util.cc -index 5ca32f026f9f001ddadc14965705fe005600eddd..1b38f22b930b77d80aa53f9b12299d3cc469a46d 100644 +index 660cfff6b8a0c583be843e555e7a06cd09e0d279..c4b39450c5b7f91c46f7027db367c30db34927bb 100644 --- a/src/util.cc +++ b/src/util.cc -@@ -393,7 +393,7 @@ void SetMethod(Local context, +@@ -391,7 +391,7 @@ void SetMethod(Local context, Local that, const std::string_view name, v8::FunctionCallback callback) { @@ -857,7 +889,7 @@ index 5ca32f026f9f001ddadc14965705fe005600eddd..1b38f22b930b77d80aa53f9b12299d3c Local function = NewFunctionTemplate(isolate, callback, -@@ -454,7 +454,7 @@ void SetFastMethod(Local context, +@@ -452,7 +452,7 @@ void SetFastMethod(Local context, const std::string_view name, v8::FunctionCallback slow_callback, const v8::CFunction* c_function) { @@ -866,7 +898,7 @@ index 5ca32f026f9f001ddadc14965705fe005600eddd..1b38f22b930b77d80aa53f9b12299d3c Local function = NewFunctionTemplate(isolate, slow_callback, -@@ -476,7 +476,7 @@ void SetFastMethodNoSideEffect(Local context, +@@ -474,7 +474,7 @@ void SetFastMethodNoSideEffect(Local context, const std::string_view name, v8::FunctionCallback slow_callback, const v8::CFunction* c_function) { @@ -875,7 +907,7 @@ index 5ca32f026f9f001ddadc14965705fe005600eddd..1b38f22b930b77d80aa53f9b12299d3c Local function = NewFunctionTemplate(isolate, slow_callback, -@@ -564,7 +564,7 @@ void SetMethodNoSideEffect(Local context, +@@ -562,7 +562,7 @@ void SetMethodNoSideEffect(Local context, Local that, const std::string_view name, v8::FunctionCallback callback) { @@ -884,7 +916,7 @@ index 5ca32f026f9f001ddadc14965705fe005600eddd..1b38f22b930b77d80aa53f9b12299d3c Local function = NewFunctionTemplate(isolate, callback, -@@ -665,7 +665,7 @@ void SetConstructorFunction(Local context, +@@ -689,7 +689,7 @@ void SetConstructorFunction(Local context, const char* name, Local tmpl, SetConstructorFunctionFlag flag) { @@ -894,10 +926,10 @@ index 5ca32f026f9f001ddadc14965705fe005600eddd..1b38f22b930b77d80aa53f9b12299d3c context, that, OneByteString(isolate, name), tmpl, flag); } diff --git a/src/util.h b/src/util.h -index 7c98de621ca4d53cbaaa5bd4488aab20c7b033a7..329d2397c87ac37d157e3325e2ab62907d7286b4 100644 +index 2b351235cf7f32c9fad25367cc912d187466f1e0..6da57f95165bbdedb65dab6eaae8c39b815ee4e5 100644 --- a/src/util.h +++ b/src/util.h -@@ -756,7 +756,7 @@ inline v8::MaybeLocal ToV8Value(v8::Local context, +@@ -739,7 +739,7 @@ inline v8::MaybeLocal ToV8Value( // Variation on NODE_DEFINE_CONSTANT that sets a String value. #define NODE_DEFINE_STRING_CONSTANT(target, name, constant) \ do { \ diff --git a/patches/node/build_add_gn_build_files.patch b/patches/node/build_add_gn_build_files.patch index 9176dfe6f4..8524c80056 100644 --- a/patches/node/build_add_gn_build_files.patch +++ b/patches/node/build_add_gn_build_files.patch @@ -11,10 +11,10 @@ really in 20/21. We have to wait until 22 is released to be able to build with upstream GN files. diff --git a/configure.py b/configure.py -index 91283ca577f580dbf1e0c4e2dbf851a9ceaa38ed..e8eaff30ec947677db2d45425f9180759d0c55de 100755 +index 7f73f084ef1a8336089e6a16423c2eb310c0b9f2..96eedd5d9ae05ee6704724290973251059d5dd78 100755 --- a/configure.py +++ b/configure.py -@@ -1728,7 +1728,7 @@ def configure_v8(o, configs): +@@ -1730,7 +1730,7 @@ def configure_v8(o, configs): # Until we manage to get rid of all those, v8_enable_sandbox cannot be used. # Note that enabling pointer compression without enabling sandbox is unsupported by V8, # so this can be broken at any time. @@ -68,10 +68,10 @@ index d4438f7fd61598afac2c1e3184721a759d22b10c..e2407027ab05e59b2f0f1c213b98ea46 assert(!node_enable_inspector || node_use_openssl, diff --git a/src/node_builtins.cc b/src/node_builtins.cc -index b83aa87c969fb4e71cb202816713af869bb76283..c54df6fee333ddfe59b9df7e0ddd2935b4dcb33f 100644 +index 581b9886ded52f294b7cc6b080b2269b7617c85e..e43e2559aaf48add88aad342b1c96fd34f26c87f 100644 --- a/src/node_builtins.cc +++ b/src/node_builtins.cc -@@ -789,6 +789,7 @@ void BuiltinLoader::RegisterExternalReferences( +@@ -774,6 +774,7 @@ void BuiltinLoader::RegisterExternalReferences( registry->Register(GetNatives); RegisterExternalReferencesForInternalizedBuiltinCode(registry); @@ -80,10 +80,10 @@ index b83aa87c969fb4e71cb202816713af869bb76283..c54df6fee333ddfe59b9df7e0ddd2935 } // namespace builtins diff --git a/src/node_builtins.h b/src/node_builtins.h -index f9426599f2d5dc6ad061407f0c4eb2c9203a4433..302030f610965f07dd6998d282275c1bdf738009 100644 +index 7a7b84337feb67960819472e43192dbdc151e299..bcdd50f635757f41287c87df1db9cd3b55c4b6b9 100644 --- a/src/node_builtins.h +++ b/src/node_builtins.h -@@ -74,6 +74,8 @@ using BuiltinCodeCacheMap = +@@ -75,6 +75,8 @@ using BuiltinCodeCacheMap = // Generated by tools/js2c.cc as node_javascript.cc void RegisterExternalReferencesForInternalizedBuiltinCode( ExternalReferenceRegistry* registry); @@ -92,26 +92,6 @@ index f9426599f2d5dc6ad061407f0c4eb2c9203a4433..302030f610965f07dd6998d282275c1b // Handles compilation and caching of built-in JavaScript modules and // bootstrap scripts, whose source are bundled into the binary as static data. -diff --git a/tools/install.py b/tools/install.py -index 8797b59e59c85a8877b977fa3281e50165e6f6b2..0af01e075616195f38fb242626dcab770ec1eb57 100755 ---- a/tools/install.py -+++ b/tools/install.py -@@ -222,6 +222,7 @@ def headers(options, action): - 'include/cppgc/internal/caged-heap-local-data.h', - 'include/cppgc/internal/caged-heap.h', - 'include/cppgc/internal/compiler-specific.h', -+ 'include/cppgc/internal/conditional-stack-allocated.h', - 'include/cppgc/internal/finalizer-trait.h', - 'include/cppgc/internal/gc-info.h', - 'include/cppgc/internal/logging.h', -@@ -301,6 +302,7 @@ def headers(options, action): - 'include/v8-promise.h', - 'include/v8-proxy.h', - 'include/v8-regexp.h', -+ 'include/v8-sandbox.h', - 'include/v8-script.h', - 'include/v8-snapshot.h', - 'include/v8-source-location.h', diff --git a/tools/js2c.cc b/tools/js2c.cc old mode 100644 new mode 100755 @@ -271,7 +251,7 @@ index 856878c33681a73d41016729dabe48b0a6a80589..91a11852d206b65485fe90fd037a0bd1 if sys.platform == 'win32': files = [ x.replace('\\', '/') for x in files ] diff --git a/unofficial.gni b/unofficial.gni -index 865a0d5ce9c6792e57f4216bcaa594ca6fc7b1c8..26ebc811272ef2990f8d090c54e7f5294aab9d37 100644 +index c742b62c484e9dd205eff63dcffad78c76828375..20d2483bb16e297ab5b12aab6f56948d6d25cb03 100644 --- a/unofficial.gni +++ b/unofficial.gni @@ -147,31 +147,41 @@ template("node_gn_build") { @@ -339,7 +319,7 @@ index 865a0d5ce9c6792e57f4216bcaa594ca6fc7b1c8..26ebc811272ef2990f8d090c54e7f529 executable(target_name) { forward_variables_from(invoker, "*") -@@ -297,6 +311,7 @@ template("node_gn_build") { +@@ -314,6 +328,7 @@ template("node_gn_build") { } executable("node_js2c") { @@ -347,7 +327,7 @@ index 865a0d5ce9c6792e57f4216bcaa594ca6fc7b1c8..26ebc811272ef2990f8d090c54e7f529 deps = [ "deps/uv", "$node_simdutf_path", -@@ -307,26 +322,75 @@ template("node_gn_build") { +@@ -324,26 +339,75 @@ template("node_gn_build") { "src/embedded_data.cc", "src/embedded_data.h", ] @@ -433,7 +413,7 @@ index 865a0d5ce9c6792e57f4216bcaa594ca6fc7b1c8..26ebc811272ef2990f8d090c54e7f529 outputs = [ "$target_gen_dir/node_javascript.cc" ] # Get the path to node_js2c executable of the host toolchain. -@@ -340,11 +404,11 @@ template("node_gn_build") { +@@ -357,11 +421,11 @@ template("node_gn_build") { get_label_info(":node_js2c($host_toolchain)", "name") + host_executable_suffix diff --git a/patches/node/build_allow_unbundling_of_node_js_dependencies.patch b/patches/node/build_allow_unbundling_of_node_js_dependencies.patch index 48d4362fb6..1ce105ad3e 100644 --- a/patches/node/build_allow_unbundling_of_node_js_dependencies.patch +++ b/patches/node/build_allow_unbundling_of_node_js_dependencies.patch @@ -14,7 +14,7 @@ We don't need to do this for zlib, as the existing gn workflow uses the same Upstreamed at https://github.com/nodejs/node/pull/55903 diff --git a/unofficial.gni b/unofficial.gni -index 26ebc811272ef2990f8d090c54e7f5294aab9d37..8886f2a79ae77614789d6ae0defd4f18fc756456 100644 +index 20d2483bb16e297ab5b12aab6f56948d6d25cb03..253226009faf563f6db285d4b2908f308c1f96ea 100644 --- a/unofficial.gni +++ b/unofficial.gni @@ -160,7 +160,6 @@ template("node_gn_build") { diff --git a/patches/node/build_change_crdtp_protocoltypetraits_signatures_to_avoid_conflict.patch b/patches/node/build_change_crdtp_protocoltypetraits_signatures_to_avoid_conflict.patch index 7f669c5b0b..927fd47891 100644 --- a/patches/node/build_change_crdtp_protocoltypetraits_signatures_to_avoid_conflict.patch +++ b/patches/node/build_change_crdtp_protocoltypetraits_signatures_to_avoid_conflict.patch @@ -14,7 +14,7 @@ error: duplicate symbol: crdtp::ProtocolTypeTraits -Date: Wed, 4 Sep 2024 16:39:23 +0200 -Subject: build: compile with C++20 support - -Refs https://github.com/nodejs/node/pull/45427 - -V8 requires C++20 support as of https://chromium-review.googlesource.com/c/v8/v8/+/5587859. - -This can be removed when Electron upgrades to a version of Node.js containing the required V8 version. - -diff --git a/common.gypi b/common.gypi -index c28d6f5fe2c922f0b1e3f7e56289c78e7b91c294..95c56305926fc3e0e46e4cf99ec86d3d1b5576a7 100644 ---- a/common.gypi -+++ b/common.gypi -@@ -539,7 +539,7 @@ - '-fno-rtti', - '-fno-exceptions', - '-fno-strict-aliasing', -- '-std=gnu++17', -+ '-std=gnu++20', - ], - 'defines': [ '__STDC_FORMAT_MACROS' ], - 'ldflags': [ '-rdynamic' ], -@@ -719,7 +719,7 @@ - ['clang==1', { - 'xcode_settings': { - 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', -- 'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++17', # -std=gnu++17 -+ 'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++20', # -std=gnu++20 - 'CLANG_CXX_LIBRARY': 'libc++', - }, - }], diff --git a/patches/node/build_enable_perfetto.patch b/patches/node/build_enable_perfetto.patch index 5f481d544c..34af611eae 100644 --- a/patches/node/build_enable_perfetto.patch +++ b/patches/node/build_enable_perfetto.patch @@ -33,10 +33,10 @@ index 8d7204f6cb48f783adc4d1c1eb2de0c83b7fffe2..a154559a56bf383d3c26af523c9bb07b // Non-alphabetic chars. diff --git a/lib/internal/http.js b/lib/internal/http.js -index 251f51ec454f9cba4023b8b6729241ee753aac13..1de8cac6e3953ce9cab9db03530da327199acfd5 100644 +index 9bf929f7f3360f13058d3f446c18a36cd15bea58..abf9a06d891488288bccd98c437746c1ce48bf83 100644 --- a/lib/internal/http.js +++ b/lib/internal/http.js -@@ -8,8 +8,8 @@ const { +@@ -11,8 +11,8 @@ const { const { setUnrefTimeout } = require('internal/timers'); const { getCategoryEnabledBuffer, trace } = internalBinding('trace_events'); const { @@ -46,8 +46,8 @@ index 251f51ec454f9cba4023b8b6729241ee753aac13..1de8cac6e3953ce9cab9db03530da327 + CHAR_UPPERCASE_E, } = require('internal/constants'); - let utcCache; -@@ -44,11 +44,13 @@ function isTraceHTTPEnabled() { + const { URL } = require('internal/url'); +@@ -51,11 +51,13 @@ function isTraceHTTPEnabled() { const traceEventCategory = 'node,node.http'; function traceBegin(...args) { @@ -62,12 +62,12 @@ index 251f51ec454f9cba4023b8b6729241ee753aac13..1de8cac6e3953ce9cab9db03530da327 + trace(CHAR_UPPERCASE_E, traceEventCategory, ...args); } - module.exports = { + function ipToInt(ip) { diff --git a/node.gyp b/node.gyp -index 0e0071b508f605bb9b7722f8304814dc176d907e..bcb9f371c4e4d8c665058115dc39eaa65125d679 100644 +index 420d57135f48df59b2cbd33497ef90b6148017e6..eefb1e0577b881da7a1570fd7ac465fe8b06747c 100644 --- a/node.gyp +++ b/node.gyp -@@ -174,7 +174,6 @@ +@@ -176,7 +176,6 @@ 'src/timers.cc', 'src/timer_wrap.cc', 'src/tracing/agent.cc', @@ -75,7 +75,7 @@ index 0e0071b508f605bb9b7722f8304814dc176d907e..bcb9f371c4e4d8c665058115dc39eaa6 'src/tracing/node_trace_writer.cc', 'src/tracing/trace_event.cc', 'src/tracing/traced_value.cc', -@@ -302,7 +301,6 @@ +@@ -308,7 +307,6 @@ 'src/tcp_wrap.h', 'src/timers.h', 'src/tracing/agent.h', diff --git a/patches/node/build_ensure_native_module_compilation_fails_if_not_using_a_new.patch b/patches/node/build_ensure_native_module_compilation_fails_if_not_using_a_new.patch index 6c6d33c027..f0ca785e28 100644 --- a/patches/node/build_ensure_native_module_compilation_fails_if_not_using_a_new.patch +++ b/patches/node/build_ensure_native_module_compilation_fails_if_not_using_a_new.patch @@ -7,7 +7,7 @@ Subject: build: ensure native module compilation fails if not using a new This should not be upstreamed, it is a quality-of-life patch for downstream module builders. diff --git a/common.gypi b/common.gypi -index 6b79de07be3f839af5b0644f19bfef9c33de590e..c28d6f5fe2c922f0b1e3f7e56289c78e7b91c294 100644 +index 29a912f58e7b522ae21fddac510946cbcbaaa4cc..aea3a882c338eb757bef9e85fabab3fc7e7495f7 100644 --- a/common.gypi +++ b/common.gypi @@ -89,6 +89,8 @@ @@ -42,10 +42,10 @@ index 6b79de07be3f839af5b0644f19bfef9c33de590e..c28d6f5fe2c922f0b1e3f7e56289c78e # list in v8/BUILD.gn. ['v8_enable_v8_checks == 1', { diff --git a/configure.py b/configure.py -index e8eaff30ec947677db2d45425f9180759d0c55de..dc2d9d80059e845b33444f8bdc29e82d0fe0e26b 100755 +index 96eedd5d9ae05ee6704724290973251059d5dd78..52060f9c6dc1bcec67a0fd4710e01e73a6cf276c 100755 --- a/configure.py +++ b/configure.py -@@ -1710,6 +1710,7 @@ def configure_library(lib, output, pkgname=None): +@@ -1711,6 +1711,7 @@ def configure_library(lib, output, pkgname=None): def configure_v8(o, configs): set_configuration_variable(configs, 'v8_enable_v8_checks', release=1, debug=0) @@ -54,7 +54,7 @@ index e8eaff30ec947677db2d45425f9180759d0c55de..dc2d9d80059e845b33444f8bdc29e82d o['variables']['v8_enable_javascript_promise_hooks'] = 1 o['variables']['v8_enable_lite_mode'] = 1 if options.v8_lite_mode else 0 diff --git a/src/node.h b/src/node.h -index a336f44dc1e785ea237865077216d41ab032c0af..96c599aa6448e2aa8e57e84f811564a5281c139a 100644 +index c5ade4bd30456cde33379c6202b65709650d3ec0..f7b3f90b0c2cfbeacc5bc50112dd711df8d3c364 100644 --- a/src/node.h +++ b/src/node.h @@ -22,6 +22,12 @@ diff --git a/patches/node/build_modify_js2c_py_to_allow_injection_of_original-fs_and_custom_embedder_js.patch b/patches/node/build_modify_js2c_py_to_allow_injection_of_original-fs_and_custom_embedder_js.patch index 27bb1db444..57afd30f2c 100644 --- a/patches/node/build_modify_js2c_py_to_allow_injection_of_original-fs_and_custom_embedder_js.patch +++ b/patches/node/build_modify_js2c_py_to_allow_injection_of_original-fs_and_custom_embedder_js.patch @@ -10,7 +10,7 @@ JS errors and ensures embedder JS is loaded via LoadEmbedderJavaScriptSource. That method is generated by our modifications to js2c.cc in the BUILD.gn patch diff --git a/lib/internal/fs/watchers.js b/lib/internal/fs/watchers.js -index 0244a214b187e67e0cb89f26cd019855963ec93a..b65a3be6bcb0e28f7f43367d0fa9da533db9d0d1 100644 +index 605dee28cace56f2366fec9d7f18894559044ae4..15dcabb3b1682438eb6d5a681363b7ea8602b9e7 100644 --- a/lib/internal/fs/watchers.js +++ b/lib/internal/fs/watchers.js @@ -299,12 +299,13 @@ function emitCloseNT(self) { @@ -34,10 +34,10 @@ index 0244a214b187e67e0cb89f26cd019855963ec93a..b65a3be6bcb0e28f7f43367d0fa9da53 let kResistStopPropagation; diff --git a/src/node_builtins.cc b/src/node_builtins.cc -index c54df6fee333ddfe59b9df7e0ddd2935b4dcb33f..4b288e0f89e0156cb5b0555c0259b2c1150770db 100644 +index e43e2559aaf48add88aad342b1c96fd34f26c87f..e69eb280050cae0c0f394b2f956eef947e628904 100644 --- a/src/node_builtins.cc +++ b/src/node_builtins.cc -@@ -35,6 +35,7 @@ using v8::Value; +@@ -39,6 +39,7 @@ using v8::Value; BuiltinLoader::BuiltinLoader() : config_(GetConfig()), code_cache_(std::make_shared()) { LoadJavaScriptSource(); @@ -46,10 +46,10 @@ index c54df6fee333ddfe59b9df7e0ddd2935b4dcb33f..4b288e0f89e0156cb5b0555c0259b2c1 AddExternalizedBuiltin( "internal/deps/cjs-module-lexer/lexer", diff --git a/src/node_builtins.h b/src/node_builtins.h -index 302030f610965f07dd6998d282275c1bdf738009..35cb7766eeccc62dd2f0ce9484a2f1ec7beccc05 100644 +index bcdd50f635757f41287c87df1db9cd3b55c4b6b9..e908f3c0e314b90ff7b6c599940ea8f4e657c709 100644 --- a/src/node_builtins.h +++ b/src/node_builtins.h -@@ -138,6 +138,7 @@ class NODE_EXTERN_PRIVATE BuiltinLoader { +@@ -141,6 +141,7 @@ class NODE_EXTERN_PRIVATE BuiltinLoader { // Generated by tools/js2c.cc as node_javascript.cc void LoadJavaScriptSource(); // Loads data into source_ diff --git a/patches/node/build_restore_clang_as_default_compiler_on_macos.patch b/patches/node/build_restore_clang_as_default_compiler_on_macos.patch index 085cae86bc..a1f987b2b7 100644 --- a/patches/node/build_restore_clang_as_default_compiler_on_macos.patch +++ b/patches/node/build_restore_clang_as_default_compiler_on_macos.patch @@ -11,7 +11,7 @@ node-gyp will use the result of `process.config` that reflects the environment in which the binary got built. diff --git a/common.gypi b/common.gypi -index 95c56305926fc3e0e46e4cf99ec86d3d1b5576a7..45bb2c4ff94ceac377c9117da4497cdc5ac41171 100644 +index aea3a882c338eb757bef9e85fabab3fc7e7495f7..9303217fb05190c734e410a524a6921723d665d5 100644 --- a/common.gypi +++ b/common.gypi @@ -128,6 +128,7 @@ diff --git a/patches/node/chore_add_createexternalizabletwobytestring_to_globals.patch b/patches/node/chore_add_createexternalizabletwobytestring_to_globals.patch deleted file mode 100644 index d9578359a4..0000000000 --- a/patches/node/chore_add_createexternalizabletwobytestring_to_globals.patch +++ /dev/null @@ -1,21 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: John Kleinschmidt -Date: Fri, 28 Feb 2025 11:24:53 -0500 -Subject: chore: add createExternalizableTwoByteString to globals - -https://chromium-review.googlesource.com/c/v8/v8/+/6304942 added -createExternalizableTwoByteString, so make sure it is handled -as a global in the parallel/test-fs-write test. - -diff --git a/test/parallel/test-fs-write.js b/test/parallel/test-fs-write.js -index 82f3425de2aa162aa97047098806a08d0f8be4bd..31ab5b833db94fec6f2e976f53f650bc6318e794 100644 ---- a/test/parallel/test-fs-write.js -+++ b/test/parallel/test-fs-write.js -@@ -48,6 +48,7 @@ assert.notStrictEqual(isOneByteString, undefined); - // Account for extra globals exposed by --expose_externalize_string. - common.allowGlobals( - createExternalizableString, -+ createExternalizableTwoByteString, - externalizeString, - isOneByteString, - globalThis.x, diff --git a/patches/node/chore_add_missing_include_of_iterator.patch b/patches/node/chore_add_missing_include_of_iterator.patch deleted file mode 100644 index c04928baba..0000000000 --- a/patches/node/chore_add_missing_include_of_iterator.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: David Sanders -Date: Mon, 21 Jul 2025 16:58:56 -0700 -Subject: chore: add missing include of - -This has been upstreamed at https://github.com/ada-url/ada/pull/982 - -diff --git a/deps/ada/ada.cpp b/deps/ada/ada.cpp -index d7f9b3a92c5330dad1cbd9f6f0bdd96908a4ad13..68fe0701bced5db86834ebd8232d4fe5ae7ed308 100644 ---- a/deps/ada/ada.cpp -+++ b/deps/ada/ada.cpp -@@ -11217,6 +11217,7 @@ ada_warn_unused std::string to_string(ada::state state) { - - #include - #include -+#include - #include - - namespace ada { -@@ -13067,6 +13068,7 @@ template url_aggregator parse_url( - /* end file src/parser.cpp */ - /* begin file src/url_components.cpp */ - -+#include - #include - #include - -@@ -13192,6 +13194,7 @@ namespace ada { - /* end file src/url_components.cpp */ - /* begin file src/url_aggregator.cpp */ - -+#include - #include - #include - diff --git a/patches/node/chore_allow_the_node_entrypoint_to_be_a_builtin_module.patch b/patches/node/chore_allow_the_node_entrypoint_to_be_a_builtin_module.patch index ca0d26b834..2c56c247ed 100644 --- a/patches/node/chore_allow_the_node_entrypoint_to_be_a_builtin_module.patch +++ b/patches/node/chore_allow_the_node_entrypoint_to_be_a_builtin_module.patch @@ -8,10 +8,10 @@ they use themselves as the entry point. We should try to upstream some form of this. diff --git a/lib/internal/process/pre_execution.js b/lib/internal/process/pre_execution.js -index 98ed40e3076f6628b1771dade63ac51600e8e447..1eba13caf1e00a8b41b2cf8afc4168c8f98be69f 100644 +index c7f86098bdb00b6be84d547a0ac41919fa1bbb0f..35b43990c8f24f0888f89173f5662050a11b26ed 100644 --- a/lib/internal/process/pre_execution.js +++ b/lib/internal/process/pre_execution.js -@@ -245,12 +245,14 @@ function patchProcessObject(expandArgv1) { +@@ -243,12 +243,14 @@ function patchProcessObject(expandArgv1) { // the entry point. if (expandArgv1 && process.argv[1] && process.argv[1][0] !== '-') { // Expand process.argv[1] into a full path. diff --git a/patches/node/chore_exclude_electron_node_folder_from_exit-time-destructors.patch b/patches/node/chore_exclude_electron_node_folder_from_exit-time-destructors.patch index 098073d58b..b044a2d5f9 100644 --- a/patches/node/chore_exclude_electron_node_folder_from_exit-time-destructors.patch +++ b/patches/node/chore_exclude_electron_node_folder_from_exit-time-destructors.patch @@ -20,7 +20,7 @@ index ab7dc27de3e304f6d912d5834da47e3b4eb25495..b6c0fd4ceee989dac55c7d54e52fef18 } } diff --git a/unofficial.gni b/unofficial.gni -index 8886f2a79ae77614789d6ae0defd4f18fc756456..a64d2e4ac475abc049fff7ea62ec76de565a747d 100644 +index 253226009faf563f6db285d4b2908f308c1f96ea..dd686d2f7c8d2f6e8d6bd13a7bf2b4b140556ba9 100644 --- a/unofficial.gni +++ b/unofficial.gni @@ -143,7 +143,10 @@ template("node_gn_build") { @@ -35,7 +35,7 @@ index 8886f2a79ae77614789d6ae0defd4f18fc756456..a64d2e4ac475abc049fff7ea62ec76de public_configs = [ ":node_external_config", "deps/googletest:googletest_config", -@@ -345,6 +348,7 @@ template("node_gn_build") { +@@ -362,6 +365,7 @@ template("node_gn_build") { "src/embedded_data.h", ] include_dirs = [ "src", "tools" ] diff --git a/patches/node/chore_expose_importmoduledynamically_and.patch b/patches/node/chore_expose_importmoduledynamically_and.patch index 072c465e11..4a0b9dff2e 100644 --- a/patches/node/chore_expose_importmoduledynamically_and.patch +++ b/patches/node/chore_expose_importmoduledynamically_and.patch @@ -11,10 +11,10 @@ its own blended handler between Node and Blink. Not upstreamable. diff --git a/lib/internal/modules/esm/utils.js b/lib/internal/modules/esm/utils.js -index 9b41db8b0714b7408f79cbd5b4c460d9bc08f239..35ecfb9bbaf2c8e7351e1c69da84c82a4a7cb049 100644 +index 4a4279459341e87784ee8efa832dc74371c4a708..88d84786e72cf8712e0b9bda16c418d4087fe549 100644 --- a/lib/internal/modules/esm/utils.js +++ b/lib/internal/modules/esm/utils.js -@@ -30,7 +30,7 @@ const { +@@ -34,7 +34,7 @@ const { ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING, ERR_INVALID_ARG_VALUE, } = require('internal/errors').codes; @@ -23,8 +23,8 @@ index 9b41db8b0714b7408f79cbd5b4c460d9bc08f239..35ecfb9bbaf2c8e7351e1c69da84c82a const { loadPreloadModules, initializeFrozenIntrinsics, -@@ -281,12 +281,13 @@ let _forceDefaultLoader = false; - * @param {boolean} [forceDefaultLoader=false] - A boolean indicating disabling custom loaders. +@@ -291,12 +291,13 @@ let _forceDefaultLoader = false; + * @param {boolean} [forceDefaultLoader] - A boolean indicating disabling custom loaders. */ function initializeESM(forceDefaultLoader = false) { + const shouldSetOnIsolate = !getEmbedderOptions().shouldNotRegisterESMLoader; @@ -40,19 +40,19 @@ index 9b41db8b0714b7408f79cbd5b4c460d9bc08f239..35ecfb9bbaf2c8e7351e1c69da84c82a /** diff --git a/src/module_wrap.cc b/src/module_wrap.cc -index c52e20d742942667f43ea3e151fc6702260b176b..cbb3e7f4df72f83cb8a1afc25a7429218792e964 100644 +index 5783728da2894270f902f47b210008df0e911bde..8fed194cbae9ce75bd0805b4df30b4de64fbbefa 100644 --- a/src/module_wrap.cc +++ b/src/module_wrap.cc -@@ -901,7 +901,7 @@ MaybeLocal ModuleWrap::ResolveModuleCallback( - return module->module_.Get(isolate); +@@ -1097,7 +1097,7 @@ Maybe ModuleWrap::ResolveModule( + return Just(module_wrap); } --static MaybeLocal ImportModuleDynamically( -+MaybeLocal ImportModuleDynamically( +-static MaybeLocal ImportModuleDynamicallyWithPhase( ++MaybeLocal ImportModuleDynamicallyWithPhase( Local context, Local host_defined_options, Local resource_name, -@@ -973,12 +973,13 @@ void ModuleWrap::SetImportModuleDynamicallyCallback( +@@ -1185,14 +1185,16 @@ void ModuleWrap::SetImportModuleDynamicallyCallback( Realm* realm = Realm::GetCurrent(args); HandleScope handle_scope(isolate); @@ -63,12 +63,16 @@ index c52e20d742942667f43ea3e151fc6702260b176b..cbb3e7f4df72f83cb8a1afc25a742921 realm->set_host_import_module_dynamically_callback(import_callback); - isolate->SetHostImportModuleDynamicallyCallback(ImportModuleDynamically); -+ if (args[1]->IsBoolean() && args[1]->BooleanValue(isolate)) +- isolate->SetHostImportModuleWithPhaseDynamicallyCallback( ++ if (args[1]->IsBoolean() && args[1]->BooleanValue(isolate)) { + isolate->SetHostImportModuleDynamicallyCallback(ImportModuleDynamically); ++ isolate->SetHostImportModuleWithPhaseDynamicallyCallback( + ImportModuleDynamicallyWithPhase); ++ } } void ModuleWrap::HostInitializeImportMetaObjectCallback( -@@ -1020,13 +1021,14 @@ void ModuleWrap::SetInitializeImportMetaObjectCallback( +@@ -1234,13 +1236,14 @@ void ModuleWrap::SetInitializeImportMetaObjectCallback( Realm* realm = Realm::GetCurrent(args); Isolate* isolate = realm->isolate(); @@ -87,7 +91,7 @@ index c52e20d742942667f43ea3e151fc6702260b176b..cbb3e7f4df72f83cb8a1afc25a742921 MaybeLocal ModuleWrap::SyntheticModuleEvaluationStepsCallback( diff --git a/src/module_wrap.h b/src/module_wrap.h -index 9363ce73e51cde3d3a94f9912f072d532d0f8560..c0e972ed293157726efc5fa76dfa62d3da51c22a 100644 +index 03cf8d0e91d795aad6db9b11956d296ff4999f7e..45264c2ad58e37a73fd62addac7fb671eed6d502 100644 --- a/src/module_wrap.h +++ b/src/module_wrap.h @@ -8,6 +8,7 @@ @@ -98,23 +102,24 @@ index 9363ce73e51cde3d3a94f9912f072d532d0f8560..c0e972ed293157726efc5fa76dfa62d3 #include "v8-script.h" namespace node { -@@ -33,7 +34,14 @@ enum HostDefinedOptions : int { - kLength = 9, +@@ -92,7 +93,15 @@ struct ModuleCacheKey : public MemoryRetainer { + hash(hash) {} }; -class ModuleWrap : public BaseObject { -+NODE_EXTERN v8::MaybeLocal ImportModuleDynamically( ++NODE_EXTERN v8::MaybeLocal ImportModuleDynamicallyWithPhase( + v8::Local context, + v8::Local host_defined_options, + v8::Local resource_name, + v8::Local specifier, -+ v8::Local import_assertions); ++ v8::ModuleImportPhase phase, ++ v8::Local import_attributes); + +class NODE_EXTERN ModuleWrap : public BaseObject { - public: - enum InternalFields { - kModuleSlot = BaseObject::kInternalFieldCount, -@@ -92,6 +100,8 @@ class ModuleWrap : public BaseObject { + using ResolveCache = + std::unordered_map; + +@@ -157,6 +166,8 @@ class ModuleWrap : public BaseObject { static void CreateRequiredModuleFacade( const v8::FunctionCallbackInfo& args); @@ -123,11 +128,11 @@ index 9363ce73e51cde3d3a94f9912f072d532d0f8560..c0e972ed293157726efc5fa76dfa62d3 private: ModuleWrap(Realm* realm, v8::Local object, -@@ -131,7 +141,6 @@ class ModuleWrap : public BaseObject { +@@ -205,7 +216,6 @@ class ModuleWrap : public BaseObject { v8::Local specifier, v8::Local import_attributes, v8::Local referrer); - static ModuleWrap* GetFromModule(node::Environment*, v8::Local); - v8::Global module_; - std::unordered_map> resolve_cache_; + // This method may throw a JavaScript exception, so the return type is + // wrapped in a Maybe. diff --git a/patches/node/chore_handle_support_for_import_defer_as_ns_and_import_defer.patch b/patches/node/chore_handle_support_for_import_defer_as_ns_and_import_defer.patch new file mode 100644 index 0000000000..dffa0560f0 --- /dev/null +++ b/patches/node/chore_handle_support_for_import_defer_as_ns_and_import_defer.patch @@ -0,0 +1,48 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Shelley Vohr +Date: Wed, 29 Oct 2025 11:45:23 +0000 +Subject: chore: handle support for `import defer * as ns` and `import.defer` + syntax + +V8 added support for the above syntax https://chromium-review.googlesource.com/c/v8/v8/+/7017517 +by adding a new `ModuleImportPhase::kDefer` phase. + +This patch can be removed when Electron updates to a version of Node.js containing +the above CL. + +diff --git a/src/module_wrap.cc b/src/module_wrap.cc +index a584e3a80adb69d2028dc79450349823ab973a58..6f010fa2e014b2d13b1f89a691d09e2ffdf690b6 100644 +--- a/src/module_wrap.cc ++++ b/src/module_wrap.cc +@@ -563,8 +563,10 @@ ModulePhase to_phase_constant(ModuleImportPhase phase) { + return kEvaluationPhase; + case ModuleImportPhase::kSource: + return kSourcePhase; ++ case ModuleImportPhase::kDefer: ++ default: ++ UNREACHABLE(); + } +- UNREACHABLE(); + } + + static Local createImportAttributesContainer( +@@ -1471,6 +1473,7 @@ void ModuleWrap::CreatePerContextProperties(Local target, + + V(ModulePhase, kEvaluationPhase); + V(ModulePhase, kSourcePhase); ++ V(ModulePhase, kDeferPhase); + #undef V + } + +diff --git a/src/module_wrap.h b/src/module_wrap.h +index 45264c2ad58e37a73fd62addac7fb671eed6d502..fb32fbc5c1cfa4aef4a7822dbc6195429299da3e 100644 +--- a/src/module_wrap.h ++++ b/src/module_wrap.h +@@ -37,6 +37,7 @@ enum HostDefinedOptions : int { + enum ModulePhase : int { + kSourcePhase = 1, + kEvaluationPhase = 2, ++ kDeferPhase = 3, + }; + + /** diff --git a/patches/node/cli_move_--trace-atomics-wait_to_eol.patch b/patches/node/cli_move_--trace-atomics-wait_to_eol.patch deleted file mode 100644 index 886a61ae99..0000000000 --- a/patches/node/cli_move_--trace-atomics-wait_to_eol.patch +++ /dev/null @@ -1,305 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Marco Ippolito -Date: Wed, 1 May 2024 14:24:48 +0200 -Subject: cli: move --trace-atomics-wait to eol -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -PR-URL: https://github.com/nodejs/node/pull/52747 -Fixes: https://github.com/nodejs/node/issues/42982 -Reviewed-By: Matteo Collina -Reviewed-By: Rafael Gonzaga -Reviewed-By: Michaël Zasso -Reviewed-By: Benjamin Gruenbaum -Reviewed-By: Yagiz Nizipli - -diff --git a/doc/api/cli.md b/doc/api/cli.md -index 9a0e83b95a72486ab9751b3b8818f4beeb527041..1da7126b9d51238e9b89ee6bed602df3f5598a9e 100644 ---- a/doc/api/cli.md -+++ b/doc/api/cli.md -@@ -2727,39 +2727,6 @@ added: v12.0.0 - Set default [`tls.DEFAULT_MIN_VERSION`][] to 'TLSv1.3'. Use to disable support - for TLSv1.2, which is not as secure as TLSv1.3. - --### `--trace-atomics-wait` -- -- -- --> Stability: 0 - Deprecated -- --Print short summaries of calls to [`Atomics.wait()`][] to stderr. --The output could look like this: -- --```text --(node:15701) [Thread 0] Atomics.wait(<address> + 0, 1, inf) started --(node:15701) [Thread 0] Atomics.wait(<address> + 0, 1, inf) did not wait because the values mismatched --(node:15701) [Thread 0] Atomics.wait(<address> + 0, 0, 10) started --(node:15701) [Thread 0] Atomics.wait(<address> + 0, 0, 10) timed out --(node:15701) [Thread 0] Atomics.wait(<address> + 4, 0, inf) started --(node:15701) [Thread 1] Atomics.wait(<address> + 4, -1, inf) started --(node:15701) [Thread 0] Atomics.wait(<address> + 4, 0, inf) was woken up by another thread --(node:15701) [Thread 1] Atomics.wait(<address> + 4, -1, inf) was woken up by another thread --``` -- --The fields here correspond to: -- --* The thread id as given by [`worker_threads.threadId`][] --* The base address of the `SharedArrayBuffer` in question, as well as the -- byte offset corresponding to the index passed to `Atomics.wait()` --* The expected value that was passed to `Atomics.wait()` --* The timeout passed to `Atomics.wait` -- - ### `--trace-deprecation` - - ++ ++Disable exposition of Fetch API on the global scope. ++ + ### `--no-experimental-global-navigator` + +