Bug 110413
| Summary: | [v8] opaqueRootForGC should allow adding multiple roots for a single wrapper | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Adam Klein <adamk> |
| Component: | WebCore Misc. | Assignee: | Adam Klein <adamk> |
| Status: | RESOLVED INVALID | ||
| Severity: | Normal | CC: | abarth, andersca, haraken |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Adam Klein
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Adam Barth
I'd be inclined to wait for a second consumer to help us figure out what the best design is here.
Adam Klein
Seems reasonable, will put this on the back burner for now.
Anders Carlsson
V8 is gone.