Hello Stephan,

> While i've never done this, you can create your own global object from your
> own template, which should allow you to use internal fields with the global
> object. You cannot set the number of internal fields on an Object, only on a
> Template.
>

Yes, I am creating my own global object from my own template, like
this:

        HandleScope scope;
        Handle<ObjectTemplate> global = ObjectTemplate::New();
        Persistent<Context> context = Context::New(NULL, global);
        Context::Scope contextScope(context);
What I was afraid is that, since the global objext is kindof 'special'
V8 could internally use some internal fields of the global object.
Hence my question

> See FunctionTemplate::New(). It takes a (vaguely undocumented) parameter
> called "data". That "data" value can then be fetched from the Arguments
> object when the callback is actually called. Or at least that's what it
> APPEARS to do.
>
> Set the "data" 
> handle:http://code.google.com/p/v8-juice/source/browse/convert/include/cvv8/...
> Use it in the 
> callback:http://code.google.com/p/v8-juice/source/browse/convert/include/cvv8/...

Wow, was it intended for that purpose? I have seen this parameter, but
didn't know what it is for.

Thanks
Alex


>
> --
> ----- stephan bealhttp://wanderinghorse.net/home/stephan/

-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users

Reply via email to