On Wed, Apr 29, 2009 at 10:48 PM, Aaron Boodman <[email protected]> wrote:

> On Wed, Apr 29, 2009 at 7:41 PM, Mike Belshe <[email protected]> wrote:
> > On Wed, Apr 29, 2009 at 6:47 PM, Marshall Greenblatt
> >> 3. Is there a way to specify native getter/setter functions for a
> property
> >> defined on the JS side?  For instance, "myobject.foo = bar" would
> somehow
> >> call a natively defined "setFoo" function with the "bar" argument.  If
> this
> >> isn't possible, are there any plans to support native properties
> directly?
> >
> > No plans to do that.  Keep in mind that exposing C++ directly to JS
> should
> > be done with great care.  Remember you're expanding the surface area of
> > attack.
>
> There are extensive C++ APIs to V8 do this kind of thing at minute
> levels of detail. What Extensions are providing are a simple and
> powerful high-level API to bridge a JS frontend to a C++ backend. You
> write your beautiful JavaScripty API in JS, and funnel all the calls
> down to these native functions.
>
> If you want the kind of control you're talking about, you could use v8
> directly:
> http://code.google.com/apis/v8/intro.html


Speaking of V8 APIs, I notice that v8::FunctionTemplate::New() takes a
Handle<Value> |data| attribute as the second parameter.  Is it correct to
assume that this Handle<Value> can later be retrieved by the
InvocationCallback function via a call to Arguments::Data()?  If so, is
there some easy way that I could transport an arbitrary void pointer
(representing state information) within that Handle<Value>?


> <http://code.google.com/apis/v8/intro.html>
>
> - a


Thanks,
Marshall

--~--~---------~--~----~------------~-------~--~----~
Chromium Developers mailing list: [email protected] 
View archives, change email options, or unsubscribe: 
    http://groups.google.com/group/chromium-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to