On 2014/06/02 21:11:04, dcarney wrote:
> I looked at this harder and I don't see any place that this requirement
is
> codified.
In the garbage collector. Without an explicit visitor that ignores that
field,
it will be relocated.
It sounds like there's something being lost in this discussion. |data| is
being
transformed into a v8::internal::Foreign by the SET_FIELD_WRAPPED macro.
Foreign
is already a HeapObject with explicit GC code attached
(ForeignIterateBody). In
fact, this is the same thing used by v8::External, but that's wrapped in the
internal field of a JSObject before being passed back through the API. I'm
simply skipping the JSObject wrapper.
I apologize if I'm being dense, but from what I can tell storing a Foreign
in
|data| is completely safe. Clearly, storing a void* directly would not be.
> > As for re-using CallHandlerInfo: I at first started to write a new
Struct
for
> > this, but CallHandlerInfo seemed so close to what I needed
In a way CallHandlerInfo is exactly what you want. So I'd say use it.
If you
want to wrap the void* up in External internally, that's fine with me.
https://codereview.chromium.org/306053003/
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.