Re: [v8-users] Segmentation fault when creating new v8 context.

2013-02-22 Thread Stephan Beal
On Thu, Feb 21, 2013 at 3:44 PM, Sven Panne svenpa...@chromium.org wrote:

 I don't even know what to compile from
 https://code.google.com/p/v8-juice/source/browse/, the trunk seems to be
 out of date, it uses e.g. GetPointerFromInternalField and friends which are
 not part of v8's external API anymore.


The main project tree there is historical and no longer maintained. Only
the /convert directory (the one i sent the links to) is current vis-a-vis
v8's API (or was, until 2 days ago), and we removed
GetPointerFromInternalField() from it over the holidays because its
deprecation/behaviour change broke our class-binding mechanism.

Note that we are really willing to help embedders, but digging through
 someone else's code with only vague hints is a huge waste of time.


As is digging through v8 to find what v8 changes broke our (unchanged)
code. So nobody wins.

While trying to create a reproducible test case for you, i found 2 things:

a) the Hello World example in the v8 docs no longer compile due to API
changes. https://developers.google.com/v8/get_started

b) the assertion problem has magically disappeared in the meantime (using
r13713).

 Another hint: The external v8 API is undergoing some changes, mainly
making the
 use of an Isolate explicit and mandatory

Where can we find documentation on how to do this? i'm currently looking
over the v8 docs (https://developers.google.com/v8/) and i see neither hide
nor hair of Isolates.

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
v8-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[v8-users] GetPointerFromInternalField deprecated?

2013-02-22 Thread Flying Jester
I recently updated the version of V8 I build my project against, and I was 
greeted with a new warning:

warning: ‘void* v8::Object::GetPointerFromInternalField(int)’ is deprecated

I've seen the 'aligned' version of this function, 
GetAlignedPointerInInternalField. How would I go about replacing my usage 
of GetPointerFromInternalField with this new function? I don't use the 
setter function, I'm using GetPointerFromInternalField to get a C++ side 
object from JS functions, like this:

v8::Localv8::Object color = v8::Localv8::Object::Cast(args[0]);

TS_Color* c = (TS_Color*)color-GetPointerFromInternalField(0);

This obviously doesn't work with a 1 to 1 replacement with the aligned 
version of the function.

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
v8-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [v8-users] GetPointerFromInternalField deprecated?

2013-02-22 Thread Stephan Beal
On Fri, Feb 22, 2013 at 11:26 PM, Flying Jester foolkingcr...@gmail.comwrote:

 This obviously doesn't work with a 1 to 1 replacement with the aligned
 version of the function.


Welcome to the club :). What i ended up doing (because the Aligned version
kept inexplicably asserting when given pointers allocated with (new T)),
was to use an explicit v8::External wrapper to hold my pointer and
replacing the PointerTo/FromInternalField calls with the normal
InternalFields calls.

Example usages:
set:
https://code.google.com/p/v8-juice/source/browse/convert/include/cvv8/ClassCreator.hpp#776
get:
https://code.google.com/p/v8-juice/source/browse/convert/include/cvv8/ClassCreator.hpp#603

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
v8-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.