mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1178437 - Remove ReadOnWrongThread. r=jww
\o/
This commit is contained in:
parent
bd0b2c85f4
commit
6e690505b6
@ -231,11 +231,11 @@ MediaDecoderReader::GetBuffered()
|
||||
NS_ENSURE_TRUE(mStartTime >= 0, media::TimeIntervals());
|
||||
AutoPinned<MediaResource> stream(mDecoder->GetResource());
|
||||
|
||||
if (!mDuration.ReadOnWrongThread().isSome()) {
|
||||
if (!mDuration.Ref().isSome()) {
|
||||
return TimeIntervals();
|
||||
}
|
||||
|
||||
return GetEstimatedBufferedTimeRanges(stream, mDuration.ReadOnWrongThread().ref().ToMicroseconds());
|
||||
return GetEstimatedBufferedTimeRanges(stream, mDuration.Ref().ref().ToMicroseconds());
|
||||
}
|
||||
|
||||
nsRefPtr<MediaDecoderReader::MetadataPromise>
|
||||
|
@ -167,9 +167,6 @@ private:
|
||||
return mValue;
|
||||
}
|
||||
|
||||
// Temporary workaround for naughty code.
|
||||
const T& ReadOnWrongThread() { return mValue; }
|
||||
|
||||
void Set(const T& aNewValue)
|
||||
{
|
||||
MOZ_ASSERT(OwnerThread()->IsCurrentThreadIn());
|
||||
@ -250,7 +247,6 @@ public:
|
||||
|
||||
// Access to the T.
|
||||
const T& Ref() const { return *mImpl; }
|
||||
const T& ReadOnWrongThread() const { return mImpl->ReadOnWrongThread(); }
|
||||
operator const T&() const { return Ref(); }
|
||||
void Set(const T& aNewValue) { mImpl->Set(aNewValue); }
|
||||
Canonical& operator=(const T& aNewValue) { Set(aNewValue); return *this; }
|
||||
@ -309,9 +305,6 @@ private:
|
||||
return mValue;
|
||||
}
|
||||
|
||||
// Temporary workaround for naughty code.
|
||||
const T& ReadOnWrongThread() { return mValue; }
|
||||
|
||||
virtual void UpdateValue(const T& aNewValue) override
|
||||
{
|
||||
MOZ_ASSERT(OwnerThread()->IsCurrentThreadIn());
|
||||
@ -377,7 +370,6 @@ public:
|
||||
|
||||
// Access to the T.
|
||||
const T& Ref() const { return *mImpl; }
|
||||
const T& ReadOnWrongThread() const { return mImpl->ReadOnWrongThread(); }
|
||||
operator const T&() const { return Ref(); }
|
||||
|
||||
private:
|
||||
|
@ -888,9 +888,9 @@ media::TimeIntervals GStreamerReader::GetBuffered()
|
||||
nsTArray<MediaByteRange> ranges;
|
||||
resource->GetCachedRanges(ranges);
|
||||
|
||||
if (resource->IsDataCachedToEndOfResource(0) && mDuration.ReadOnWrongThread().isSome()) {
|
||||
if (resource->IsDataCachedToEndOfResource(0) && mDuration.Ref().isSome()) {
|
||||
/* fast path for local or completely cached files */
|
||||
gint64 duration = mDuration.ReadOnWrongThread().ref().ToMicroseconds();
|
||||
gint64 duration = mDuration.Ref().ref().ToMicroseconds();
|
||||
LOG(LogLevel::Debug, "complete range [0, %f] for [0, %li]",
|
||||
(double) duration / GST_MSECOND, GetDataLength());
|
||||
buffered +=
|
||||
|
Loading…
Reference in New Issue
Block a user