Backed out changeset 6bf4393db489 (bug 1323369) for causing memory leaks on a CLOSED TREE
This commit is contained in:
@@ -4439,7 +4439,8 @@ void HTMLMediaElement::UnbindFromTree(bool aDeep,
|
||||
|
||||
RefPtr<HTMLMediaElement> self(this);
|
||||
nsCOMPtr<nsIRunnable> task = NS_NewRunnableFunction([self] () {
|
||||
if (self->mUnboundFromTree) {
|
||||
if (self->mUnboundFromTree &&
|
||||
self->mNetworkState != nsIDOMHTMLMediaElement::NETWORK_EMPTY) {
|
||||
self->Pause();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user