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

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

Issue 1181113006: bindings: Introduces on_{instance,prototype,interface} in the code generator. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed review comments. Created 5 years, 6 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 | Source/bindings/core/v8/V8DOMConfiguration.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/V8DOMConfiguration.h
diff --git a/Source/bindings/core/v8/V8DOMConfiguration.h b/Source/bindings/core/v8/V8DOMConfiguration.h
index 0584f38553a03c82f2a04f32e48312fe33b7560d..19bb917c332d4e17017badfeafdb1033f900b0e5 100644
--- a/Source/bindings/core/v8/V8DOMConfiguration.h
+++ b/Source/bindings/core/v8/V8DOMConfiguration.h
@@ -39,19 +39,21 @@ namespace blink {
class CORE_EXPORT V8DOMConfiguration final {
public:
// The following Configuration structs and install methods are used for
- // setting multiple properties on an ObjectTemplate, used from the
- // generated bindings initialization (ConfigureXXXTemplate). This greatly
- // reduces the binary size by moving from code driven setup to data table
- // driven setup.
+ // setting multiple properties on ObjectTemplate / FunctionTemplate, used
+ // from the generated bindings initialization (ConfigureXXXTemplate).
+ // This greatly reduces the binary size by moving from code driven setup to
+ // data table driven setup.
enum ExposeConfiguration {
ExposedToAllScripts,
OnlyExposedToPrivateScript,
};
- enum InstanceOrPrototypeConfiguration {
- OnInstance,
- OnPrototype,
+ // Bitflags to show where the member will be defined.
+ enum PropertyLocationConfiguration {
+ OnInstance = 1 << 0,
+ OnPrototype = 1 << 1,
+ OnInterface = 1 << 2,
};
enum HolderCheckConfiguration {
@@ -71,15 +73,14 @@ public:
v8::AccessControl settings;
v8::PropertyAttribute attribute;
unsigned exposeConfiguration : 1; // ExposeConfiguration
- unsigned instanceOrPrototypeConfiguration : 1; // InstanceOrPrototypeConfiguration
+ unsigned propertyLocationConfiguration : 3; // PropertyLocationConfiguration
+ unsigned holderCheckConfiguration : 1; // HolderCheckConfiguration
};
static void installAttributes(v8::Isolate*, v8::Local<v8::ObjectTemplate> instanceTemplate, v8::Local<v8::ObjectTemplate> prototypeTemplate, const AttributeConfiguration*, size_t attributeCount);
static void installAttribute(v8::Isolate*, v8::Local<v8::ObjectTemplate> instanceTemplate, v8::Local<v8::ObjectTemplate> prototypeTemplate, const AttributeConfiguration&);
- static void installAttribute(v8::Isolate*, v8::Local<v8::Object> instance, v8::Local<v8::Object> prototype, const AttributeConfiguration&);
-
// AccessorConfiguration translates into calls to SetAccessorProperty()
// on prototype ObjectTemplate.
struct AccessorConfiguration {
@@ -92,14 +93,13 @@ public:
v8::AccessControl settings;
v8::PropertyAttribute attribute;
unsigned exposeConfiguration : 1; // ExposeConfiguration
+ unsigned propertyLocationConfiguration : 3; // PropertyLocationConfiguration
unsigned holderCheckConfiguration : 1; // HolderCheckConfiguration
};
- static void installAccessors(v8::Isolate*, v8::Local<v8::ObjectTemplate> prototypeTemplate, v8::Local<v8::Signature>, const AccessorConfiguration*, size_t accessorCount);
-
- static void installAccessor(v8::Isolate*, v8::Local<v8::ObjectTemplate> prototypeTemplate, v8::Local<v8::Signature>, const AccessorConfiguration&);
+ static void installAccessors(v8::Isolate*, v8::Local<v8::ObjectTemplate> instanceTemplate, v8::Local<v8::ObjectTemplate> prototypeTemplate, v8::Local<v8::FunctionTemplate> interfaceTemplate, v8::Local<v8::Signature>, const AccessorConfiguration*, size_t accessorCount);
- static void installAccessor(v8::Isolate*, v8::Local<v8::Object> prototype, const AccessorConfiguration&);
+ static void installAccessor(v8::Isolate*, v8::Local<v8::ObjectTemplate> instanceTemplate, v8::Local<v8::ObjectTemplate> prototypeTemplate, v8::Local<v8::FunctionTemplate> interfaceTemplate, v8::Local<v8::Signature>, const AccessorConfiguration&);
enum ConstantType {
ConstantTypeShort,
« no previous file with comments | « no previous file | Source/bindings/core/v8/V8DOMConfiguration.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698