Re: [v8-users] The most efficient way to store private values

2016-05-05 Thread Jochen Eisinger
You don't have to use ForApi() to create privates, you can create the once and then keep them around as keys. Another alternative is to maintain a weak map from the objects to your properties. On Thu, May 5, 2016 at 2:46 PM Danny Dorfman wrote: > Hello there, > > I am looking for a time-efficie

Re: [v8-users] Build issues - How can I build v8 with my system toolchain?

2016-05-05 Thread Jochen Eisinger
If you use gyp directly, then you should bypass the top-level Makefile, i.e., run make -C out all On Thu, May 5, 2016 at 7:20 PM rwy wrote: > I'm having trouble building v8 on Archlinux x86-64. The clang installed by > gclient cannot run on my system. What is the proper way to configure the >

Re: [v8-users] NewInstance failing when ObjectTemplate has a Date member

2016-05-05 Thread Jochen Eisinger
You can only set primitive values and other templates on templates. If you want a non-primitive value, you can either use a "native data property" or install a getter / setter. V8 5.2 and later will CHECK() if you try to set anything else. On Fri, May 6, 2016 at 6:53 AM bald...@magna.com.au wrote

[v8-users] NewInstance failing when ObjectTemplate has a Date member

2016-05-05 Thread bald...@magna.com.au
Please see the following code. I want to add a JS Date to a Object available in the global object. This works with a older version (4.9.385.28) but fails with (5.0.71.33)... see output g++ -I/usr/local core.c -o testCore -ldl -pthread -std=c++0x -lv8 -lv8_libplatform -lv8_libbase core.c: #inc

[v8-users] Build issues - How can I build v8 with my system toolchain?

2016-05-05 Thread rwy
I'm having trouble building v8 on Archlinux x86-64. The clang installed by gclient cannot run on my system. What is the proper way to configure the build to use my system's toolchain? The error: v8/third_party/llvm-build/Release+Asserts/bin/clang++: error while loading shared libraries: libt

[v8-users] The most efficient way to store private values

2016-05-05 Thread Danny Dorfman
Hello there, I am looking for a time-efficient way to store private (hidden) values in an object. I get key-value pairs (where key is of type v8::String and value of type v8::Value), and I need to attach them to existing objects. What I came up with so far - is using v8::Object's SetPrivate() f