From d8a63c36d3bc80ca94d190e27d56a4abcf24b532 Mon Sep 17 00:00:00 2001 From: Keeley Hammond Date: Tue, 27 Jan 2026 17:38:15 -0800 Subject: [PATCH] 7000847: add type tag to v8::External calls in shared_texture Updated v8::External::New and v8::External::Value calls to use the kExternalPointerTypeTagDefault tag as required by the V8 API change that deprecates the tagless versions. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7000847 --- .../common/api/electron_api_shared_texture.cc | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/shell/common/api/electron_api_shared_texture.cc b/shell/common/api/electron_api_shared_texture.cc index ba22b50aa0..4582e4e65a 100644 --- a/shell/common/api/electron_api_shared_texture.cc +++ b/shell/common/api/electron_api_shared_texture.cc @@ -360,7 +360,8 @@ void ImportedTextureGetVideoFrame( const v8::FunctionCallbackInfo& info) { auto* isolate = info.GetIsolate(); auto* wrapper = static_cast( - info.Data().As()->Value()); + info.Data().As()->Value( + v8::kExternalPointerTypeTagDefault)); if (wrapper->IsReferenceReleased()) { gin_helper::ErrorThrower(isolate).ThrowTypeError( @@ -382,7 +383,8 @@ void ImportedTextureStartTransferSharedTexture( const v8::FunctionCallbackInfo& info) { auto* isolate = info.GetIsolate(); auto* wrapper = static_cast( - info.Data().As()->Value()); + info.Data().As()->Value( + v8::kExternalPointerTypeTagDefault)); if (wrapper->IsReferenceReleased()) { gin_helper::ErrorThrower(isolate).ThrowTypeError( @@ -396,7 +398,8 @@ void ImportedTextureStartTransferSharedTexture( void ImportedTextureRelease(const v8::FunctionCallbackInfo& info) { auto* wrapper = static_cast( - info.Data().As()->Value()); + info.Data().As()->Value( + v8::kExternalPointerTypeTagDefault)); auto cb = info[0]; if (cb->IsFunction()) { @@ -415,7 +418,8 @@ void ImportedTextureGetFrameCreationSyncToken( const v8::FunctionCallbackInfo& info) { auto* isolate = info.GetIsolate(); auto* wrapper = static_cast( - info.Data().As()->Value()); + info.Data().As()->Value( + v8::kExternalPointerTypeTagDefault)); if (wrapper->IsReferenceReleased()) { gin_helper::ErrorThrower(isolate).ThrowTypeError( @@ -431,7 +435,8 @@ void ImportedTextureSetReleaseSyncToken( const v8::FunctionCallbackInfo& info) { auto* isolate = info.GetIsolate(); auto* wrapper = static_cast( - info.Data().As()->Value()); + info.Data().As()->Value( + v8::kExternalPointerTypeTagDefault)); if (wrapper->IsReferenceReleased()) { gin_helper::ErrorThrower(isolate).ThrowTypeError( @@ -454,7 +459,8 @@ v8::Local CreateImportedSharedTextureFromSharedImage( auto* wrapper = new ImportedSharedTextureWrapper(); wrapper->ist = base::WrapRefCounted(imported); - auto imported_wrapped = v8::External::New(isolate, wrapper); + auto imported_wrapped = + v8::External::New(isolate, wrapper, v8::kExternalPointerTypeTagDefault); gin::Dictionary root(isolate, v8::Object::New(isolate)); auto releaser = v8::Function::New(isolate->GetCurrentContext(),