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

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

Issue 2873543002: First implementation of lazily cached accessor for DOM attributes. (Closed)
Patch Set: whitespace and renaming fixes Created 3 years, 7 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
Index: third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.h b/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.h
index e59d59a0085dbc6db6c395a936cd03466c51c32b..1b4a85914f1d18ede5b109dac914e069d1cebb1b 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.h
+++ b/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.h
@@ -73,6 +73,8 @@ class CORE_EXPORT V8DOMConfiguration final {
};
typedef v8::Local<v8::Private> (*CachedPropertyKey)(v8::Isolate*);
+ typedef void (*CachedAccessorInitCallback)(v8::Isolate*,
+ v8::Local<v8::Object>);
// AttributeConfiguration translates into calls to SetNativeDataProperty() on
// either the instance or the prototype ObjectTemplate, based on
@@ -83,10 +85,7 @@ class CORE_EXPORT V8DOMConfiguration final {
const char* const name;
v8::AccessorNameGetterCallback getter;
v8::AccessorNameSetterCallback setter;
- // TODO(vogelheim): This has to be removed too since it's only used in
- // accessors.
- // The accessor's 'result' is stored in a private property.
- CachedPropertyKey cached_property_key;
+
const WrapperTypeInfo* data;
// v8::PropertyAttribute
unsigned attribute : 8;
@@ -142,6 +141,7 @@ class CORE_EXPORT V8DOMConfiguration final {
v8::FunctionCallback setter;
// The accessor's 'result' is stored in a private property.
CachedPropertyKey cached_property_key;
+ CachedAccessorInitCallback cached_accessor_init_callback;
const WrapperTypeInfo* data;
// v8::PropertyAttribute
unsigned attribute : 8;

Powered by Google App Engine
This is Rietveld 408576698