diff --git a/shell/common/api/electron_api_v8_util.cc b/shell/common/api/electron_api_v8_util.cc index 7291024b2522..e709c5789c4a 100644 --- a/shell/common/api/electron_api_v8_util.cc +++ b/shell/common/api/electron_api_v8_util.cc @@ -67,17 +67,6 @@ void SetHiddenValue(v8::Isolate* isolate, object->SetPrivate(context, privateKey, value); } -void DeleteHiddenValue(v8::Isolate* isolate, - v8::Local object, - v8::Local key) { - v8::Local context = isolate->GetCurrentContext(); - v8::Local privateKey = v8::Private::ForApi(isolate, key); - // Actually deleting the value would make force the object into - // dictionary mode which is unnecessarily slow. Instead, we replace - // the hidden value with "undefined". - object->SetPrivate(context, privateKey, v8::Undefined(isolate)); -} - int32_t GetObjectHash(v8::Local object) { return object->GetIdentityHash(); } @@ -114,7 +103,6 @@ void Initialize(v8::Local exports, gin_helper::Dictionary dict(context->GetIsolate(), exports); dict.SetMethod("getHiddenValue", &GetHiddenValue); dict.SetMethod("setHiddenValue", &SetHiddenValue); - dict.SetMethod("deleteHiddenValue", &DeleteHiddenValue); dict.SetMethod("getObjectHash", &GetObjectHash); dict.SetMethod("takeHeapSnapshot", &TakeHeapSnapshot); dict.SetMethod("requestGarbageCollectionForTesting", diff --git a/typings/internal-ambient.d.ts b/typings/internal-ambient.d.ts index 66ba2999b483..83adcbb28f6c 100644 --- a/typings/internal-ambient.d.ts +++ b/typings/internal-ambient.d.ts @@ -32,7 +32,6 @@ declare namespace NodeJS { interface V8UtilBinding { getHiddenValue(obj: any, key: string): T; setHiddenValue(obj: any, key: string, value: T): void; - deleteHiddenValue(obj: any, key: string): void; requestGarbageCollectionForTesting(): void; runUntilIdle(): void; triggerFatalErrorForTesting(): void;