Bug 871747 - Load the TrackElement outside the document. r=rillian

MozReview-Commit-ID: Cql1YAZnnnL

--HG--
extra : transplant_source : %FA%21%D1%8A%14%E6%BA%8A%91H%F0%EE%CB%7B%AB9%19%20%2A%C2
This commit is contained in:
bechen 2016-07-11 15:03:53 +08:00
parent 7bd3f26521
commit ae902d5599

View File

@ -239,10 +239,6 @@ HTMLTrackElement::BindToTree(nsIDocument* aDocument,
aCompileEventHandlers);
NS_ENSURE_SUCCESS(rv, rv);
if (!aDocument) {
return NS_OK;
}
LOG(LogLevel::Debug, ("Track Element bound to tree."));
if (!aParent || !aParent->IsNodeOfType(nsINode::eMEDIA)) {
return NS_OK;
@ -263,7 +259,7 @@ HTMLTrackElement::BindToTree(nsIDocument* aDocument,
CreateTextTrack();
}
RefPtr<Runnable> r = NewRunnableMethod(this, &HTMLTrackElement::LoadResource);
mMediaParent->RunInStableState(r);
nsContentUtils::RunInStableState(r.forget());
}
return NS_OK;