Bug 1242594 - Don't remove the textTrack if it's parent is not null. r=rillian
MozReview-Commit-ID: 3nIE1XFFT99
This commit is contained in:
@@ -274,15 +274,13 @@ HTMLTrackElement::BindToTree(nsIDocument* aDocument,
|
||||
void
|
||||
HTMLTrackElement::UnbindFromTree(bool aDeep, bool aNullParent)
|
||||
{
|
||||
if (mMediaParent) {
|
||||
if (mMediaParent && aNullParent) {
|
||||
// mTrack can be null if HTMLTrackElement::LoadResource has never been
|
||||
// called.
|
||||
if (mTrack) {
|
||||
mMediaParent->RemoveTextTrack(mTrack);
|
||||
}
|
||||
if (aNullParent) {
|
||||
mMediaParent = nullptr;
|
||||
}
|
||||
mMediaParent = nullptr;
|
||||
}
|
||||
|
||||
nsGenericHTMLElement::UnbindFromTree(aDeep, aNullParent);
|
||||
|
||||
Reference in New Issue
Block a user