| v8.h | | v8.h | |
| | | | |
| skipping to change at line 454 | | skipping to change at line 454 | |
| template <class T> class Eternal { | | template <class T> class Eternal { | |
| public: | | public: | |
| V8_INLINE(Eternal()) : index_(kInitialValue) { } | | V8_INLINE(Eternal()) : index_(kInitialValue) { } | |
| template<class S> | | template<class S> | |
| V8_INLINE(Eternal(Isolate* isolate, Local<S> handle)) | | V8_INLINE(Eternal(Isolate* isolate, Local<S> handle)) | |
| : index_(kInitialValue) { | | : index_(kInitialValue) { | |
| Set(isolate, handle); | | Set(isolate, handle); | |
| } | | } | |
| // Can only be safely called if already set. | | // Can only be safely called if already set. | |
| V8_INLINE(Local<T> Get(Isolate* isolate)); | | V8_INLINE(Local<T> Get(Isolate* isolate)); | |
|
| V8_INLINE(bool IsEmpty()) { return index_ != kInitialValue; } | | V8_INLINE(bool IsEmpty()) { return index_ == kInitialValue; } | |
| template<class S> | | template<class S> | |
| V8_INLINE(void Set(Isolate* isolate, Local<S> handle)); | | V8_INLINE(void Set(Isolate* isolate, Local<S> handle)); | |
| | | | |
| private: | | private: | |
| static const int kInitialValue = -1; | | static const int kInitialValue = -1; | |
| int index_; | | int index_; | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * An object reference that is independent of any handle scope. Where | | * An object reference that is independent of any handle scope. Where | |
| | | | |
| skipping to change at line 2093 | | skipping to change at line 2093 | |
| bool Delete(uint32_t index); | | bool Delete(uint32_t index); | |
| | | | |
| bool SetAccessor(Handle<String> name, | | bool SetAccessor(Handle<String> name, | |
| AccessorGetterCallback getter, | | AccessorGetterCallback getter, | |
| AccessorSetterCallback setter = 0, | | AccessorSetterCallback setter = 0, | |
| Handle<Value> data = Handle<Value>(), | | Handle<Value> data = Handle<Value>(), | |
| AccessControl settings = DEFAULT, | | AccessControl settings = DEFAULT, | |
| PropertyAttribute attribute = None); | | PropertyAttribute attribute = None); | |
| | | | |
| // This function is not yet stable and should not be used at this time. | | // This function is not yet stable and should not be used at this time. | |
|
| bool SetAccessor(Handle<String> name, | | bool SetDeclaredAccessor(Local<String> name, | |
| Handle<DeclaredAccessorDescriptor> descriptor, | | Local<DeclaredAccessorDescriptor> descriptor, | |
| AccessControl settings = DEFAULT, | | PropertyAttribute attribute = None, | |
| PropertyAttribute attribute = None); | | AccessControl settings = DEFAULT); | |
| | | | |
| /** | | /** | |
| * Returns an array containing the names of the enumerable properties | | * Returns an array containing the names of the enumerable properties | |
| * of this object, including properties from prototype objects. The | | * of this object, including properties from prototype objects. The | |
| * array returned by this method contains the same values as would | | * array returned by this method contains the same values as would | |
| * be enumerated by a for-in statement over this object. | | * be enumerated by a for-in statement over this object. | |
| */ | | */ | |
| Local<Array> GetPropertyNames(); | | Local<Array> GetPropertyNames(); | |
| | | | |
| /** | | /** | |
| | | | |
| skipping to change at line 2927 | | skipping to change at line 2927 | |
| PropertyAttribute attributes = None); | | PropertyAttribute attributes = None); | |
| V8_INLINE(void Set(const char* name, Handle<Data> value)); | | V8_INLINE(void Set(const char* name, Handle<Data> value)); | |
| | | | |
| void SetAccessorProperty( | | void SetAccessorProperty( | |
| Local<String> name, | | Local<String> name, | |
| Local<FunctionTemplate> getter = Local<FunctionTemplate>(), | | Local<FunctionTemplate> getter = Local<FunctionTemplate>(), | |
| Local<FunctionTemplate> setter = Local<FunctionTemplate>(), | | Local<FunctionTemplate> setter = Local<FunctionTemplate>(), | |
| PropertyAttribute attribute = None, | | PropertyAttribute attribute = None, | |
| AccessControl settings = DEFAULT); | | AccessControl settings = DEFAULT); | |
| | | | |
|
| | | /** | |
| | | * Whenever the property with the given name is accessed on objects | |
| | | * created from this Template the getter and setter callbacks | |
| | | * are called instead of getting and setting the property directly | |
| | | * on the JavaScript object. | |
| | | * | |
| | | * \param name The name of the property for which an accessor is added. | |
| | | * \param getter The callback to invoke when getting the property. | |
| | | * \param setter The callback to invoke when setting the property. | |
| | | * \param data A piece of data that will be passed to the getter and sett | |
| | | er | |
| | | * callbacks whenever they are invoked. | |
| | | * \param settings Access control settings for the accessor. This is a bi | |
| | | t | |
| | | * field consisting of one of more of | |
| | | * DEFAULT = 0, ALL_CAN_READ = 1, or ALL_CAN_WRITE = 2. | |
| | | * The default is to not allow cross-context access. | |
| | | * ALL_CAN_READ means that all cross-context reads are allowed. | |
| | | * ALL_CAN_WRITE means that all cross-context writes are allowed. | |
| | | * The combination ALL_CAN_READ | ALL_CAN_WRITE can be used to allow al | |
| | | l | |
| | | * cross-context access. | |
| | | * \param attribute The attributes of the property for which an accessor | |
| | | * is added. | |
| | | * \param signature The signature describes valid receivers for the acces | |
| | | sor | |
| | | * and is used to perform implicit instance checks against them. If the | |
| | | * receiver is incompatible (i.e. is not an instance of the constructor | |
| | | as | |
| | | * defined by FunctionTemplate::HasInstance()), an implicit TypeError i | |
| | | s | |
| | | * thrown and no callback is invoked. | |
| | | */ | |
| | | void SetNativeDataProperty(Local<String> name, | |
| | | AccessorGetterCallback getter, | |
| | | AccessorSetterCallback setter = 0, | |
| | | // TODO(dcarney): gcc can't handle Local below | |
| | | Handle<Value> data = Handle<Value>(), | |
| | | PropertyAttribute attribute = None, | |
| | | Local<AccessorSignature> signature = | |
| | | Local<AccessorSignature>(), | |
| | | AccessControl settings = DEFAULT); | |
| | | | |
| | | // This function is not yet stable and should not be used at this time. | |
| | | bool SetDeclaredAccessor(Local<String> name, | |
| | | Local<DeclaredAccessorDescriptor> descriptor, | |
| | | PropertyAttribute attribute = None, | |
| | | Local<AccessorSignature> signature = | |
| | | Local<AccessorSignature>(), | |
| | | AccessControl settings = DEFAULT); | |
| | | | |
| private: | | private: | |
| Template(); | | Template(); | |
| | | | |
| friend class ObjectTemplate; | | friend class ObjectTemplate; | |
| friend class FunctionTemplate; | | friend class FunctionTemplate; | |
| }; | | }; | |
| | | | |
| template<typename T> | | template<typename T> | |
| class ReturnValue { | | class ReturnValue { | |
| public: | | public: | |
| | | | |
| skipping to change at line 3375 | | skipping to change at line 3420 | |
| */ | | */ | |
| void SetAccessor(Handle<String> name, | | void SetAccessor(Handle<String> name, | |
| AccessorGetterCallback getter, | | AccessorGetterCallback getter, | |
| AccessorSetterCallback setter = 0, | | AccessorSetterCallback setter = 0, | |
| Handle<Value> data = Handle<Value>(), | | Handle<Value> data = Handle<Value>(), | |
| AccessControl settings = DEFAULT, | | AccessControl settings = DEFAULT, | |
| PropertyAttribute attribute = None, | | PropertyAttribute attribute = None, | |
| Handle<AccessorSignature> signature = | | Handle<AccessorSignature> signature = | |
| Handle<AccessorSignature>()); | | Handle<AccessorSignature>()); | |
| | | | |
|
| // This function is not yet stable and should not be used at this time. | | | |
| bool SetAccessor(Handle<String> name, | | | |
| Handle<DeclaredAccessorDescriptor> descriptor, | | | |
| AccessControl settings = DEFAULT, | | | |
| PropertyAttribute attribute = None, | | | |
| Handle<AccessorSignature> signature = | | | |
| Handle<AccessorSignature>()); | | | |
| | | | |
| /** | | /** | |
| * Sets a named property handler on the object template. | | * Sets a named property handler on the object template. | |
| * | | * | |
| * Whenever a named property is accessed on objects created from | | * Whenever a named property is accessed on objects created from | |
| * this object template, the provided callback is invoked instead of | | * this object template, the provided callback is invoked instead of | |
| * accessing the property directly on the JavaScript object. | | * accessing the property directly on the JavaScript object. | |
| * | | * | |
| * \param getter The callback to invoke when getting a property. | | * \param getter The callback to invoke when getting a property. | |
| * \param setter The callback to invoke when setting a property. | | * \param setter The callback to invoke when setting a property. | |
| * \param query The callback to invoke to check if a property is present, | | * \param query The callback to invoke to check if a property is present, | |
| | | | |
End of changes. 4 change blocks. |
| 13 lines changed or deleted | | 56 lines changed or added | |
|