chore: remove unused & undocumented function v8Util.deleteHiddenValue() (#43117)
chore: remove unused v8Util.deleteHiddenValue()
Its last use was removed in Nov 2020 by c8d77cae4a
(#26659)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
parent
d8b20376f9
commit
b362e26261
2 changed files with 0 additions and 13 deletions
|
@ -67,17 +67,6 @@ void SetHiddenValue(v8::Isolate* isolate,
|
||||||
object->SetPrivate(context, privateKey, value);
|
object->SetPrivate(context, privateKey, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DeleteHiddenValue(v8::Isolate* isolate,
|
|
||||||
v8::Local<v8::Object> object,
|
|
||||||
v8::Local<v8::String> key) {
|
|
||||||
v8::Local<v8::Context> context = isolate->GetCurrentContext();
|
|
||||||
v8::Local<v8::Private> 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<v8::Object> object) {
|
int32_t GetObjectHash(v8::Local<v8::Object> object) {
|
||||||
return object->GetIdentityHash();
|
return object->GetIdentityHash();
|
||||||
}
|
}
|
||||||
|
@ -114,7 +103,6 @@ void Initialize(v8::Local<v8::Object> exports,
|
||||||
gin_helper::Dictionary dict(context->GetIsolate(), exports);
|
gin_helper::Dictionary dict(context->GetIsolate(), exports);
|
||||||
dict.SetMethod("getHiddenValue", &GetHiddenValue);
|
dict.SetMethod("getHiddenValue", &GetHiddenValue);
|
||||||
dict.SetMethod("setHiddenValue", &SetHiddenValue);
|
dict.SetMethod("setHiddenValue", &SetHiddenValue);
|
||||||
dict.SetMethod("deleteHiddenValue", &DeleteHiddenValue);
|
|
||||||
dict.SetMethod("getObjectHash", &GetObjectHash);
|
dict.SetMethod("getObjectHash", &GetObjectHash);
|
||||||
dict.SetMethod("takeHeapSnapshot", &TakeHeapSnapshot);
|
dict.SetMethod("takeHeapSnapshot", &TakeHeapSnapshot);
|
||||||
dict.SetMethod("requestGarbageCollectionForTesting",
|
dict.SetMethod("requestGarbageCollectionForTesting",
|
||||||
|
|
1
typings/internal-ambient.d.ts
vendored
1
typings/internal-ambient.d.ts
vendored
|
@ -32,7 +32,6 @@ declare namespace NodeJS {
|
||||||
interface V8UtilBinding {
|
interface V8UtilBinding {
|
||||||
getHiddenValue<T>(obj: any, key: string): T;
|
getHiddenValue<T>(obj: any, key: string): T;
|
||||||
setHiddenValue<T>(obj: any, key: string, value: T): void;
|
setHiddenValue<T>(obj: any, key: string, value: T): void;
|
||||||
deleteHiddenValue(obj: any, key: string): void;
|
|
||||||
requestGarbageCollectionForTesting(): void;
|
requestGarbageCollectionForTesting(): void;
|
||||||
runUntilIdle(): void;
|
runUntilIdle(): void;
|
||||||
triggerFatalErrorForTesting(): void;
|
triggerFatalErrorForTesting(): void;
|
||||||
|
|
Loading…
Reference in a new issue