Bug 1252343. Part 2 - remove null checks for mReader which is const and never null. r=bechen.

MozReview-Commit-ID: GfyvA7Kbrcd
This commit is contained in:
JW Wang 2016-03-01 15:21:11 +08:00
parent 86bd17d925
commit a6138b7aee

View File

@ -212,12 +212,10 @@ public:
OwnerThread()->Dispatch(r.forget());
}
// Drop reference to mReader and mResource. Only called during shutdown dance.
// Drop reference to mResource. Only called during shutdown dance.
void BreakCycles() {
MOZ_ASSERT(NS_IsMainThread());
if (mReader) {
mReader->BreakCycles();
}
mReader->BreakCycles();
mResource = nullptr;
}
@ -248,17 +246,11 @@ public:
bool IsRealTime() const { return mRealTime; }
size_t SizeOfVideoQueue() {
if (mReader) {
return mReader->SizeOfVideoQueueInBytes();
}
return 0;
return mReader->SizeOfVideoQueueInBytes();
}
size_t SizeOfAudioQueue() {
if (mReader) {
return mReader->SizeOfAudioQueueInBytes();
}
return 0;
return mReader->SizeOfAudioQueueInBytes();
}
private: