mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Bug 1319486 - Remove the old relation when adding cue to a new TextTrack. r=rillian
MozReview-Commit-ID: GScxPQWMUTR --HG-- extra : rebase_source : 2aeb67215202860b7a62a6669d79aaaf99e6d53a
This commit is contained in:
parent
f306b4ac22
commit
abdee013ae
@ -136,6 +136,11 @@ TextTrack::GetId(nsAString& aId) const
|
||||
void
|
||||
TextTrack::AddCue(TextTrackCue& aCue)
|
||||
{
|
||||
TextTrack* oldTextTrack = aCue.GetTrack();
|
||||
if (oldTextTrack) {
|
||||
ErrorResult dummy;
|
||||
oldTextTrack->RemoveCue(aCue, dummy);
|
||||
}
|
||||
mCueList->AddCue(aCue);
|
||||
aCue.SetTrack(this);
|
||||
if (mTextTrackList) {
|
||||
|
Loading…
Reference in New Issue
Block a user