Commit 2dcfce20 authored by Marina Sakai's avatar Marina Sakai Committed by Commit Bot

Remove unused old API GetSymbol() in V8PrivateProperty

In the previous CLs, we replaced all the old GetSymbol(), which uses void* as a key, with the new GetSybmol(), which uses an instance of SymbolKey.
So, this CL removes the unused old GetSymbol().

Bug: 715418
Change-Id: I465370f55ed07632c6f4d00804733c3c49aaab43
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1888858Reviewed-by: default avatarHitoshi Yoshida <peria@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Reviewed-by: default avatarYuki Shiino <yukishiino@chromium.org>
Commit-Queue: Marina Sakai <marinasakai@google.com>
Cr-Commit-Position: refs/heads/master@{#710673}
parent 2020e190
......@@ -190,25 +190,6 @@ class PLATFORM_EXPORT V8PrivateProperty {
return GetSymbol(isolate, private_property_key);
}
// Returns a Symbol to access a private property. Symbol instances from same
// |key|s are guaranteed to access the same property. |desc| is a description
// of the property. By defining the key as the address of a static variable,
// the key is unique for each private property.
static Symbol GetSymbol(v8::Isolate* isolate, void* key, const char* desc) {
V8PrivateProperty* private_prop =
V8PerIsolateData::From(isolate)->PrivateProperty();
auto& symbol_map = private_prop->symbol_map_;
auto iter = symbol_map.find(key);
v8::Local<v8::Private> v8_private;
if (UNLIKELY(iter == symbol_map.end())) {
v8_private = CreateV8Private(isolate, desc);
symbol_map.insert(key, v8::Eternal<v8::Private>(isolate, v8_private));
} else {
v8_private = iter->value.Get(isolate);
}
return Symbol(isolate, v8_private);
}
// Returns a Symbol to access a private property. Symbol instances from same
// |key| are guaranteed to access the same property.
static Symbol GetSymbol(v8::Isolate* isolate, const SymbolKey& key);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment