On 2013/04/23 16:08:52, marja wrote:
https://codereview.chromium.org/14007008/diff/32001/include/v8.h
File include/v8.h (right):
https://codereview.chromium.org/14007008/diff/32001/include/v8.h#newcode3159
include/v8.h:3159: void SetReferenceFromGroup(UniqueId id,
On 2013/04/23 15:25:15, Yury Semikhatsky wrote:
> I've just realized that this change will affect heap snapshots. Implicit
> references are used to report links from DOM Node wrappers to event
listeners
> and with the current API when you take a heap snapshot you see which
specific
> node retains the listener. But with the new API you will see a link
from a
> random representative from the group to the event listener which may be
> confusing. Can we change this method to accept "const
Persistent<Value>&" as
> source of the reference to supply exact element that retains the target?
For implicit references which are not about event listeners:
V8GCController
(the
current impl) selects a "representative object" (which is basically
arbitrary,
since it selects the first object, and the sorting doesn't specify order
for 2
objects in the same color group) for each object group, and attaches the
implicit references to it (see the usage of m_rootGroupMap).
However, for "object and event listeners", we create a separate object
group
for
the object and attach implicit references to that group. So it should just
work;
there's only 1 object in the object group.
The object can then be part of another object group, nothing forbids
that, but
for the group that references the event listeners, there is only a
one-object
group. This group is then ignored by GlobalHandles, and only the impl
references
are extracted, so the users of GlobalHandles don't even see it. From their
point
of view, nothing has changed.
(This all is in the Blink side of the patch.)
But what will happen if the one-object group that references the event
listeners
will have the same id as another group with more than 1 element (in case
when
the object with event listeners is a root of some detached DOM tree for
example)?
https://codereview.chromium.org/14007008/
--
--
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/groups/opt_out.