Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(931)

Issue 244493002: Oilpan: add transition types to track interface objects. (Closed)

Created:
6 years, 8 months ago by sof
Modified:
6 years, 8 months ago
CC:
blink-reviews, kouhei+bindings_chromium.org, fs, eric.carlson_apple.com, nessy, adamk+blink_chromium.org, ojan, Nils Barth (inactive), arv+blink, abarth-chromium, marja+watch_chromium.org, dglazkov+blink, gavinp+loader_chromium.org, Mads Ager (chromium), philipj_slow, feature-media-reviews_chromium.org, Nate Chapin, vcarbune.chromium, jsbell+bindings_chromium.org, gasubic, Inactive, kouhei+heap_chromium.org, watchdog-blink-watchlist_google.com
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Oilpan: add transition types to track interface objects. With Oilpan enabled, make TextTrack, TextTrackCue, VTTCue, TextTrackList, TextTrackCueList, VTTRegion, VTTRegionList and VTTParser garbage collected objects. Along with doing so, the references between these objects are now (strong) Member references, and not asymmetric RefPtr+raw pointer pairs needed to break cycles. This means these inter-related objects will live and die together. Simpler to reason about, and prevents problematic cases where if a "child" object (e.g., a text track cue object) is held onto longer than its parent track object (or its track list), you'd be unable to keep those "parent" objects alive. The best we can currently do without Oilpan strong member references is to clear out the raw back pointers upon destructing the parent. And we still do in the non-Oilpan case. R=haraken@chromium.org,ager@chromium.org BUG=340522 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=172365

Patch Set 1 #

Total comments: 22

Patch Set 2 : Explicitly dispose of TextTrackList + fix handling of {Inband,Loadable}TextTrack #

Total comments: 13

Patch Set 3 : More pointer-clearing improvements #

Patch Set 4 : Rebased #

Total comments: 12

Patch Set 5 : Use Member refs on HTMLMediaElement, not Persistents. #

Patch Set 6 : Add missing tracing to HTMLTrackElement. #

Total comments: 15

Patch Set 7 : Remove use & defn of RawPtrWillBePersistent transition type. #

Patch Set 8 : Reinstitute explicit clearing of owners in the non-oilpan case #

Total comments: 21

Patch Set 9 : Have LoadableTextTrack keep a member reference to its track element; weak for now. #

Patch Set 10 : Add crbug.com/365260 crashing test + expectation #

Unified diffs Side-by-side diffs Delta from patch set Stats (+328 lines, -148 lines) Patch
M LayoutTests/TestExpectations View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
A LayoutTests/media/track/tracklist-is-reachable-no-crash.html View 1 2 3 4 5 6 7 8 9 1 chunk +40 lines, -0 lines 0 comments Download
A LayoutTests/media/track/tracklist-is-reachable-no-crash-expected.txt View 1 2 3 4 5 6 7 8 9 1 chunk +11 lines, -0 lines 0 comments Download
M Source/bindings/v8/Dictionary.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/v8/Dictionary.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/HTMLMediaElement.h View 1 2 3 4 5 chunks +14 lines, -12 lines 0 comments Download
M Source/core/html/HTMLMediaElement.cpp View 1 2 3 4 5 6 7 8 14 chunks +20 lines, -16 lines 0 comments Download
M Source/core/html/HTMLTrackElement.h View 1 2 3 4 5 3 chunks +4 lines, -1 line 0 comments Download
M Source/core/html/HTMLTrackElement.cpp View 1 2 3 4 5 6 7 2 chunks +8 lines, -0 lines 0 comments Download
M Source/core/html/track/InbandTextTrack.h View 1 2 chunks +2 lines, -1 line 0 comments Download
M Source/core/html/track/InbandTextTrack.cpp View 1 2 3 4 5 6 7 4 chunks +11 lines, -3 lines 0 comments Download
M Source/core/html/track/LoadableTextTrack.h View 1 2 3 4 5 6 7 8 4 chunks +11 lines, -4 lines 0 comments Download
M Source/core/html/track/LoadableTextTrack.cpp View 1 2 3 4 5 6 7 8 5 chunks +15 lines, -4 lines 0 comments Download
M Source/core/html/track/TextTrack.h View 1 2 3 4 chunks +11 lines, -13 lines 0 comments Download
M Source/core/html/track/TextTrack.cpp View 1 2 3 4 5 6 7 6 chunks +17 lines, -8 lines 0 comments Download
M Source/core/html/track/TextTrack.idl View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/track/TextTrackCue.h View 1 2 3 3 chunks +6 lines, -3 lines 0 comments Download
M Source/core/html/track/TextTrackCue.cpp View 1 2 3 2 chunks +6 lines, -1 line 0 comments Download
M Source/core/html/track/TextTrackCue.idl View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/track/TextTrackCueList.h View 2 chunks +9 lines, -7 lines 0 comments Download
M Source/core/html/track/TextTrackCueList.cpp View 3 chunks +10 lines, -4 lines 0 comments Download
M Source/core/html/track/TextTrackCueList.idl View 1 chunk +3 lines, -1 line 0 comments Download
M Source/core/html/track/TextTrackList.h View 1 2 3 4 5 6 7 4 chunks +17 lines, -12 lines 0 comments Download
M Source/core/html/track/TextTrackList.cpp View 1 2 3 4 5 6 7 9 chunks +23 lines, -11 lines 0 comments Download
M Source/core/html/track/TrackBase.h View 2 chunks +4 lines, -1 line 0 comments Download
M Source/core/html/track/TrackEvent.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/track/vtt/VTTCue.h View 1 2 3 4 5 6 3 chunks +8 lines, -2 lines 0 comments Download
M Source/core/html/track/vtt/VTTCue.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/html/track/vtt/VTTParser.h View 5 chunks +10 lines, -7 lines 0 comments Download
M Source/core/html/track/vtt/VTTParser.cpp View 4 chunks +12 lines, -7 lines 0 comments Download
M Source/core/html/track/vtt/VTTRegion.h View 4 chunks +7 lines, -4 lines 0 comments Download
M Source/core/html/track/vtt/VTTRegion.cpp View 2 chunks +6 lines, -1 line 0 comments Download
M Source/core/html/track/vtt/VTTRegion.idl View 1 chunk +2 lines, -1 line 0 comments Download
M Source/core/html/track/vtt/VTTRegionList.h View 1 2 1 chunk +7 lines, -8 lines 0 comments Download
M Source/core/html/track/vtt/VTTRegionList.cpp View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M Source/core/html/track/vtt/VTTRegionList.idl View 1 chunk +2 lines, -1 line 0 comments Download
M Source/core/loader/TextTrackLoader.h View 1 4 chunks +11 lines, -7 lines 0 comments Download
M Source/core/loader/TextTrackLoader.cpp View 1 1 chunk +7 lines, -2 lines 0 comments Download

Messages

Total messages: 34 (0 generated)
sof
Please take a look.
6 years, 8 months ago (2014-04-20 18:35:36 UTC) #1
haraken
https://codereview.chromium.org/244493002/diff/1/Source/core/html/HTMLMediaElement.h File Source/core/html/HTMLMediaElement.h (right): https://codereview.chromium.org/244493002/diff/1/Source/core/html/HTMLMediaElement.h#newcode194 Source/core/html/HTMLMediaElement.h:194: TrackGroup(GroupKind kind) Add explicit. https://codereview.chromium.org/244493002/diff/1/Source/core/html/track/TextTrack.cpp File Source/core/html/track/TextTrack.cpp (right): https://codereview.chromium.org/244493002/diff/1/Source/core/html/track/TextTrack.cpp#newcode128 ...
6 years, 8 months ago (2014-04-21 01:30:54 UTC) #2
sof
The dangers of RefCountedGarbageCollected..InbandTextTrack and LoadableTextTrack hadn't been converted to Oilpan types completely. Done so ...
6 years, 8 months ago (2014-04-21 15:23:42 UTC) #3
haraken
Mostly looks good. https://codereview.chromium.org/244493002/diff/1/Source/core/html/track/TextTrack.cpp File Source/core/html/track/TextTrack.cpp (right): https://codereview.chromium.org/244493002/diff/1/Source/core/html/track/TextTrack.cpp#newcode128 Source/core/html/track/TextTrack.cpp:128: } On 2014/04/21 15:23:42, sof wrote: ...
6 years, 8 months ago (2014-04-22 02:37:46 UTC) #4
sof
https://codereview.chromium.org/244493002/diff/1/Source/core/html/track/TextTrack.cpp File Source/core/html/track/TextTrack.cpp (right): https://codereview.chromium.org/244493002/diff/1/Source/core/html/track/TextTrack.cpp#newcode128 Source/core/html/track/TextTrack.cpp:128: } On 2014/04/22 02:37:47, haraken wrote: > On 2014/04/21 ...
6 years, 8 months ago (2014-04-22 06:27:51 UTC) #5
haraken
LGTM. I want to have one more oilpan reviewer take another close look. https://codereview.chromium.org/244493002/diff/20001/Source/core/html/track/TextTrackList.cpp File ...
6 years, 8 months ago (2014-04-22 06:41:08 UTC) #6
sof
On 2014/04/22 06:41:08, haraken wrote: > LGTM. > > I want to have one more ...
6 years, 8 months ago (2014-04-22 06:51:02 UTC) #7
Mads Ager (chromium)
I think we can remove all the pointer clearing from this code. It seems to ...
6 years, 8 months ago (2014-04-22 10:33:25 UTC) #8
haraken
https://codereview.chromium.org/244493002/diff/60001/Source/core/html/HTMLMediaElement.h File Source/core/html/HTMLMediaElement.h (right): https://codereview.chromium.org/244493002/diff/60001/Source/core/html/HTMLMediaElement.h#newcode507 Source/core/html/HTMLMediaElement.h:507: RefPtrWillBePersistent<TextTrackList> m_textTracks; On 2014/04/22 10:33:25, Mads Ager (chromium) wrote: ...
6 years, 8 months ago (2014-04-22 10:40:02 UTC) #9
sof
https://codereview.chromium.org/244493002/diff/60001/Source/core/html/track/TextTrackList.cpp File Source/core/html/track/TextTrackList.cpp (right): https://codereview.chromium.org/244493002/diff/60001/Source/core/html/track/TextTrackList.cpp#newcode53 Source/core/html/track/TextTrackList.cpp:53: void TextTrackList::dispose() On 2014/04/22 10:40:03, haraken wrote: > On ...
6 years, 8 months ago (2014-04-22 10:43:42 UTC) #10
Mads Ager (chromium)
https://codereview.chromium.org/244493002/diff/60001/Source/core/html/track/TextTrackList.cpp File Source/core/html/track/TextTrackList.cpp (right): https://codereview.chromium.org/244493002/diff/60001/Source/core/html/track/TextTrackList.cpp#newcode53 Source/core/html/track/TextTrackList.cpp:53: void TextTrackList::dispose() On 2014/04/22 10:43:43, sof wrote: > On ...
6 years, 8 months ago (2014-04-22 10:55:03 UTC) #11
sof
On 2014/04/22 10:55:03, Mads Ager (chromium) wrote: > https://codereview.chromium.org/244493002/diff/60001/Source/core/html/track/TextTrackList.cpp > File Source/core/html/track/TextTrackList.cpp (right): > > ...
6 years, 8 months ago (2014-04-22 11:19:25 UTC) #12
sof
https://codereview.chromium.org/244493002/diff/60001/Source/core/html/HTMLMediaElement.h File Source/core/html/HTMLMediaElement.h (right): https://codereview.chromium.org/244493002/diff/60001/Source/core/html/HTMLMediaElement.h#newcode507 Source/core/html/HTMLMediaElement.h:507: RefPtrWillBePersistent<TextTrackList> m_textTracks; On 2014/04/22 10:40:03, haraken wrote: > On ...
6 years, 8 months ago (2014-04-22 12:44:00 UTC) #13
Mads Ager (chromium)
https://codereview.chromium.org/244493002/diff/100001/Source/core/html/HTMLMediaElement.cpp File Source/core/html/HTMLMediaElement.cpp (left): https://codereview.chromium.org/244493002/diff/100001/Source/core/html/HTMLMediaElement.cpp#oldcode309 Source/core/html/HTMLMediaElement.cpp:309: if (m_textTracks) We should probably wrap this in #if ...
6 years, 8 months ago (2014-04-22 13:07:14 UTC) #14
sof
https://codereview.chromium.org/244493002/diff/100001/Source/core/html/HTMLMediaElement.cpp File Source/core/html/HTMLMediaElement.cpp (left): https://codereview.chromium.org/244493002/diff/100001/Source/core/html/HTMLMediaElement.cpp#oldcode309 Source/core/html/HTMLMediaElement.cpp:309: if (m_textTracks) On 2014/04/22 13:07:15, Mads Ager (chromium) wrote: ...
6 years, 8 months ago (2014-04-22 14:02:47 UTC) #15
Mads Ager (chromium)
I don't think removing the clearing of pointers is safe. There are JavaScript wrappers for ...
6 years, 8 months ago (2014-04-22 14:17:59 UTC) #16
sof
On 2014/04/22 14:17:59, Mads Ager (chromium) wrote: > I don't think removing the clearing of ...
6 years, 8 months ago (2014-04-22 15:50:36 UTC) #17
haraken
https://codereview.chromium.org/244493002/diff/140001/Source/core/html/track/InbandTextTrack.cpp File Source/core/html/track/InbandTextTrack.cpp (right): https://codereview.chromium.org/244493002/diff/140001/Source/core/html/track/InbandTextTrack.cpp#newcode80 Source/core/html/track/InbandTextTrack.cpp:80: m_webTrack->setClient(0); Just to confirm: In the previous code review, ...
6 years, 8 months ago (2014-04-23 01:51:44 UTC) #18
sof
I'm sorry, but I find my self repeating myself and the reasoning too much in ...
6 years, 8 months ago (2014-04-23 05:38:46 UTC) #19
haraken
On 2014/04/23 05:38:46, sof wrote: > I'm sorry, but I find my self repeating myself ...
6 years, 8 months ago (2014-04-23 05:47:08 UTC) #20
haraken
https://codereview.chromium.org/244493002/diff/140001/Source/core/html/track/TextTrackCue.h File Source/core/html/track/TextTrackCue.h (right): https://codereview.chromium.org/244493002/diff/140001/Source/core/html/track/TextTrackCue.h#newcode114 Source/core/html/track/TextTrackCue.h:114: RawPtrWillBeMember<TextTrack> m_track; On 2014/04/23 05:38:47, sof wrote: > On ...
6 years, 8 months ago (2014-04-23 05:53:53 UTC) #21
Mads Ager (chromium)
Quick comments. I'll do the full review next. https://codereview.chromium.org/244493002/diff/140001/Source/core/html/track/LoadableTextTrack.h File Source/core/html/track/LoadableTextTrack.h (right): https://codereview.chromium.org/244493002/diff/140001/Source/core/html/track/LoadableTextTrack.h#newcode73 Source/core/html/track/LoadableTextTrack.h:73: HTMLTrackElement* ...
6 years, 8 months ago (2014-04-23 05:59:37 UTC) #22
Mads Ager (chromium)
LGTM, thanks for iterating on this Sigbjorn! https://codereview.chromium.org/244493002/diff/140001/Source/core/html/track/LoadableTextTrack.h File Source/core/html/track/LoadableTextTrack.h (right): https://codereview.chromium.org/244493002/diff/140001/Source/core/html/track/LoadableTextTrack.h#newcode73 Source/core/html/track/LoadableTextTrack.h:73: HTMLTrackElement* m_trackElement; ...
6 years, 8 months ago (2014-04-23 06:10:10 UTC) #23
haraken
LGTM. https://codereview.chromium.org/244493002/diff/140001/Source/core/html/track/InbandTextTrack.cpp File Source/core/html/track/InbandTextTrack.cpp (right): https://codereview.chromium.org/244493002/diff/140001/Source/core/html/track/InbandTextTrack.cpp#newcode80 Source/core/html/track/InbandTextTrack.cpp:80: m_webTrack->setClient(0); On 2014/04/23 01:51:45, haraken wrote: > > ...
6 years, 8 months ago (2014-04-23 06:21:25 UTC) #24
sof
https://codereview.chromium.org/244493002/diff/140001/Source/core/html/track/InbandTextTrack.cpp File Source/core/html/track/InbandTextTrack.cpp (right): https://codereview.chromium.org/244493002/diff/140001/Source/core/html/track/InbandTextTrack.cpp#newcode80 Source/core/html/track/InbandTextTrack.cpp:80: m_webTrack->setClient(0); On 2014/04/23 01:51:45, haraken wrote: > > Just ...
6 years, 8 months ago (2014-04-23 06:30:00 UTC) #25
sof
https://codereview.chromium.org/244493002/diff/140001/Source/core/html/track/LoadableTextTrack.h File Source/core/html/track/LoadableTextTrack.h (right): https://codereview.chromium.org/244493002/diff/140001/Source/core/html/track/LoadableTextTrack.h#newcode73 Source/core/html/track/LoadableTextTrack.h:73: HTMLTrackElement* m_trackElement; On 2014/04/23 06:10:11, Mads Ager (chromium) wrote: ...
6 years, 8 months ago (2014-04-23 07:36:47 UTC) #26
haraken
https://codereview.chromium.org/244493002/diff/140001/Source/core/html/track/TextTrackList.h File Source/core/html/track/TextTrackList.h (right): https://codereview.chromium.org/244493002/diff/140001/Source/core/html/track/TextTrackList.h#newcode91 Source/core/html/track/TextTrackList.h:91: RawPtrWillBeMember<HTMLMediaElement> m_owner; On 2014/04/23 07:36:48, sof wrote: > On ...
6 years, 8 months ago (2014-04-23 07:45:25 UTC) #27
Erik Corry
https://codereview.chromium.org/244493002/diff/140001/Source/core/html/track/TextTrackCue.h File Source/core/html/track/TextTrackCue.h (right): https://codereview.chromium.org/244493002/diff/140001/Source/core/html/track/TextTrackCue.h#newcode114 Source/core/html/track/TextTrackCue.h:114: RawPtrWillBeMember<TextTrack> m_track; On 2014/04/23 06:21:26, haraken wrote: > > ...
6 years, 8 months ago (2014-04-23 08:15:20 UTC) #28
sof
On 2014/04/23 07:45:25, haraken wrote: > https://codereview.chromium.org/244493002/diff/140001/Source/core/html/track/TextTrackList.h > File Source/core/html/track/TextTrackList.h (right): > > https://codereview.chromium.org/244493002/diff/140001/Source/core/html/track/TextTrackList.h#newcode91 > ...
6 years, 8 months ago (2014-04-23 09:26:06 UTC) #29
haraken
The added test LGTM.
6 years, 8 months ago (2014-04-23 11:26:06 UTC) #30
sof
The CQ bit was checked by sigbjornf@opera.com
6 years, 8 months ago (2014-04-23 11:38:45 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sigbjornf@opera.com/244493002/180001
6 years, 8 months ago (2014-04-23 11:38:55 UTC) #32
Erik Corry
On 2014/04/23 09:26:06, sof wrote: > On 2014/04/23 07:45:25, haraken wrote: > > > https://codereview.chromium.org/244493002/diff/140001/Source/core/html/track/TextTrackList.h ...
6 years, 8 months ago (2014-04-23 12:21:09 UTC) #33
commit-bot: I haz the power
6 years, 8 months ago (2014-04-23 12:46:30 UTC) #34
Message was sent while issue was closed.
Change committed as 172365

Powered by Google App Engine
This is Rietveld 408576698