Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 04 Jun 2026 22:24:58 +0000
From:      Hiroki Tagato <tagattie@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: eb44fd6267a8 - main - editors/vscode: Update to 1.123
Message-ID:  <6a21fb3a.436e1.41fc1c1@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by tagattie:

URL: https://cgit.FreeBSD.org/ports/commit/?id=eb44fd6267a889968b0dd79bd2ddf549fff3784d

commit eb44fd6267a889968b0dd79bd2ddf549fff3784d
Author:     Hiroki Tagato <tagattie@FreeBSD.org>
AuthorDate: 2026-06-04 22:21:16 +0000
Commit:     Hiroki Tagato <tagattie@FreeBSD.org>
CommitDate: 2026-06-04 22:24:48 +0000

    editors/vscode: Update to 1.123
    
    While here:
    - remove upstreamed patches for @vscode/deviceid module
    - apply patches to address incompatibility between nan module and
      electron42 [1]
    
    Changelog: https://code.visualstudio.com/updates/v1_123
    
    Reported by:    GitHub (watch releases)
    Obtained from:  https://github.com/nodejs/nan/pull/1015 [1]
---
 editors/vscode/Makefile                            |  11 +-
 editors/vscode/Makefile.crates                     |   6 +-
 editors/vscode/Makefile.reh                        |   6 +-
 editors/vscode/Makefile.version                    |   4 +-
 editors/vscode/distinfo                            |  26 +-
 editors/vscode/files/patch-build_gulpfile.reh.ts   |   6 +-
 editors/vscode/files/patch-build_lib_electron.ts   |   4 +-
 ...node__modules__at_vscode_deviceid_dist_index.js |  15 -
 ...de__modules__at_vscode_deviceid_dist_storage.js |  18 --
 ...tch-node__modules_nan_nan__callbacks__12__inl.h | 332 +++++++++++++++++++++
 ...ode__modules_nan_nan__callbacks__pre__12__inl.h |  13 +
 ...ode__modules_nan_nan__implementation__12__inl.h |  52 ++++
 ...node__modules__at_vscode_deviceid_dist_index.js |  15 -
 ...de__modules__at_vscode_deviceid_dist_storage.js |  18 --
 ...ote_node__modules_nan_nan__callbacks__12__inl.h | 332 +++++++++++++++++++++
 ...ode__modules_nan_nan__callbacks__pre__12__inl.h |  13 +
 ...ode__modules_nan_nan__implementation__12__inl.h |  52 ++++
 editors/vscode/files/patch-src_main.ts             |   6 +-
 ..._services_actions_common_menusExtensionPoint.ts |   4 +-
 editors/vscode/pkg-plist                           | 193 +++++-------
 20 files changed, 917 insertions(+), 209 deletions(-)

diff --git a/editors/vscode/Makefile b/editors/vscode/Makefile
index f105c5031d6b..cbfceecb811e 100644
--- a/editors/vscode/Makefile
+++ b/editors/vscode/Makefile
@@ -59,9 +59,9 @@ RUN_DEPENDS=	xdg-open:devel/xdg-utils \
 		bash:shells/bash
 TEST_DEPENDS=	bash:shells/bash
 
-USES=		cargo desktop-file-utils display:test electron:39,build,test \
+USES=		cargo desktop-file-utils display:test electron:42,build,test \
 		gl gmake gnome gssapi:mit iconv:wchar_t jpeg localbase:ldflags \
-		nodejs:22,build pkgconfig python:build shebangfix xorg
+		nodejs:24,build pkgconfig python:build shebangfix xorg
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	microsoft
@@ -80,8 +80,11 @@ CARGO_BUILD=	no
 CARGO_INSTALL=	no
 CARGO_TEST=	no
 
+CFLAGS+=	-Wno-error=implicit-function-declaration
+
 BINARY_ALIAS=	python=${PYTHON_CMD}
 
+USE_CXXSTD=	c++20
 USE_XORG=	x11 xcb xcomposite xcursor xdamage xext xfixes xi xkbfile \
 		xrandr xrender xscrnsaver xtst
 USE_GL=		gbm gl glesv2
@@ -135,6 +138,8 @@ post-extract:
 post-patch:
 	@${REINPLACE_CMD} -E 's|^(target=").*(")$$|\1${ELECTRON_VER}\2|' \
 		${WRKSRC}/.npmrc
+	@${REINPLACE_CMD} -E "/const electronVersion/s/'[0-9]+\.[0-9]+\.[0-9]+'/'${ELECTRON_VER}'/" \
+		${WRKSRC}/build/lib/electron.ts
 	@${REINPLACE_CMD} -E 's|^(target=").*(")$$|\1${NODEJS_PORTVERSION}\2|' \
 		${WRKSRC}/remote/.npmrc
 	@${REINPLACE_CMD} -e 's/%%DISTVERSION%%/${DISTVERSION}/g' \
@@ -351,7 +356,7 @@ build-remote-extension-host: configure pre-build
 ### targets for port maintainer(s)
 patch-package-json: extract
 # add node module for signature verification of extensions from Open VSX Registry
-	@${PATCH} -s -p0 -d ${WRKSRC} < ${FILESDIR}/patch-package.json
+	@${PATCH} -s -p0 -d ${WRKSRC} < ${PATCHDIR}/patch-package.json
 
 make-node-modules-archive: extract patch-package-json
 	@${ECHO_MSG} "===>  Fetching and installing node modules in ${WRKSRC}"
diff --git a/editors/vscode/Makefile.crates b/editors/vscode/Makefile.crates
index ed2bf6af18f9..fda74f8d619b 100644
--- a/editors/vscode/Makefile.crates
+++ b/editors/vscode/Makefile.crates
@@ -37,7 +37,7 @@ CARGO_CRATES=	Inflector-0.11.4 \
 		bit-set-0.8.0 \
 		bit-vec-0.8.0 \
 		bitflags-1.3.2 \
-		bitflags-2.11.1 \
+		bitflags-2.12.1 \
 		bitflags-2.9.1 \
 		bitvec-1.0.1 \
 		blake3-1.5.5 \
@@ -298,7 +298,7 @@ CARGO_CRATES=	Inflector-0.11.4 \
 		litemap-0.8.1 \
 		lock_api-0.4.14 \
 		log-0.4.22 \
-		log-0.4.30 \
+		log-0.4.32 \
 		loom-0.7.2 \
 		lru-0.16.2 \
 		mach2-0.4.2 \
@@ -640,7 +640,7 @@ CARGO_CRATES=	Inflector-0.11.4 \
 		unicode-ident-1.0.24 \
 		unicode-linebreak-0.1.5 \
 		unicode-segmentation-1.12.0 \
-		unicode-segmentation-1.13.2 \
+		unicode-segmentation-1.13.3 \
 		unicode-width-0.1.14 \
 		unicode-width-0.2.2 \
 		unicode-xid-0.2.6 \
diff --git a/editors/vscode/Makefile.reh b/editors/vscode/Makefile.reh
index 7986bb8cda95..0dcb192d8c1f 100644
--- a/editors/vscode/Makefile.reh
+++ b/editors/vscode/Makefile.reh
@@ -34,7 +34,7 @@ LIB_DEPENDS=	libbrotlidec.so:archivers/brotli \
 		libsecret-1.so:security/libsecret
 
 USES=		cargo electron:env gssapi:mit localbase:ldflags \
-		nodejs:22,build pkgconfig python:build shebangfix
+		nodejs:24,build pkgconfig python:build shebangfix
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	microsoft
@@ -49,10 +49,14 @@ CARGO_CARGOTOML_RSPACK=		${WRKSRC}/rspack/Cargo.toml
 CARGO_CARGOLOCK_RSPACK=		${WRKSRC}/rspack/Cargo.lock
 CARGO_CARGOTOML=		${CARGO_CARGOTOML_CLIPBOARD}
 CARGO_CARGOLOCK=		${CARGO_CARGOLOCK_CLIPBOARD}
+CARGO_BUILDDEP=	any-version
 CARGO_BUILD=	no
 CARGO_INSTALL=	no
 CARGO_TEST=	no
 
+CFLAGS+=	-Wno-error=implicit-function-declaration
+
+USE_CXXSTD=	c++20
 USE_ELECTRON=	npm:npm
 
 SHEBANG_REGEX=	./(extensions|node_modules|resources|scripts|src)/.*(\.(pl|py|sh)|makeBlacker|makeFF)$$
diff --git a/editors/vscode/Makefile.version b/editors/vscode/Makefile.version
index d546231ae6d8..1515074aeac6 100644
--- a/editors/vscode/Makefile.version
+++ b/editors/vscode/Makefile.version
@@ -1,2 +1,2 @@
-VSCODE_VERSION=		1.122.1
-SOURCE_COMMIT_HASH=	8761a5560cfd65fdd19ce7e2bd18dab5c0a4d84e
+VSCODE_VERSION=		1.123
+SOURCE_COMMIT_HASH=	6a44c352bd24569c417e530095901b649960f9f8
diff --git a/editors/vscode/distinfo b/editors/vscode/distinfo
index 44a5bc3f844f..dd4410cc68b3 100644
--- a/editors/vscode/distinfo
+++ b/editors/vscode/distinfo
@@ -1,8 +1,8 @@
-TIMESTAMP = 1780139184
-SHA256 (vscode/vscode-node-modules-1.122.1.tar.gz) = 808d60c65ae2c01ed2c5fdf7fb4917c6e106f67d519c16626c8061fbb99fe2d7
-SIZE (vscode/vscode-node-modules-1.122.1.tar.gz) = 1122690861
-SHA256 (vscode/vscode-marketplace-exts-1.122.1.tar.gz) = 01b6017ad2b9a07553a5165424b779590dee8f50bc4511ca706dbaae90fb301a
-SIZE (vscode/vscode-marketplace-exts-1.122.1.tar.gz) = 1708441
+TIMESTAMP = 1780562823
+SHA256 (vscode/vscode-node-modules-1.123.tar.gz) = 6e6c2e91a2c90e84dee1659dfc8e19dce637897d56bd47812c921dfbe37f3bc9
+SIZE (vscode/vscode-node-modules-1.123.tar.gz) = 1254186264
+SHA256 (vscode/vscode-marketplace-exts-1.123.tar.gz) = 6c1a25d188e7b130732355413a3e61627861f3a7c50db51037921c93095babaf
+SIZE (vscode/vscode-marketplace-exts-1.123.tar.gz) = 1708420
 SHA256 (vscode/rust/crates/Inflector-0.11.4.crate) = fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3
 SIZE (vscode/rust/crates/Inflector-0.11.4.crate) = 17438
 SHA256 (vscode/rust/crates/addr2line-0.24.2.crate) = dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1
@@ -81,8 +81,8 @@ SHA256 (vscode/rust/crates/bit-vec-0.8.0.crate) = 5e764a1d40d510daf35e07be9eb06e
 SIZE (vscode/rust/crates/bit-vec-0.8.0.crate) = 24132
 SHA256 (vscode/rust/crates/bitflags-1.3.2.crate) = bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a
 SIZE (vscode/rust/crates/bitflags-1.3.2.crate) = 23021
-SHA256 (vscode/rust/crates/bitflags-2.11.1.crate) = c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3
-SIZE (vscode/rust/crates/bitflags-2.11.1.crate) = 49082
+SHA256 (vscode/rust/crates/bitflags-2.12.1.crate) = 84d7ced0ae9557296835c32bf1b1e02b44c746701f898460fb000d7eaa84f00a
+SIZE (vscode/rust/crates/bitflags-2.12.1.crate) = 50766
 SHA256 (vscode/rust/crates/bitflags-2.9.1.crate) = 1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967
 SIZE (vscode/rust/crates/bitflags-2.9.1.crate) = 47913
 SHA256 (vscode/rust/crates/bitvec-1.0.1.crate) = 1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c
@@ -603,8 +603,8 @@ SHA256 (vscode/rust/crates/lock_api-0.4.14.crate) = 224399e74b87b5f3557511d98dff
 SIZE (vscode/rust/crates/lock_api-0.4.14.crate) = 29249
 SHA256 (vscode/rust/crates/log-0.4.22.crate) = a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24
 SIZE (vscode/rust/crates/log-0.4.22.crate) = 44027
-SHA256 (vscode/rust/crates/log-0.4.30.crate) = 616ec5685824bcc94416c6d4a7a446eea774a31efd7062c8480ba6fd06d7a6e5
-SIZE (vscode/rust/crates/log-0.4.30.crate) = 52400
+SHA256 (vscode/rust/crates/log-0.4.32.crate) = 953f07c43838f8e6f9758cab68bf5bed85465e7587ebe0b823f1bcd81978ad3a
+SIZE (vscode/rust/crates/log-0.4.32.crate) = 52697
 SHA256 (vscode/rust/crates/loom-0.7.2.crate) = 419e0dc8046cb947daa77eb95ae174acfbddb7673b4151f56d1eed8e93fbfaca
 SIZE (vscode/rust/crates/loom-0.7.2.crate) = 73989
 SHA256 (vscode/rust/crates/lru-0.16.2.crate) = 96051b46fc183dc9cd4a223960ef37b9af631b55191852a8274bfef064cda20f
@@ -1285,8 +1285,8 @@ SHA256 (vscode/rust/crates/unicode-linebreak-0.1.5.crate) = 3b09c83c3c29d37506a3
 SIZE (vscode/rust/crates/unicode-linebreak-0.1.5.crate) = 15324
 SHA256 (vscode/rust/crates/unicode-segmentation-1.12.0.crate) = f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493
 SIZE (vscode/rust/crates/unicode-segmentation-1.12.0.crate) = 106323
-SHA256 (vscode/rust/crates/unicode-segmentation-1.13.2.crate) = 9629274872b2bfaf8d66f5f15725007f635594914870f65218920345aa11aa8c
-SIZE (vscode/rust/crates/unicode-segmentation-1.13.2.crate) = 111829
+SHA256 (vscode/rust/crates/unicode-segmentation-1.13.3.crate) = c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8
+SIZE (vscode/rust/crates/unicode-segmentation-1.13.3.crate) = 112325
 SHA256 (vscode/rust/crates/unicode-width-0.1.14.crate) = 7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af
 SIZE (vscode/rust/crates/unicode-width-0.1.14.crate) = 271615
 SHA256 (vscode/rust/crates/unicode-width-0.2.2.crate) = b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254
@@ -1577,8 +1577,8 @@ SHA256 (vscode/rust/crates/zune-jpeg-0.5.15.crate) = 27bc9d5b815bc103f142aa054f5
 SIZE (vscode/rust/crates/zune-jpeg-0.5.15.crate) = 88879
 SHA256 (vscode/mcountryman-simd-adler32-b279034d9eb554c3e5e0af523db044f08d8297ba_GH0.tar.gz) = 164ce6fb0a7d70c6713de282972e88058ae716b4a61191e63f1b005169c09f74
 SIZE (vscode/mcountryman-simd-adler32-b279034d9eb554c3e5e0af523db044f08d8297ba_GH0.tar.gz) = 18095
-SHA256 (vscode/microsoft-vscode-1.122.1_GH0.tar.gz) = d7dc639c5c10aafa41b735c48d4b9347a19afb03ef6af3277a6d6af8b711aa7e
-SIZE (vscode/microsoft-vscode-1.122.1_GH0.tar.gz) = 42706904
+SHA256 (vscode/microsoft-vscode-1.123_GH0.tar.gz) = ba80ea47164e5860869a9aaa9af9bbeb22fc5264d0ae8657f7e5f61b8c1d8693
+SIZE (vscode/microsoft-vscode-1.123_GH0.tar.gz) = 43031332
 SHA256 (vscode/Teddy-Zhu-node-clipboard-rs-v0.0.10_GH0.tar.gz) = 11eb5ef78ef1e4f6d6bb85a989eb14050b9cb94166a298a5ce4b5d10b9d8b9d6
 SIZE (vscode/Teddy-Zhu-node-clipboard-rs-v0.0.10_GH0.tar.gz) = 1166414
 SHA256 (vscode/web-infra-dev-rspack-v1.7.10_GH0.tar.gz) = 8e9694ca114e58efd038db41c1d6176e5d353da4a6b31f23fd8f3fc683a643ec
diff --git a/editors/vscode/files/patch-build_gulpfile.reh.ts b/editors/vscode/files/patch-build_gulpfile.reh.ts
index caeb2a84bab6..7d8f78f6653c 100644
--- a/editors/vscode/files/patch-build_gulpfile.reh.ts
+++ b/editors/vscode/files/patch-build_gulpfile.reh.ts
@@ -1,4 +1,4 @@
---- build/gulpfile.reh.ts.orig	2026-05-29 07:25:37 UTC
+--- build/gulpfile.reh.ts.orig	2026-06-03 09:29:03 UTC
 +++ build/gulpfile.reh.ts
 @@ -22,7 +22,7 @@ import rceditCallback from 'rcedit';
  import glob from 'glob';
@@ -9,7 +9,7 @@
  import { cleanExtensionsBuildTask, compileNonNativeExtensionsBuildTask, compileNativeExtensionsBuildTask, compileExtensionMediaBuildTask, compileCopilotExtensionBuildTask } from './gulpfile.extensions.ts';
  import { vscodeWebResourceIncludes, createVSCodeWebFileContentMapper } from './gulpfile.vscode.web.ts';
  import * as cp from 'child_process';
-@@ -321,7 +321,7 @@ function packageTask(type: string, platform: string, a
+@@ -362,7 +362,7 @@ function packageTask(type: string, platform: string, a
  
  		let productJsonContents = '';
  		const productJsonStream = gulp.src(['product.json'], { base: '.' })
@@ -18,7 +18,7 @@
  			.pipe(es.through(function (file) {
  				productJsonContents = file.contents.toString();
  				this.emit('data', file);
-@@ -564,7 +564,7 @@ function tweakProductForServerWeb(product: typeof impo
+@@ -605,7 +605,7 @@ function tweakProductForServerWeb(product: typeof impo
  			task.task(serverTaskCI);
  
  			const serverTask = task.define(`vscode-${type}${dashed(platform)}${dashed(arch)}${dashed(minified)}`, task.series(
diff --git a/editors/vscode/files/patch-build_lib_electron.ts b/editors/vscode/files/patch-build_lib_electron.ts
index dbc1e2670b64..61c7942f3afa 100644
--- a/editors/vscode/files/patch-build_lib_electron.ts
+++ b/editors/vscode/files/patch-build_lib_electron.ts
@@ -1,6 +1,6 @@
---- build/lib/electron.ts.orig	2026-05-29 07:25:37 UTC
+--- build/lib/electron.ts.orig	2026-06-03 09:29:03 UTC
 +++ build/lib/electron.ts
-@@ -203,10 +203,11 @@ export const config = {
+@@ -204,10 +204,11 @@ export const config = {
  	winIcon: 'resources/win32/code.ico',
  	token: process.env['GITHUB_TOKEN'],
  	repo: product.electronRepository || undefined,
diff --git a/editors/vscode/files/patch-node__modules__at_vscode_deviceid_dist_index.js b/editors/vscode/files/patch-node__modules__at_vscode_deviceid_dist_index.js
deleted file mode 100644
index ff8ea52e2aa3..000000000000
--- a/editors/vscode/files/patch-node__modules__at_vscode_deviceid_dist_index.js
+++ /dev/null
@@ -1,15 +0,0 @@
---- node_modules/@vscode/deviceid/dist/index.js.orig	2025-06-19 08:48:56 UTC
-+++ node_modules/@vscode/deviceid/dist/index.js
-@@ -20,8 +20,9 @@ if (process.platform !== "win32" &&
- Object.defineProperty(exports, "__esModule", { value: true });
- if (process.platform !== "win32" &&
-     process.platform !== "darwin" &&
--    process.platform !== "linux") {
-+    process.platform !== "linux" &&
-+    process.platform !== "freebsd") {
-     throw new Error("Unsupported platform");
- }
- __exportStar(require("./devdeviceid.js"), exports);
--//# sourceMappingURL=index.js.map
-\ No newline at end of file
-+//# sourceMappingURL=index.js.map
diff --git a/editors/vscode/files/patch-node__modules__at_vscode_deviceid_dist_storage.js b/editors/vscode/files/patch-node__modules__at_vscode_deviceid_dist_storage.js
deleted file mode 100644
index c95a044b342a..000000000000
--- a/editors/vscode/files/patch-node__modules__at_vscode_deviceid_dist_storage.js
+++ /dev/null
@@ -1,18 +0,0 @@
---- node_modules/@vscode/deviceid/dist/storage.js.orig	2026-02-09 08:26:27 UTC
-+++ node_modules/@vscode/deviceid/dist/storage.js
-@@ -42,7 +42,7 @@ function getDirectory() {
-     if (process.platform === "darwin") {
-         folder = path.join(process.env.HOME, "Library", "Application Support");
-     }
--    else if (process.platform === "linux") {
-+    else if (process.platform === "linux" || process.platform === "freebsd") {
-         folder =
-             process.env.XDG_CACHE_HOME ?? path.join(process.env.HOME, ".cache");
-     }
-@@ -87,4 +87,4 @@ exports.setDeviceId = setDeviceId;
-     }
- }
- exports.setDeviceId = setDeviceId;
--//# sourceMappingURL=storage.js.map
-\ No newline at end of file
-+//# sourceMappingURL=storage.js.map
diff --git a/editors/vscode/files/patch-node__modules_nan_nan__callbacks__12__inl.h b/editors/vscode/files/patch-node__modules_nan_nan__callbacks__12__inl.h
new file mode 100644
index 000000000000..ea0851e44b0b
--- /dev/null
+++ b/editors/vscode/files/patch-node__modules_nan_nan__callbacks__12__inl.h
@@ -0,0 +1,332 @@
+--- node_modules/nan/nan_callbacks_12_inl.h.orig	2026-06-04 08:39:31 UTC
++++ node_modules/nan/nan_callbacks_12_inl.h
+@@ -178,14 +178,27 @@ class PropertyCallbackInfo {
+   NAN_DISALLOW_ASSIGN_COPY_MOVE(PropertyCallbackInfo)
+ };
+ 
++// Gated on V8_EXTERNAL_POINTER_TAG_COUNT (defined alongside the tagged
++// Value() API) rather than a V8_MAJOR_VERSION cutoff, since Node and
++// Chromium/Electron ship divergent V8 snapshots under the same major.
++// Tag must match the one used by imp::NewExternal.
++inline void* GetExternalValue(v8::Local<v8::External> ext) {
++#ifdef V8_EXTERNAL_POINTER_TAG_COUNT
++  return ext->Value(v8::kExternalPointerTypeTagDefault);
++#else
++  return ext->Value();
++#endif
++}
++
+ namespace imp {
++
+ static
+ void FunctionCallbackWrapper(const v8::FunctionCallbackInfo<v8::Value> &info) {
+   v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
+   FunctionCallback callback = reinterpret_cast<FunctionCallback>(
+       reinterpret_cast<intptr_t>(
+-          obj->GetInternalField(kFunctionIndex)
+-          .As<v8::Value>().As<v8::External>()->Value()));
++          Nan::GetExternalValue(obj->GetInternalField(kFunctionIndex)
++          .As<v8::Value>().As<v8::External>())));
+   FunctionCallbackInfo<v8::Value>
+       cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
+   callback(cbinfo);
+@@ -203,8 +216,8 @@ void GetterCallbackWrapper(
+       cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
+   GetterCallback callback = reinterpret_cast<GetterCallback>(
+       reinterpret_cast<intptr_t>(
+-          obj->GetInternalField(kGetterIndex)
+-          .As<v8::Value>().As<v8::External>()->Value()));
++          Nan::GetExternalValue(obj->GetInternalField(kGetterIndex)
++          .As<v8::Value>().As<v8::External>())));
+   callback(property.As<v8::String>(), cbinfo);
+ }
+ 
+@@ -221,8 +234,8 @@ void SetterCallbackWrapper(
+       cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
+   SetterCallback callback = reinterpret_cast<SetterCallback>(
+       reinterpret_cast<intptr_t>(
+-          obj->GetInternalField(kSetterIndex)
+-          .As<v8::Value>().As<v8::External>()->Value()));
++          Nan::GetExternalValue(obj->GetInternalField(kSetterIndex)
++          .As<v8::Value>().As<v8::External>())));
+   callback(property.As<v8::String>(), value, cbinfo);
+ }
+ 
+@@ -240,8 +253,8 @@ void GetterCallbackWrapper(
+       cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
+   GetterCallback callback = reinterpret_cast<GetterCallback>(
+       reinterpret_cast<intptr_t>(
+-          obj->GetInternalField(kGetterIndex)
+-          .As<v8::Value>().As<v8::External>()->Value()));
++          Nan::GetExternalValue(obj->GetInternalField(kGetterIndex)
++          .As<v8::Value>().As<v8::External>())));
+   callback(property, cbinfo);
+ }
+ 
+@@ -258,8 +271,8 @@ void SetterCallbackWrapper(
+       cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
+   SetterCallback callback = reinterpret_cast<SetterCallback>(
+       reinterpret_cast<intptr_t>(
+-          obj->GetInternalField(kSetterIndex)
+-          .As<v8::Value>().As<v8::External>()->Value()));
++          Nan::GetExternalValue(obj->GetInternalField(kSetterIndex)
++          .As<v8::Value>().As<v8::External>())));
+   callback(property, value, cbinfo);
+ }
+ 
+@@ -282,8 +295,8 @@ v8::Intercepted PropertyGetterCallbackWrapper(
+       cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
+   PropertyGetterCallback callback = reinterpret_cast<PropertyGetterCallback>(
+       reinterpret_cast<intptr_t>(
+-          obj->GetInternalField(kPropertyGetterIndex)
+-              .As<v8::Value>().As<v8::External>()->Value()));
++          Nan::GetExternalValue(obj->GetInternalField(kPropertyGetterIndex)
++              .As<v8::Value>().As<v8::External>())));
+   return callback(property.As<v8::String>(), cbinfo);
+ }
+ 
+@@ -300,8 +313,8 @@ v8::Intercepted PropertySetterCallbackWrapper(
+       cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
+   PropertySetterCallback callback = reinterpret_cast<PropertySetterCallback>(
+       reinterpret_cast<intptr_t>(
+-          obj->GetInternalField(kPropertySetterIndex)
+-              .As<v8::Value>().As<v8::External>()->Value()));
++          Nan::GetExternalValue(obj->GetInternalField(kPropertySetterIndex)
++              .As<v8::Value>().As<v8::External>())));
+   return callback(property.As<v8::String>(), value, cbinfo);
+ }
+ 
+@@ -320,8 +333,8 @@ void PropertyGetterCallbackWrapper(
+       cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
+   PropertyGetterCallback callback = reinterpret_cast<PropertyGetterCallback>(
+       reinterpret_cast<intptr_t>(
+-          obj->GetInternalField(kPropertyGetterIndex)
+-              .As<v8::Value>().As<v8::External>()->Value()));
++          Nan::GetExternalValue(obj->GetInternalField(kPropertyGetterIndex)
++              .As<v8::Value>().As<v8::External>())));
+   callback(property.As<v8::String>(), cbinfo);
+ }
+ 
+@@ -338,8 +351,8 @@ void PropertySetterCallbackWrapper(
+       cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
+   PropertySetterCallback callback = reinterpret_cast<PropertySetterCallback>(
+       reinterpret_cast<intptr_t>(
+-          obj->GetInternalField(kPropertySetterIndex)
+-              .As<v8::Value>().As<v8::External>()->Value()));
++          Nan::GetExternalValue(obj->GetInternalField(kPropertySetterIndex)
++              .As<v8::Value>().As<v8::External>())));
+   callback(property.As<v8::String>(), value, cbinfo);
+ }
+ 
+@@ -357,8 +370,8 @@ void PropertyEnumeratorCallbackWrapper(
+       cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
+   PropertyEnumeratorCallback callback =
+       reinterpret_cast<PropertyEnumeratorCallback>(reinterpret_cast<intptr_t>(
+-          obj->GetInternalField(kPropertyEnumeratorIndex)
+-              .As<v8::Value>().As<v8::External>()->Value()));
++          Nan::GetExternalValue(obj->GetInternalField(kPropertyEnumeratorIndex)
++              .As<v8::Value>().As<v8::External>())));
+   callback(cbinfo);
+ }
+ 
+@@ -376,8 +389,8 @@ v8::Intercepted PropertyDeleterCallbackWrapper(
+       cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
+   PropertyDeleterCallback callback = reinterpret_cast<PropertyDeleterCallback>(
+       reinterpret_cast<intptr_t>(
+-          obj->GetInternalField(kPropertyDeleterIndex)
+-              .As<v8::Value>().As<v8::External>()->Value()));
++          Nan::GetExternalValue(obj->GetInternalField(kPropertyDeleterIndex)
++              .As<v8::Value>().As<v8::External>())));
+   return callback(property.As<v8::String>(), cbinfo);
+ }
+ 
+@@ -394,8 +407,8 @@ v8::Intercepted PropertyQueryCallbackWrapper(
+       cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
+   PropertyQueryCallback callback = reinterpret_cast<PropertyQueryCallback>(
+       reinterpret_cast<intptr_t>(
+-          obj->GetInternalField(kPropertyQueryIndex)
+-              .As<v8::Value>().As<v8::External>()->Value()));
++          Nan::GetExternalValue(obj->GetInternalField(kPropertyQueryIndex)
++              .As<v8::Value>().As<v8::External>())));
+   return callback(property.As<v8::String>(), cbinfo);
+ }
+ 
+@@ -411,8 +424,8 @@ void PropertyDeleterCallbackWrapper(
+       cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
+   PropertyDeleterCallback callback = reinterpret_cast<PropertyDeleterCallback>(
+       reinterpret_cast<intptr_t>(
+-          obj->GetInternalField(kPropertyDeleterIndex)
+-              .As<v8::Value>().As<v8::External>()->Value()));
++          Nan::GetExternalValue(obj->GetInternalField(kPropertyDeleterIndex)
++              .As<v8::Value>().As<v8::External>())));
+   callback(property.As<v8::String>(), cbinfo);
+ }
+ 
+@@ -428,8 +441,8 @@ void PropertyQueryCallbackWrapper(
+       cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
+   PropertyQueryCallback callback = reinterpret_cast<PropertyQueryCallback>(
+       reinterpret_cast<intptr_t>(
+-          obj->GetInternalField(kPropertyQueryIndex)
+-              .As<v8::Value>().As<v8::External>()->Value()));
++          Nan::GetExternalValue(obj->GetInternalField(kPropertyQueryIndex)
++              .As<v8::Value>().As<v8::External>())));
+   callback(property.As<v8::String>(), cbinfo);
+ }
+ 
+@@ -446,8 +459,8 @@ void PropertyGetterCallbackWrapper(
+       cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
+   PropertyGetterCallback callback = reinterpret_cast<PropertyGetterCallback>(
+       reinterpret_cast<intptr_t>(
+-          obj->GetInternalField(kPropertyGetterIndex)
+-              .As<v8::Value>().As<v8::External>()->Value()));
++          Nan::GetExternalValue(obj->GetInternalField(kPropertyGetterIndex)
++              .As<v8::Value>().As<v8::External>())));
+   callback(property, cbinfo);
+ }
+ 
+@@ -464,8 +477,8 @@ void PropertySetterCallbackWrapper(
+       cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
+   PropertySetterCallback callback = reinterpret_cast<PropertySetterCallback>(
+       reinterpret_cast<intptr_t>(
+-          obj->GetInternalField(kPropertySetterIndex)
+-              .As<v8::Value>().As<v8::External>()->Value()));
++          Nan::GetExternalValue(obj->GetInternalField(kPropertySetterIndex)
++              .As<v8::Value>().As<v8::External>())));
+   callback(property, value, cbinfo);
+ }
+ 
+@@ -482,8 +495,8 @@ void PropertyEnumeratorCallbackWrapper(
+       cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
+   PropertyEnumeratorCallback callback =
+       reinterpret_cast<PropertyEnumeratorCallback>(reinterpret_cast<intptr_t>(
+-          obj->GetInternalField(kPropertyEnumeratorIndex)
+-              .As<v8::Value>().As<v8::External>()->Value()));
++          Nan::GetExternalValue(obj->GetInternalField(kPropertyEnumeratorIndex)
++              .As<v8::Value>().As<v8::External>())));
+   callback(cbinfo);
+ }
+ 
+@@ -499,8 +512,8 @@ void PropertyDeleterCallbackWrapper(
+       cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
+   PropertyDeleterCallback callback = reinterpret_cast<PropertyDeleterCallback>(
+       reinterpret_cast<intptr_t>(
+-          obj->GetInternalField(kPropertyDeleterIndex)
+-              .As<v8::Value>().As<v8::External>()->Value()));
++          Nan::GetExternalValue(obj->GetInternalField(kPropertyDeleterIndex)
++              .As<v8::Value>().As<v8::External>())));
+   callback(property, cbinfo);
+ }
+ 
+@@ -516,8 +529,8 @@ void PropertyQueryCallbackWrapper(
+       cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
+   PropertyQueryCallback callback = reinterpret_cast<PropertyQueryCallback>(
+       reinterpret_cast<intptr_t>(
+-          obj->GetInternalField(kPropertyQueryIndex)
+-              .As<v8::Value>().As<v8::External>()->Value()));
++          Nan::GetExternalValue(obj->GetInternalField(kPropertyQueryIndex)
++              .As<v8::Value>().As<v8::External>())));
+   callback(property, cbinfo);
+ }
+ 
+@@ -535,8 +548,8 @@ v8::Intercepted IndexGetterCallbackWrapper(
+       cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
+   IndexGetterCallback callback = reinterpret_cast<IndexGetterCallback>(
+       reinterpret_cast<intptr_t>(
+-          obj->GetInternalField(kIndexPropertyGetterIndex)
+-              .As<v8::Value>().As<v8::External>()->Value()));
++          Nan::GetExternalValue(obj->GetInternalField(kIndexPropertyGetterIndex)
++              .As<v8::Value>().As<v8::External>())));
+   return callback(index, cbinfo);
+ }
+ 
+@@ -553,8 +566,8 @@ v8::Intercepted IndexSetterCallbackWrapper(
+       cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
+   IndexSetterCallback callback = reinterpret_cast<IndexSetterCallback>(
+       reinterpret_cast<intptr_t>(
+-          obj->GetInternalField(kIndexPropertySetterIndex)
+-              .As<v8::Value>().As<v8::External>()->Value()));
++          Nan::GetExternalValue(obj->GetInternalField(kIndexPropertySetterIndex)
++              .As<v8::Value>().As<v8::External>())));
+   return callback(index, value, cbinfo);
+ }
+ 
+@@ -572,8 +585,8 @@ void IndexGetterCallbackWrapper(
+       cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
+   IndexGetterCallback callback = reinterpret_cast<IndexGetterCallback>(
+       reinterpret_cast<intptr_t>(
+-          obj->GetInternalField(kIndexPropertyGetterIndex)
+-              .As<v8::Value>().As<v8::External>()->Value()));
++          Nan::GetExternalValue(obj->GetInternalField(kIndexPropertyGetterIndex)
++              .As<v8::Value>().As<v8::External>())));
+   callback(index, cbinfo);
+ }
+ 
+@@ -589,8 +602,8 @@ void IndexSetterCallbackWrapper(
+       cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
+   IndexSetterCallback callback = reinterpret_cast<IndexSetterCallback>(
+       reinterpret_cast<intptr_t>(
+-          obj->GetInternalField(kIndexPropertySetterIndex)
+-              .As<v8::Value>().As<v8::External>()->Value()));
++          Nan::GetExternalValue(obj->GetInternalField(kIndexPropertySetterIndex)
++              .As<v8::Value>().As<v8::External>())));
+   callback(index, value, cbinfo);
+ }
+ 
+@@ -609,9 +622,9 @@ void IndexEnumeratorCallbackWrapper(
+       cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
+   IndexEnumeratorCallback callback = reinterpret_cast<IndexEnumeratorCallback>(
+       reinterpret_cast<intptr_t>(
+-          obj->GetInternalField(
++          Nan::GetExternalValue(obj->GetInternalField(
+               kIndexPropertyEnumeratorIndex)
+-              .As<v8::Value>().As<v8::External>()->Value()));
++              .As<v8::Value>().As<v8::External>())));
+   callback(cbinfo);
+ }
+ 
+@@ -628,8 +641,9 @@ v8::Intercepted IndexDeleterCallbackWrapper(
+       cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
+   IndexDeleterCallback callback = reinterpret_cast<IndexDeleterCallback>(
+       reinterpret_cast<intptr_t>(
+-          obj->GetInternalField(kIndexPropertyDeleterIndex)
+-              .As<v8::Value>().As<v8::External>()->Value()));
++          Nan::GetExternalValue(obj->GetInternalField(
++              kIndexPropertyDeleterIndex)
++              .As<v8::Value>().As<v8::External>())));
+   return callback(index, cbinfo);
+ }
+ 
+@@ -644,8 +658,8 @@ v8::Intercepted IndexQueryCallbackWrapper(
+       cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
+   IndexQueryCallback callback = reinterpret_cast<IndexQueryCallback>(
+       reinterpret_cast<intptr_t>(
+-          obj->GetInternalField(kIndexPropertyQueryIndex)
+-              .As<v8::Value>().As<v8::External>()->Value()));
++          Nan::GetExternalValue(obj->GetInternalField(kIndexPropertyQueryIndex)
++              .As<v8::Value>().As<v8::External>())));
+   return callback(index, cbinfo);
+ }
+ 
+@@ -660,8 +674,9 @@ void IndexDeleterCallbackWrapper(
+       cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
+   IndexDeleterCallback callback = reinterpret_cast<IndexDeleterCallback>(
+       reinterpret_cast<intptr_t>(
+-          obj->GetInternalField(kIndexPropertyDeleterIndex)
+-              .As<v8::Value>().As<v8::External>()->Value()));
++          Nan::GetExternalValue(obj->GetInternalField(
++              kIndexPropertyDeleterIndex)
++              .As<v8::Value>().As<v8::External>())));
+   callback(index, cbinfo);
+ }
+ 
+@@ -676,8 +691,8 @@ void IndexQueryCallbackWrapper(
+       cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
+   IndexQueryCallback callback = reinterpret_cast<IndexQueryCallback>(
+       reinterpret_cast<intptr_t>(
+-          obj->GetInternalField(kIndexPropertyQueryIndex)
+-              .As<v8::Value>().As<v8::External>()->Value()));
++          Nan::GetExternalValue(obj->GetInternalField(kIndexPropertyQueryIndex)
++              .As<v8::Value>().As<v8::External>())));
+   callback(index, cbinfo);
+ }
+ 
diff --git a/editors/vscode/files/patch-node__modules_nan_nan__callbacks__pre__12__inl.h b/editors/vscode/files/patch-node__modules_nan_nan__callbacks__pre__12__inl.h
new file mode 100644
index 000000000000..9e0df95c4fb9
--- /dev/null
+++ b/editors/vscode/files/patch-node__modules_nan_nan__callbacks__pre__12__inl.h
@@ -0,0 +1,13 @@
+--- node_modules/nan/nan_callbacks_pre_12_inl.h.orig	2026-06-04 08:39:31 UTC
++++ node_modules/nan/nan_callbacks_pre_12_inl.h
+@@ -287,6 +287,10 @@ class PropertyCallbackInfo<v8::Integer> :
+   }
+ };
+ 
++inline void* GetExternalValue(v8::Local<v8::External> ext) {
++  return ext->Value();
++}
++
+ namespace imp {
+ template<typename T>
+ class ReturnValueImp : public ReturnValue<T> {
diff --git a/editors/vscode/files/patch-node__modules_nan_nan__implementation__12__inl.h b/editors/vscode/files/patch-node__modules_nan_nan__implementation__12__inl.h
new file mode 100644
index 000000000000..28c745a2c24a
--- /dev/null
+++ b/editors/vscode/files/patch-node__modules_nan_nan__implementation__12__inl.h
@@ -0,0 +1,52 @@
+--- node_modules/nan/nan_implementation_12_inl.h.orig	2026-06-04 08:39:31 UTC
++++ node_modules/nan/nan_implementation_12_inl.h
+@@ -14,6 +14,22 @@ namespace imp {
+ 
+ namespace imp {
+ 
++// Recent V8 versions (currently Chromium/Electron's V8 snapshot; not yet in
++// any released Node) gained an ExternalPointerTypeTag parameter on
++// v8::External::New().  Detect that API via the V8_EXTERNAL_POINTER_TAG_COUNT
++// macro (defined in <v8-internal.h> alongside the new signature) rather than
++// a V8_MAJOR_VERSION cutoff, since Node and Chromium ship divergent V8
++// snapshots under the same major version.  Externals created via this helper
++// are read back through imp::GetExternalPointer in nan_callbacks_12_inl.h,
++// which uses the matching kExternalPointerTypeTagDefault tag.
++inline v8::Local<v8::External> NewExternal(v8::Isolate* isolate, void* value) {
++#ifdef V8_EXTERNAL_POINTER_TAG_COUNT
++  return v8::External::New(isolate, value, v8::kExternalPointerTypeTagDefault);
++#else
++  return v8::External::New(isolate, value);
++#endif
++}
++
+ //=== Array ====================================================================
+ 
+ Factory<v8::Array>::return_t
+@@ -76,7 +92,7 @@ Factory<v8::External>::New(void * value) {
+ 
+ Factory<v8::External>::return_t
+ Factory<v8::External>::New(void * value) {
+-  return v8::External::New(v8::Isolate::GetCurrent(), value);
++  return imp::NewExternal(v8::Isolate::GetCurrent(), value);
+ }
+ 
+ //=== Function =================================================================
+@@ -92,7 +108,7 @@ Factory<v8::Function>::New( FunctionCallback callback
+ 
+   obj->SetInternalField(
+       imp::kFunctionIndex
+-    , v8::External::New(isolate, reinterpret_cast<void *>(callback)));
++    , imp::NewExternal(isolate, reinterpret_cast<void *>(callback)));
+ 
+   v8::Local<v8::Value> val = v8::Local<v8::Value>::New(isolate, data);
+ 
+@@ -128,7 +144,7 @@ Factory<v8::FunctionTemplate>::New( FunctionCallback c
+ 
+     obj->SetInternalField(
+         imp::kFunctionIndex
+-      , v8::External::New(isolate, reinterpret_cast<void *>(callback)));
++      , imp::NewExternal(isolate, reinterpret_cast<void *>(callback)));
+     v8::Local<v8::Value> val = v8::Local<v8::Value>::New(isolate, data);
+ 
+     if (!val.IsEmpty()) {
diff --git a/editors/vscode/files/patch-remote_node__modules__at_vscode_deviceid_dist_index.js b/editors/vscode/files/patch-remote_node__modules__at_vscode_deviceid_dist_index.js
deleted file mode 100644
index 7759e309ac2d..000000000000
--- a/editors/vscode/files/patch-remote_node__modules__at_vscode_deviceid_dist_index.js
+++ /dev/null
@@ -1,15 +0,0 @@
---- remote/node_modules/@vscode/deviceid/dist/index.js.orig	2025-06-19 08:49:40 UTC
-+++ remote/node_modules/@vscode/deviceid/dist/index.js
-@@ -20,8 +20,9 @@ if (process.platform !== "win32" &&
- Object.defineProperty(exports, "__esModule", { value: true });
- if (process.platform !== "win32" &&
-     process.platform !== "darwin" &&
--    process.platform !== "linux") {
-+    process.platform !== "linux" &&
-+    process.platform !== "freebsd") {
-     throw new Error("Unsupported platform");
- }
- __exportStar(require("./devdeviceid.js"), exports);
--//# sourceMappingURL=index.js.map
-\ No newline at end of file
-+//# sourceMappingURL=index.js.map
diff --git a/editors/vscode/files/patch-remote_node__modules__at_vscode_deviceid_dist_storage.js b/editors/vscode/files/patch-remote_node__modules__at_vscode_deviceid_dist_storage.js
deleted file mode 100644
index 71e1b166c1d5..000000000000
--- a/editors/vscode/files/patch-remote_node__modules__at_vscode_deviceid_dist_storage.js
+++ /dev/null
@@ -1,18 +0,0 @@
---- remote/node_modules/@vscode/deviceid/dist/storage.js.orig	2026-02-09 08:29:53 UTC
-+++ remote/node_modules/@vscode/deviceid/dist/storage.js
-@@ -42,7 +42,7 @@ function getDirectory() {
-     if (process.platform === "darwin") {
-         folder = path.join(process.env.HOME, "Library", "Application Support");
-     }
--    else if (process.platform === "linux") {
-+    else if (process.platform === "linux" || process.platform === "freebsd") {
-         folder =
-             process.env.XDG_CACHE_HOME ?? path.join(process.env.HOME, ".cache");
-     }
-@@ -87,4 +87,4 @@ exports.setDeviceId = setDeviceId;
-     }
- }
- exports.setDeviceId = setDeviceId;
--//# sourceMappingURL=storage.js.map
-\ No newline at end of file
-+//# sourceMappingURL=storage.js.map
diff --git a/editors/vscode/files/patch-remote_node__modules_nan_nan__callbacks__12__inl.h b/editors/vscode/files/patch-remote_node__modules_nan_nan__callbacks__12__inl.h
new file mode 100644
index 000000000000..be3d8d059476
--- /dev/null
+++ b/editors/vscode/files/patch-remote_node__modules_nan_nan__callbacks__12__inl.h
@@ -0,0 +1,332 @@
+--- remote/node_modules/nan/nan_callbacks_12_inl.h.orig	2026-06-04 08:41:57 UTC
++++ remote/node_modules/nan/nan_callbacks_12_inl.h
+@@ -178,14 +178,27 @@ class PropertyCallbackInfo {
+   NAN_DISALLOW_ASSIGN_COPY_MOVE(PropertyCallbackInfo)
+ };
+ 
++// Gated on V8_EXTERNAL_POINTER_TAG_COUNT (defined alongside the tagged
++// Value() API) rather than a V8_MAJOR_VERSION cutoff, since Node and
++// Chromium/Electron ship divergent V8 snapshots under the same major.
++// Tag must match the one used by imp::NewExternal.
++inline void* GetExternalValue(v8::Local<v8::External> ext) {
++#ifdef V8_EXTERNAL_POINTER_TAG_COUNT
++  return ext->Value(v8::kExternalPointerTypeTagDefault);
++#else
++  return ext->Value();
++#endif
++}
++
+ namespace imp {
++
+ static
+ void FunctionCallbackWrapper(const v8::FunctionCallbackInfo<v8::Value> &info) {
+   v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
+   FunctionCallback callback = reinterpret_cast<FunctionCallback>(
+       reinterpret_cast<intptr_t>(
+-          obj->GetInternalField(kFunctionIndex)
+-          .As<v8::Value>().As<v8::External>()->Value()));
++          Nan::GetExternalValue(obj->GetInternalField(kFunctionIndex)
++          .As<v8::Value>().As<v8::External>())));
+   FunctionCallbackInfo<v8::Value>
+       cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
+   callback(cbinfo);
+@@ -203,8 +216,8 @@ void GetterCallbackWrapper(
+       cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
+   GetterCallback callback = reinterpret_cast<GetterCallback>(
+       reinterpret_cast<intptr_t>(
+-          obj->GetInternalField(kGetterIndex)
+-          .As<v8::Value>().As<v8::External>()->Value()));
++          Nan::GetExternalValue(obj->GetInternalField(kGetterIndex)
++          .As<v8::Value>().As<v8::External>())));
+   callback(property.As<v8::String>(), cbinfo);
+ }
+ 
+@@ -221,8 +234,8 @@ void SetterCallbackWrapper(
+       cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
+   SetterCallback callback = reinterpret_cast<SetterCallback>(
+       reinterpret_cast<intptr_t>(
+-          obj->GetInternalField(kSetterIndex)
+-          .As<v8::Value>().As<v8::External>()->Value()));
++          Nan::GetExternalValue(obj->GetInternalField(kSetterIndex)
++          .As<v8::Value>().As<v8::External>())));
+   callback(property.As<v8::String>(), value, cbinfo);
+ }
+ 
+@@ -240,8 +253,8 @@ void GetterCallbackWrapper(
+       cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
+   GetterCallback callback = reinterpret_cast<GetterCallback>(
+       reinterpret_cast<intptr_t>(
+-          obj->GetInternalField(kGetterIndex)
+-          .As<v8::Value>().As<v8::External>()->Value()));
++          Nan::GetExternalValue(obj->GetInternalField(kGetterIndex)
++          .As<v8::Value>().As<v8::External>())));
+   callback(property, cbinfo);
+ }
+ 
+@@ -258,8 +271,8 @@ void SetterCallbackWrapper(
+       cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
+   SetterCallback callback = reinterpret_cast<SetterCallback>(
+       reinterpret_cast<intptr_t>(
+-          obj->GetInternalField(kSetterIndex)
+-          .As<v8::Value>().As<v8::External>()->Value()));
++          Nan::GetExternalValue(obj->GetInternalField(kSetterIndex)
++          .As<v8::Value>().As<v8::External>())));
+   callback(property, value, cbinfo);
+ }
+ 
+@@ -282,8 +295,8 @@ v8::Intercepted PropertyGetterCallbackWrapper(
+       cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
+   PropertyGetterCallback callback = reinterpret_cast<PropertyGetterCallback>(
+       reinterpret_cast<intptr_t>(
+-          obj->GetInternalField(kPropertyGetterIndex)
+-              .As<v8::Value>().As<v8::External>()->Value()));
++          Nan::GetExternalValue(obj->GetInternalField(kPropertyGetterIndex)
++              .As<v8::Value>().As<v8::External>())));
+   return callback(property.As<v8::String>(), cbinfo);
+ }
+ 
+@@ -300,8 +313,8 @@ v8::Intercepted PropertySetterCallbackWrapper(
+       cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
+   PropertySetterCallback callback = reinterpret_cast<PropertySetterCallback>(
+       reinterpret_cast<intptr_t>(
+-          obj->GetInternalField(kPropertySetterIndex)
+-              .As<v8::Value>().As<v8::External>()->Value()));
++          Nan::GetExternalValue(obj->GetInternalField(kPropertySetterIndex)
++              .As<v8::Value>().As<v8::External>())));
+   return callback(property.As<v8::String>(), value, cbinfo);
+ }
+ 
+@@ -320,8 +333,8 @@ void PropertyGetterCallbackWrapper(
+       cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
+   PropertyGetterCallback callback = reinterpret_cast<PropertyGetterCallback>(
+       reinterpret_cast<intptr_t>(
+-          obj->GetInternalField(kPropertyGetterIndex)
+-              .As<v8::Value>().As<v8::External>()->Value()));
++          Nan::GetExternalValue(obj->GetInternalField(kPropertyGetterIndex)
++              .As<v8::Value>().As<v8::External>())));
+   callback(property.As<v8::String>(), cbinfo);
+ }
+ 
+@@ -338,8 +351,8 @@ void PropertySetterCallbackWrapper(
+       cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
+   PropertySetterCallback callback = reinterpret_cast<PropertySetterCallback>(
+       reinterpret_cast<intptr_t>(
+-          obj->GetInternalField(kPropertySetterIndex)
+-              .As<v8::Value>().As<v8::External>()->Value()));
++          Nan::GetExternalValue(obj->GetInternalField(kPropertySetterIndex)
++              .As<v8::Value>().As<v8::External>())));
+   callback(property.As<v8::String>(), value, cbinfo);
+ }
+ 
+@@ -357,8 +370,8 @@ void PropertyEnumeratorCallbackWrapper(
+       cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
+   PropertyEnumeratorCallback callback =
+       reinterpret_cast<PropertyEnumeratorCallback>(reinterpret_cast<intptr_t>(
+-          obj->GetInternalField(kPropertyEnumeratorIndex)
+-              .As<v8::Value>().As<v8::External>()->Value()));
++          Nan::GetExternalValue(obj->GetInternalField(kPropertyEnumeratorIndex)
++              .As<v8::Value>().As<v8::External>())));
+   callback(cbinfo);
+ }
+ 
+@@ -376,8 +389,8 @@ v8::Intercepted PropertyDeleterCallbackWrapper(
+       cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
+   PropertyDeleterCallback callback = reinterpret_cast<PropertyDeleterCallback>(
+       reinterpret_cast<intptr_t>(
+-          obj->GetInternalField(kPropertyDeleterIndex)
+-              .As<v8::Value>().As<v8::External>()->Value()));
++          Nan::GetExternalValue(obj->GetInternalField(kPropertyDeleterIndex)
++              .As<v8::Value>().As<v8::External>())));
+   return callback(property.As<v8::String>(), cbinfo);
+ }
+ 
+@@ -394,8 +407,8 @@ v8::Intercepted PropertyQueryCallbackWrapper(
+       cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
+   PropertyQueryCallback callback = reinterpret_cast<PropertyQueryCallback>(
+       reinterpret_cast<intptr_t>(
+-          obj->GetInternalField(kPropertyQueryIndex)
+-              .As<v8::Value>().As<v8::External>()->Value()));
++          Nan::GetExternalValue(obj->GetInternalField(kPropertyQueryIndex)
++              .As<v8::Value>().As<v8::External>())));
+   return callback(property.As<v8::String>(), cbinfo);
+ }
+ 
+@@ -411,8 +424,8 @@ void PropertyDeleterCallbackWrapper(
+       cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
+   PropertyDeleterCallback callback = reinterpret_cast<PropertyDeleterCallback>(
+       reinterpret_cast<intptr_t>(
+-          obj->GetInternalField(kPropertyDeleterIndex)
+-              .As<v8::Value>().As<v8::External>()->Value()));
++          Nan::GetExternalValue(obj->GetInternalField(kPropertyDeleterIndex)
++              .As<v8::Value>().As<v8::External>())));
+   callback(property.As<v8::String>(), cbinfo);
+ }
+ 
+@@ -428,8 +441,8 @@ void PropertyQueryCallbackWrapper(
+       cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
+   PropertyQueryCallback callback = reinterpret_cast<PropertyQueryCallback>(
+       reinterpret_cast<intptr_t>(
+-          obj->GetInternalField(kPropertyQueryIndex)
+-              .As<v8::Value>().As<v8::External>()->Value()));
++          Nan::GetExternalValue(obj->GetInternalField(kPropertyQueryIndex)
++              .As<v8::Value>().As<v8::External>())));
+   callback(property.As<v8::String>(), cbinfo);
+ }
+ 
+@@ -446,8 +459,8 @@ void PropertyGetterCallbackWrapper(
+       cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
+   PropertyGetterCallback callback = reinterpret_cast<PropertyGetterCallback>(
+       reinterpret_cast<intptr_t>(
+-          obj->GetInternalField(kPropertyGetterIndex)
+-              .As<v8::Value>().As<v8::External>()->Value()));
++          Nan::GetExternalValue(obj->GetInternalField(kPropertyGetterIndex)
++              .As<v8::Value>().As<v8::External>())));
+   callback(property, cbinfo);
+ }
+ 
+@@ -464,8 +477,8 @@ void PropertySetterCallbackWrapper(
+       cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
+   PropertySetterCallback callback = reinterpret_cast<PropertySetterCallback>(
+       reinterpret_cast<intptr_t>(
+-          obj->GetInternalField(kPropertySetterIndex)
+-              .As<v8::Value>().As<v8::External>()->Value()));
++          Nan::GetExternalValue(obj->GetInternalField(kPropertySetterIndex)
++              .As<v8::Value>().As<v8::External>())));
+   callback(property, value, cbinfo);
+ }
+ 
+@@ -482,8 +495,8 @@ void PropertyEnumeratorCallbackWrapper(
+       cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
+   PropertyEnumeratorCallback callback =
+       reinterpret_cast<PropertyEnumeratorCallback>(reinterpret_cast<intptr_t>(
+-          obj->GetInternalField(kPropertyEnumeratorIndex)
+-              .As<v8::Value>().As<v8::External>()->Value()));
++          Nan::GetExternalValue(obj->GetInternalField(kPropertyEnumeratorIndex)
++              .As<v8::Value>().As<v8::External>())));
+   callback(cbinfo);
+ }
+ 
+@@ -499,8 +512,8 @@ void PropertyDeleterCallbackWrapper(
+       cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
+   PropertyDeleterCallback callback = reinterpret_cast<PropertyDeleterCallback>(
+       reinterpret_cast<intptr_t>(
+-          obj->GetInternalField(kPropertyDeleterIndex)
+-              .As<v8::Value>().As<v8::External>()->Value()));
++          Nan::GetExternalValue(obj->GetInternalField(kPropertyDeleterIndex)
*** 560 LINES SKIPPED ***


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a21fb3a.436e1.41fc1c1>