Bug 1630802 - P8. Remove unnecessary AutoEnter. r=bholley

AutoEnter was an attempt around a race between AbstractThread and MessageLoopAbstractThreadWrap that would cause AbstractThread::GetCurrent() to return an incorrect value. MessageLoopAbstractThreadWrapper is no more and as such AutoEnter is no longer required.

Differential Revision: https://phabricator.services.mozilla.com/D71279
This commit is contained in:
Jean-Yves Avenard
2020-04-20 02:13:31 +00:00
parent db822a5f67
commit 679a347fcf
7 changed files with 0 additions and 80 deletions

View File

@@ -1213,8 +1213,6 @@ HTMLMediaElement::MediaLoadListener::OnStartRequest(nsIRequest* aRequest) {
RefPtr<HTMLMediaElement> element;
element.swap(mElement);
AbstractThread::AutoEnter context(element->AbstractMainThread());
if (mLoadID != element->GetCurrentLoadID()) {
// The channel has been cancelled before we had a chance to create
// a decoder. Abort, don't dispatch an "error" event, as the new load
@@ -2863,8 +2861,6 @@ void HTMLMediaElement::UpdatePreloadAction() {
}
MediaResult HTMLMediaElement::LoadResource() {
AbstractThread::AutoEnter context(AbstractMainThread());
NS_ASSERTION(mDelayingLoadEvent,
"Should delay load event (if in document) during load");