[webkit-reviews] review granted: [Bug 96034] Add new JSDependentRetained that allows keeping a JSObject alive as long as another is alive : [Attachment 162609] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 6 16:40:26 PDT 2012


Geoffrey Garen <ggaren at apple.com> has granted Elliott Sprehn
<esprehn at chromium.org>'s request for review:
Bug 96034: Add new JSDependentRetained that allows keeping a JSObject alive as
long as another is alive
https://bugs.webkit.org/show_bug.cgi?id=96034

Attachment 162609: Patch
https://bugs.webkit.org/attachment.cgi?id=162609&action=review

------- Additional Comments from Geoffrey Garen <ggaren at apple.com>
Adding and deleting a property will have the negative side-effect of making the
node wrappers uncollectable until the nodes are removed from the document, and
of allocating extra structures, one per node wrapper.

If this is common, another possible solution is for JSDependentRetained to
implement the WeakHandleOwner interface, save "owner" as its context, and
implement "isReachableFromOpaqueRoots" to test whether "owner" has been marked.
This will achieve the same lifetime semantics without the other costs.


More information about the webkit-reviews mailing list