Chromium Code Reviews| Index: include/v8.h |
| diff --git a/include/v8.h b/include/v8.h |
| index 56e176ab14834bc87e99054e6920cde99345d0fa..e7786f57419403b5ae6cdb09fd1a92e98126a1b8 100644 |
| --- a/include/v8.h |
| +++ b/include/v8.h |
| @@ -131,6 +131,9 @@ class AccessorInfo; |
| class StackTrace; |
| class StackFrame; |
| class Isolate; |
| +class DeclaredAccessorDescriptor; |
| +class ObjectOperationDescriptor; |
| +class RawOperationDescriptor; |
| namespace internal { |
| @@ -1606,6 +1609,11 @@ class V8EXPORT Object : public Value { |
| AccessControl settings = DEFAULT, |
| PropertyAttribute attribute = None); |
| + bool SetAccessor(Handle<String> name, |
|
Sven Panne
2013/03/07 08:18:48
Add some kind of warning comment that this part of
|
| + Handle<DeclaredAccessorDescriptor> descriptor, |
| + AccessControl settings = DEFAULT, |
| + PropertyAttribute attribute = None); |
| + |
| /** |
| * Returns an array containing the names of the enumerable properties |
| * of this object, including properties from prototype objects. The |
| @@ -2377,13 +2385,6 @@ class V8EXPORT FunctionTemplate : public Template { |
| private: |
| FunctionTemplate(); |
| - void AddInstancePropertyAccessor(Handle<String> name, |
| - AccessorGetter getter, |
| - AccessorSetter setter, |
| - Handle<Value> data, |
| - AccessControl settings, |
| - PropertyAttribute attributes, |
| - Handle<AccessorSignature> signature); |
| void SetNamedInstancePropertyHandler(NamedPropertyGetter getter, |
| NamedPropertySetter setter, |
| NamedPropertyQuery query, |
| @@ -2456,6 +2457,13 @@ class V8EXPORT ObjectTemplate : public Template { |
| Handle<AccessorSignature> signature = |
| Handle<AccessorSignature>()); |
| + bool SetAccessor(Handle<String> name, |
|
Sven Panne
2013/03/07 08:18:48
Same here...
|
| + Handle<DeclaredAccessorDescriptor> descriptor, |
| + AccessControl settings = DEFAULT, |
| + PropertyAttribute attribute = None, |
| + Handle<AccessorSignature> signature = |
| + Handle<AccessorSignature>()); |
| + |
| /** |
| * Sets a named property handler on the object template. |
| * |
| @@ -2585,6 +2593,59 @@ class V8EXPORT AccessorSignature : public Data { |
| }; |
| +class V8EXPORT DeclaredAccessorDescriptor : public Data { |
| + private: |
| + DeclaredAccessorDescriptor(); |
| +}; |
| + |
| + |
| +class V8EXPORT ObjectOperationDescriptor : public Data { |
| + public: |
| + static Local<RawOperationDescriptor> New(Isolate* isolate, |
|
Sven Panne
2013/03/07 08:18:48
A more descriptive name indicating that the operat
|
| + int internal_field); |
| + private: |
| + ObjectOperationDescriptor(); |
| +}; |
| + |
| + |
| +enum DeclaredAccessorDescriptorDataType { |
| + kDescriptorBoolType, |
| + kDescriptorInt8Type, kDescriptorUint8Type, |
| + kDescriptorInt16Type, kDescriptorUint16Type, |
| + kDescriptorInt32Type, kDescriptorUint32Type, |
| + kDescriptorFloatType, kDescriptorDoubleType |
| +}; |
| + |
| + |
| +class V8EXPORT RawOperationDescriptor : public Data { |
| + public: |
| + Local<DeclaredAccessorDescriptor> NewHandleDereference(Isolate* isolate); |
| + Local<RawOperationDescriptor> NewRawDereference(Isolate* isolate); |
| + Local<RawOperationDescriptor> NewRawShift(Isolate* isolate, |
| + int16_t byte_offset); |
| + Local<DeclaredAccessorDescriptor> NewPointerCompare(Isolate* isolate, |
| + void* compare_value); |
| + Local<DeclaredAccessorDescriptor> NewPrimitiveValue( |
| + Isolate* isolate, |
| + DeclaredAccessorDescriptorDataType data_type, |
| + uint8_t bool_offset = 0); |
| + Local<DeclaredAccessorDescriptor> NewBitmaskCompare8(Isolate* isolate, |
| + uint8_t bitmask, |
| + uint8_t compare_value); |
| + Local<DeclaredAccessorDescriptor> NewBitmaskCompare16( |
| + Isolate* isolate, |
| + uint16_t bitmask, |
| + uint16_t compare_value); |
| + Local<DeclaredAccessorDescriptor> NewBitmaskCompare32( |
| + Isolate* isolate, |
| + uint32_t bitmask, |
| + uint32_t compare_value); |
| + |
| + private: |
| + RawOperationDescriptor(); |
| +}; |
| + |
| + |
| /** |
| * A utility for determining the type of objects based on the template |
| * they were constructed from. |