[Webkit-unassigned] [Bug 146278] [Streams API] Remove use of JSC::Strong as much as possible

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 24 11:28:02 PDT 2015


https://bugs.webkit.org/show_bug.cgi?id=146278

--- Comment #4 from Darin Adler <darin at apple.com> ---
(In reply to comment #2)
> It is suggested to use GC marking.
> I am not yet very familiar with it.

First of all, I think the main thing to do is to actually make test cases that reproduce these reference cycles to ensure the objects aren’t leaked. I’m not sure exactly what the best way to make such tests is, but it seems even more important to do that than to fix the bugs, so we don’t introduce the bugs in the future.

Marking is relatively straightforward.

The class needs to have the JSCustomMarkFunction attribute in the IDL. Then custom wrapper code needs to implement a visitAdditionalChildren function. The function then needs to call addOpaqueRoot on each object we need to keep alive. Some examples to look at are JSXMLHttpRequest::visitAdditionalChildren and JSTreeWalker::visitAdditionalChildren.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150624/175b0c3e/attachment-0001.html>


More information about the webkit-unassigned mailing list