Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1001)

Unified Diff: third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.h

Issue 2751263002: [Bindings] Cache handles for dictionary keys on V8PerIsolateData. (Closed)
Patch Set: findOrCreateEternalNameCache Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.h b/third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.h
index 2c743fbec75b624be4505934b0958e6964d8a567..780e2471a9ffa4d4931cce03abe99f228458b145 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.h
+++ b/third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.h
@@ -152,6 +152,15 @@ class CORE_EXPORT V8PerIsolateData {
v8::Local<v8::Signature>,
int length);
+ // Obtains a pointer to an array of names, given a lookup key. If it does not
+ // yet exist, it is created from the given array of strings. Once created,
+ // these live for as long as the isolate, so this is appropriate only for a
+ // compile-time list of related names, such as IDL dictionary keys.
+ const v8::Eternal<v8::Name>* findOrCreateEternalNameCache(
+ const void* lookupKey,
+ const char* const names[],
+ size_t count);
+
bool hasInstance(const WrapperTypeInfo* untrusted, v8::Local<v8::Value>);
v8::Local<v8::Object> findInstanceInPrototypeChain(const WrapperTypeInfo*,
v8::Local<v8::Value>);
@@ -238,6 +247,9 @@ class CORE_EXPORT V8PerIsolateData {
V8FunctionTemplateMap m_operationTemplateMapForMainWorld;
V8FunctionTemplateMap m_operationTemplateMapForNonMainWorld;
+ // Contains lists of eternal names, such as dictionary keys.
+ HashMap<const void*, Vector<v8::Eternal<v8::Name>>> m_eternalNameCache;
+
std::unique_ptr<StringCache> m_stringCache;
std::unique_ptr<V8HiddenValue> m_hiddenValue;
std::unique_ptr<V8PrivateProperty> m_privateProperty;
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698