[V8] Keep TextTrackList alive as long as its owner is alive
Created attachment 146306 [details] Patch
This is a stop gap solution for TextTrackList. The end solution is to do use V8GCController but I haven't gotten that to work reliably.
Comment on attachment 146306 [details] Patch Ok. Can you add a FIXME to explain the right way of doing this?
Comment on attachment 146306 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=146306&action=review > Source/WebCore/bindings/v8/custom/V8TextTrackListCustom.cpp:48 > + Node* element = impl->owner(); May TextTrackList change owners?
(In reply to comment #4) > (From update of attachment 146306 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=146306&action=review > > > Source/WebCore/bindings/v8/custom/V8TextTrackListCustom.cpp:48 > > + Node* element = impl->owner(); > > May TextTrackList change owners? No. TextTrack objects may change owners but the TextTrackList itself doesn't change owner.
Comment on attachment 146306 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=146306&action=review >>> Source/WebCore/bindings/v8/custom/V8TextTrackListCustom.cpp:48 >>> + Node* element = impl->owner(); >> >> May TextTrackList change owners? > > No. TextTrack objects may change owners but the TextTrackList itself doesn't change owner. I see, great. May one reach owner of TextTrackList from the item via JS DOM API?
(In reply to comment #6) > (From update of attachment 146306 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=146306&action=review > > >>> Source/WebCore/bindings/v8/custom/V8TextTrackListCustom.cpp:48 > >>> + Node* element = impl->owner(); > >> > >> May TextTrackList change owners? > > > > No. TextTrack objects may change owners but the TextTrackList itself doesn't change owner. > > I see, great. May one reach owner of TextTrackList from the item via JS DOM API? No, there is no way to get to the owner from the TextTrackList in JS. (See TextTrackList.idl etc for details)
(In reply to comment #7) > (In reply to comment #6) > > (From update of attachment 146306 [details] [details]) > > View in context: https://bugs.webkit.org/attachment.cgi?id=146306&action=review > > > > >>> Source/WebCore/bindings/v8/custom/V8TextTrackListCustom.cpp:48 > > >>> + Node* element = impl->owner(); > > >> > > >> May TextTrackList change owners? > > > > > > No. TextTrack objects may change owners but the TextTrackList itself doesn't change owner. > > > > I see, great. May one reach owner of TextTrackList from the item via JS DOM API? > > No, there is no way to get to the owner from the TextTrackList in JS. (See TextTrackList.idl etc for details) Great, then LGTM too.
(In reply to comment #3) > (From update of attachment 146306 [details]) > Ok. Can you add a FIXME to explain the right way of doing this? Sorry, I thought I replied to this already. We have this pattern in a few places already and we have open bugs to let V8GCController handle these using implicit references.
> We have this pattern in a few places already and we have open bugs to let V8GCController handle these using implicit references. Ok. :)
Comment on attachment 146306 [details] Patch Clearing flags on attachment: 146306 Committed r119853: <http://trac.webkit.org/changeset/119853>
All reviewed patches have been landed. Closing bug.