Bug 1409270. P1 - remove Watchable<> from mDownloadSuspendedByCache. r=gerald

MozReview-Commit-ID: K0hhlOKN399
This commit is contained in:
JW Wang
2017-10-17 14:46:15 +08:00
parent aa41e0ca51
commit d7b511f6a7
2 changed files with 2 additions and 5 deletions

View File

@@ -4020,7 +4020,6 @@ HTMLMediaElement::HTMLMediaElement(already_AddRefed<mozilla::dom::NodeInfo>& aNo
mCORSMode(CORS_NONE),
mIsEncrypted(false),
mWaitingForKey(NOT_WAITING_FOR_KEY),
mDownloadSuspendedByCache(false, "HTMLMediaElement::mDownloadSuspendedByCache"),
mDisableVideo(false),
mHasUserInteraction(false),
mFirstFrameLoaded(false),
@@ -4042,9 +4041,6 @@ HTMLMediaElement::HTMLMediaElement(already_AddRefed<mozilla::dom::NodeInfo>& aNo
RegisterActivityObserver();
NotifyOwnerDocumentActivityChanged();
MOZ_ASSERT(NS_IsMainThread());
mWatchManager.Watch(mDownloadSuspendedByCache, &HTMLMediaElement::UpdateReadyStateInternal);
mShutdownObserver->Subscribe(this);
nsIDocShell* docShell = OwnerDoc()->GetDocShell();
if (docShell) {
@@ -5697,6 +5693,7 @@ void
HTMLMediaElement::NotifySuspendedByCache(bool aSuspendedByCache)
{
mDownloadSuspendedByCache = aSuspendedByCache;
UpdateReadyStateInternal();
}
void HTMLMediaElement::DownloadSuspended()