RESOLVED INVALID110413
[v8] opaqueRootForGC should allow adding multiple roots for a single wrapper
https://bugs.webkit.org/show_bug.cgi?id=110413
Summary [v8] opaqueRootForGC should allow adding multiple roots for a single wrapper
Adam Klein
Reported 2013-02-20 17:08:13 PST
There's one instance of this so far, which is that MutationObservers need to make each of their registered nodes an opaque root (see V8GCController.cpp). So first, is this indeed worth doing, as the FIXME I added claims? Or is this really the only case that needs this feature? And if it is worthwhile, I can think of two possible approaches: 1) Pass some sort of slimmed-down WrapperGrouper interface into opaqueRootForGC() and let each class add one or more opaque roots. The main downside here is that it pushes complexity down into WrapperTypeInfo and the wrapper classes. 2) Return a Vector<void*, 1> (or pass one by reference). This keeps the leaf classes a little simpler, at the possible cost of a few more allocations.
Attachments
Adam Barth
Comment 1 2013-02-21 11:51:26 PST
I'd be inclined to wait for a second consumer to help us figure out what the best design is here.
Adam Klein
Comment 2 2013-02-21 12:14:57 PST
Seems reasonable, will put this on the back burner for now.
Anders Carlsson
Comment 3 2013-09-25 08:32:37 PDT
V8 is gone.
Note You need to log in before you can comment on or make changes to this bug.