mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 08:15:31 +00:00
Bug 1280175 - Allow passing lvalue to MediaEventProducerExc<T>::Notify. r=gerald
MozReview-Commit-ID: 6Wr3obvkVXo --HG-- extra : rebase_source : 09ae3a471caa065cdf908bf302d56fe33548157d
This commit is contained in:
parent
53b6985242
commit
0618cbfada
@ -2070,7 +2070,7 @@ MediaDecoderStateMachine::EnqueueLoadedMetadataEvent()
|
||||
: MediaDecoderEventVisibility::Observable;
|
||||
mMetadataLoadedEvent.Notify(nsAutoPtr<MediaInfo>(new MediaInfo(mInfo)),
|
||||
Move(mMetadataTags),
|
||||
Move(visibility));
|
||||
visibility);
|
||||
mSentLoadedMetadataEvent = true;
|
||||
}
|
||||
|
||||
@ -2092,8 +2092,8 @@ MediaDecoderStateMachine::EnqueueFirstFrameLoadedEvent()
|
||||
MediaDecoderEventVisibility visibility =
|
||||
firstFrameBeenLoaded ? MediaDecoderEventVisibility::Suppressed
|
||||
: MediaDecoderEventVisibility::Observable;
|
||||
self->mFirstFrameLoadedEvent.Notify(nsAutoPtr<MediaInfo>(new MediaInfo(self->mInfo)),
|
||||
Move(visibility));
|
||||
self->mFirstFrameLoadedEvent.Notify(
|
||||
nsAutoPtr<MediaInfo>(new MediaInfo(self->mInfo)), visibility);
|
||||
},
|
||||
// Reject
|
||||
[]() { MOZ_CRASH("Should not reach"); }));
|
||||
|
@ -242,7 +242,7 @@ template <typename... As>
|
||||
class Listener<EventPassMode::Move, As...> : public ListenerBase {
|
||||
public:
|
||||
virtual ~Listener() {}
|
||||
virtual void Dispatch(As&&... aEvents) = 0;
|
||||
virtual void Dispatch(As... aEvents) = 0;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -267,7 +267,7 @@ class ListenerImpl<Target, Function, EventPassMode::Move, As...>
|
||||
public:
|
||||
ListenerImpl(Target* aTarget, const Function& aFunction)
|
||||
: mHelper(ListenerBase::Token(), aTarget, aFunction) {}
|
||||
void Dispatch(As&&... aEvents) override {
|
||||
void Dispatch(As... aEvents) override {
|
||||
mHelper.Dispatch(Move(aEvents)...);
|
||||
}
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user