Re: [v8-users] Re: How can functions be added to instance templates?

2016-02-05 Thread vmjoshi
When I try to use Template::SetAccessorProperty, the arguments are not passed into the FunctionCallbackInfo. On Friday, February 5, 2016 at 12:18:49 AM UTC-8, Jochen Eisinger wrote: > > You'd install the FunctionTemplate on the instance_tmpl as a getter of an > accessor property > > hth >

Re: [v8-users] Re: How can functions be added to instance templates?

2016-02-05 Thread Jochen Eisinger
You'd install the FunctionTemplate on the instance_tmpl as a getter of an accessor property hth -jochen On Fri, Feb 5, 2016 at 5:35 AM Zac Hansen wrote: > > > On Thursday, February 4, 2016 at 12:44:39 PM UTC-8, vmj...@extrahop.com > wrote: >> >> This recent commit 6a118774 >>

Re: [v8-users] Re: How to get the original type on a native c++ object from v8::Object's internal fields?

2016-02-05 Thread Jochen Eisinger
In Blink, we store a pointer to a wrapper type info, and the void* on the object. The wrapper type info struct is used to determine the type of the void*. We also have some code that decides when you actually want to have type S* but the void* points to a T* whether it's safe to cast from T* to

Re: [v8-users] Re: How can functions be added to instance templates?

2016-02-05 Thread vmjoshi
I figured out the solution. The FunctionTemplate itself should be set on the instance template rather than the function. On Friday, February 5, 2016 at 10:54:23 AM UTC-8, vmj...@extrahop.com wrote: > > When I try to use Template::SetAccessorProperty, the arguments are not > passed into the

Re: [v8-users] Re: How to get the original type on a native c++ object from v8::Object's internal fields?

2016-02-05 Thread Zac Hansen
can you point me to that code? On Fri, Feb 5, 2016 at 12:11 AM, Jochen Eisinger wrote: > In Blink, we store a pointer to a wrapper type info, and the void* on the > object. The wrapper type info struct is used to determine the type of the > void*. We also have some code

Re: [v8-users] Building static libraries on linux

2016-02-05 Thread Jakob Kummerow
https://github.com/v8/v8/wiki/Getting%20Started%20with%20Embedding#run-the-example has an example linking command line. Does that not work? What errors does it produce? On Fri, Feb 5, 2016 at 12:32 PM, Jonas Minnberg wrote: > I'm trying to use the libv8_*.a libraries on

Re: [v8-users] Re: How to get the original type on a native c++ object from v8::Object's internal fields?

2016-02-05 Thread Zac Hansen
I think I did find it in WrapperTypeInfo.h. And while I don't understand exactly how it works, I'm guessing it requires each class that contains a static WrapperTypeInfo to configure it in such a way that it can retrieve information like what derived classes are and such? I'm trying to write

[v8-users] Building static libraries on linux

2016-02-05 Thread Jonas Minnberg
I'm trying to use the libv8_*.a libraries on linux but running into a lot of trouble. First I tried the Ubuntu package, but it is missing libv8_libplatform.a Then I tried building from source, which works fine, but uses it's own build of clang so I had linking problems. Then I got it to build