I assume any of these:
typedef Handle<Value> (*InvocationCallback)(const Arguments& args);
typedef int (*LookupCallback)(Local<Object> self, Local<String> name);
/**
* Accessor[Getter|Setter] are used as callback functions when
* setting|getting a particular property. See objectTemplate::SetAccessor.
*/
typedef Handle<Value> (*AccessorGetter)(Local<String> property,
const AccessorInfo& info);
typedef void (*AccessorSetter)(Local<String> property,
Local<Value> value,
const AccessorInfo& info);
/**
* NamedProperty[Getter|Setter] are used as interceptors on object.
* See ObjectTemplate::SetNamedPropertyHandler.
*/
typedef Handle<Value> (*NamedPropertyGetter)(Local<String> property,
const AccessorInfo& info);
/**
* Returns the value if the setter intercepts the request.
* Otherwise, returns an empty handle.
*/
typedef Handle<Value> (*NamedPropertySetter)(Local<String> property,
Local<Value> value,
const AccessorInfo& info);
/**
* Returns a non-empty handle if the interceptor intercepts the request.
* The result is true if the property exists and false otherwise.
*/
typedef Handle<Boolean> (*NamedPropertyQuery)(Local<String> property,
const AccessorInfo& info);
/**
* Returns a non-empty handle if the deleter intercepts the request.
* The return value is true if the property could be deleted and false
* otherwise.
*/
typedef Handle<Boolean> (*NamedPropertyDeleter)(Local<String> property,
const AccessorInfo& info);
/**
* Returns an array containing the names of the properties the named
* property getter intercepts.
*/
typedef Handle<Array> (*NamedPropertyEnumerator)(const AccessorInfo& info);
/**
* Returns the value of the property if the getter intercepts the
* request. Otherwise, returns an empty handle.
*/
typedef Handle<Value> (*IndexedPropertyGetter)(uint32_t index,
const AccessorInfo& info);
/**
* Returns the value if the setter intercepts the request.
* Otherwise, returns an empty handle.
*/
typedef Handle<Value> (*IndexedPropertySetter)(uint32_t index,
Local<Value> value,
const AccessorInfo& info);
/**
* Returns a non-empty handle if the interceptor intercepts the request.
* The result is true if the property exists and false otherwise.
*/
typedef Handle<Boolean> (*IndexedPropertyQuery)(uint32_t index,
const AccessorInfo& info);
/**
* Returns a non-empty handle if the deleter intercepts the request.
* The return value is true if the property could be deleted and false
* otherwise.
*/
typedef Handle<Boolean> (*IndexedPropertyDeleter)(uint32_t index,
const AccessorInfo& info);
/**
* Returns an array containing the indices of the properties the
* indexed property getter intercepts.
*/
typedef Handle<Array> (*IndexedPropertyEnumerator)(const AccessorInfo& info);
/**
* Returns true if cross-context access should be allowed to the named
* property with the given key on the host object.
*/
typedef bool (*NamedSecurityCallback)(Local<Object> host,
Local<Value> key,
AccessType type,
Local<Value> data);
/**
* Returns true if cross-context access should be allowed to the indexed
* property with the given index on the host object.
*/
typedef bool (*IndexedSecurityCallback)(Local<Object> host,
uint32_t index,
AccessType type,
Local<Value> data);
Not so sure about
typedef void (*FatalErrorCallback)(const char* location, const char* message);
typedef int* (*CounterLookupCallback)(const char* name);
typedef void* (*CreateHistogramCallback)(const char* name,
int min,
int max,
size_t buckets);
typedef void (*AddHistogramSampleCallback)(void* histogram, int sample);
// --- F a i l e d A c c e s s C h e c k C a l l b a c k ---
typedef void (*FailedAccessCheckCallback)(Local<Object> target,
AccessType type,
Local<Value> data);
typedef void (*MessageCallback)(Handle<Message> message, Handle<Value>
data);
typedef void (*GCPrologueCallback)(GCType type, GCCallbackFlags flags);
typedef void (*GCEpilogueCallback)(GCType type, GCCallbackFlags flags);
typedef void (*GCCallback)();
// --- C o n t e x t G e n e r a t o r ---
/**
* Applications must provide a callback function which is called to generate
* a context if a context was not deserialized from the snapshot.
*/
typedef Persistent<Context> (*ContextGenerator)();
On Thu, Mar 25, 2010 at 11:08 AM, Stephan Beal <[email protected]>wrote:
> On Thu, Mar 25, 2010 at 8:09 AM, Matthias Ernst
> <[email protected]>wrote:
>
>> Some more discussion here:
>>
>>
>> http://groups.google.com/group/v8-users/browse_thread/thread/cbaa207e92644ce1/dd3b5909be743457
>>
>
> From that thread:
>
> On Feb 19 2009, 11:22 am, Ondrej Zara <[email protected]> wrote:
> > > Having a HandleScope in a function called should be the general rule as
> > > otherwise all handles created will get "stuck" in some outer
> HandleScope
> > > causing them to stay alive longer than expected.
> >
> > But this is only true for non-callback functions, because those
> > specified as argument to FunctionTemplate receive a handle scope
> > automatically, correct?
>
> What exactly is the definition of "callback" here? i understand it to mean
> v8::InvocableCallback and property accessors/mutators (i.e., anything the
> client can bind to v8 which v8 will in turn call). Is that a reasonable
> definition, or am i way off?
>
> --
> ----- stephan beal
> http://wanderinghorse.net/home/stephan/
>
> --
> v8-users mailing list
> [email protected]
> http://groups.google.com/group/v8-users
>
> To unsubscribe from this group, send email to v8-users+
> unsubscribegooglegroups.com or reply to this email with the words "REMOVE
> ME" as the subject.
>
--
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
To unsubscribe from this group, send email to
v8-users+unsubscribegooglegroups.com or reply to this email with the words
"REMOVE ME" as the subject.