[webkit-reviews] review granted: [Bug 100300] Remove the circular reference between TextTrack and TextTrackCue : [Attachment 170509] Removed fprintf() accidentally left in the previous patch.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Oct 26 10:42:04 PDT 2012


Eric Carlson <eric.carlson at apple.com> has granted Aaron Colwell
<acolwell at chromium.org>'s request for review:
Bug 100300: Remove the circular reference between TextTrack and TextTrackCue
https://bugs.webkit.org/show_bug.cgi?id=100300

Attachment 170509: Removed fprintf() accidentally left in the previous patch.
https://bugs.webkit.org/attachment.cgi?id=170509&action=review

------- Additional Comments from Eric Carlson <eric.carlson at apple.com>
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.


More information about the webkit-reviews mailing list