ma...@chromium.org
unread,Apr 23, 2013, 12:08:52 PM4/23/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sven...@chromium.org, mstar...@chromium.org, yu...@chromium.org, v8-...@googlegroups.com, loi...@chromium.org, al...@chromium.org, yu...@chromium.org
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.)
https://codereview.chromium.org/14007008/