Thanks a lot.
This explains the code completely.
For me it's strange to have an abstraction of handle with tight
coupling to the internal implementation of handles. Guess this is done
due to perfomance reasons.

On Apr 1, 5:07 pm, Anton Muhin <[email protected]> wrote:
> Sorry about assert, it's in internal handles (v8::internal::Handle).
>
> Despite it's name val_ in v8::Handle is actually
> v8::internal::Object** ---it's a location where a pointer to actual v8
> object is stored.  v8's garbage collector is aware of all such handles
> and would update v8::internal::Object* pointers when object is moved.
>
> To see the problem you need the code like that (sorry, is not tested).
>
> Local handleA(some object);
> Local handleB(*handleA);
>
> with your change handleA != handleB (as they use different locations
> to store pointers---their val_ should be different).  W/o handleA ==
> handleB as both point to the same object.
>
> yours,
> anton.

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

To unsubscribe, reply using "remove me" as the subject.

Reply via email to