Bug 88541 - [V8] Keep TextTrackList alive as long as its owner is alive
Summary: [V8] Keep TextTrackList alive as long as its owner is alive
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Erik Arvidsson
URL:
Keywords:
Depends on:
Blocks: 73865
  Show dependency treegraph
 
Reported: 2012-06-07 09:25 PDT by Erik Arvidsson
Modified: 2012-06-08 12:05 PDT (History)
8 users (show)

See Also:


Attachments
Patch (8.19 KB, patch)
2012-06-07 09:28 PDT, Erik Arvidsson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Erik Arvidsson 2012-06-07 09:25:30 PDT
[V8] Keep TextTrackList alive as long as its owner is alive
Comment 1 Erik Arvidsson 2012-06-07 09:28:33 PDT
Created attachment 146306 [details]
Patch
Comment 2 Erik Arvidsson 2012-06-07 09:30:13 PDT
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 3 Adam Barth 2012-06-07 16:49:19 PDT
Comment on attachment 146306 [details]
Patch

Ok.  Can you add a FIXME to explain the right way of doing this?
Comment 4 anton muhin 2012-06-08 07:37:08 PDT
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?
Comment 5 Erik Arvidsson 2012-06-08 09:43:55 PDT
(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 6 anton muhin 2012-06-08 09:56:42 PDT
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?
Comment 7 Erik Arvidsson 2012-06-08 10:30:18 PDT
(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)
Comment 8 anton muhin 2012-06-08 10:31:59 PDT
(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.
Comment 9 Erik Arvidsson 2012-06-08 11:16:21 PDT
(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.
Comment 10 Adam Barth 2012-06-08 11:41:56 PDT
> We have this pattern in a few places already and we have open bugs to let V8GCController handle these using implicit references.

Ok.  :)
Comment 11 WebKit Review Bot 2012-06-08 12:05:35 PDT
Comment on attachment 146306 [details]
Patch

Clearing flags on attachment: 146306

Committed r119853: <http://trac.webkit.org/changeset/119853>
Comment 12 WebKit Review Bot 2012-06-08 12:05:41 PDT
All reviewed patches have been landed.  Closing bug.