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

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

Issue 2751263002: [Bindings] Cache handles for dictionary keys on V8PerIsolateData. (Closed)
Patch Set: const 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 17d08c74f148512e7c4658abccb6ca99c46c430f..5f46678c04b7a288afe5f7fca047e47f82678ff4 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.h
+++ b/third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.h
@@ -152,6 +152,13 @@ class CORE_EXPORT V8PerIsolateData {
v8::Local<v8::Signature>,
int length);
+ // Obtains a pointer to the set of well-known dictionary keys identified by
+ // the lookup key, or creates it from an array of static strings.
+ // TODO(jbroman): v8::Eternal::Get should be const.
+ const v8::Eternal<v8::Name>* findOrCreateKeys(const void* lookupKey,
+ const char* const keys[],
+ size_t keyCount);
+
bool hasInstance(const WrapperTypeInfo* untrusted, v8::Local<v8::Value>);
v8::Local<v8::Object> findInstanceInPrototypeChain(const WrapperTypeInfo*,
v8::Local<v8::Value>);
@@ -238,6 +245,9 @@ class CORE_EXPORT V8PerIsolateData {
V8FunctionTemplateMap m_operationTemplateMapForMainWorld;
V8FunctionTemplateMap m_operationTemplateMapForNonMainWorld;
+ // Contains direct pointers to well-known dictionary keys.
+ HashMap<const void*, Vector<v8::Eternal<v8::Name>>> m_keyMap;
+
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