RESOLVED FIXED 100300
Remove the circular reference between TextTrack and TextTrackCue
https://bugs.webkit.org/show_bug.cgi?id=100300
Summary Remove the circular reference between TextTrack and TextTrackCue
Aaron Colwell
Reported 2012-10-24 15:51:23 PDT
Remove the circular reference between TextTrack and TextTrackCue
Attachments
Patch (3.76 KB, patch)
2012-10-24 15:55 PDT, Aaron Colwell
no flags
Removed fprintf() accidentally left in the previous patch. (3.55 KB, patch)
2012-10-24 16:34 PDT, Aaron Colwell
no flags
Addressed CR comments (3.56 KB, patch)
2012-10-26 11:12 PDT, Aaron Colwell
no flags
Aaron Colwell
Comment 1 2012-10-24 15:55:35 PDT
Aaron Colwell
Comment 2 2012-10-24 16:34:25 PDT
Created attachment 170509 [details] Removed fprintf() accidentally left in the previous patch.
Eric Carlson
Comment 3 2012-10-26 10:43:15 PDT
Comment on attachment 170509 [details] Removed fprintf() accidentally left in the previous patch. View in context: https://bugs.webkit.org/attachment.cgi?id=170509&action=review > Source/WebCore/ChangeLog:8 > + Changed TextTrackCue.m_track to a normal pointer to break the circular reference that was keeping both objects from ever getting deleted. Nit: this would be easier to read if the line was wrapped. > Source/WebCore/html/track/TextTrack.cpp:120 > + for (size_t i = 0; i < m_cues->length(); ++i) > + m_cues->item(i)->setTrack(0); > + > + if (m_client) > + m_client->textTrackRemoveCues(this, m_cues.get()); This should call textTrackRemoveCues before setTrack(0) because the client may need the cue's Track.
Aaron Colwell
Comment 4 2012-10-26 11:12:27 PDT
Created attachment 170965 [details] Addressed CR comments
WebKit Review Bot
Comment 5 2012-10-26 11:51:37 PDT
Comment on attachment 170965 [details] Addressed CR comments Clearing flags on attachment: 170965 Committed r132681: <http://trac.webkit.org/changeset/132681>
WebKit Review Bot
Comment 6 2012-10-26 11:51:40 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.