Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/dom/media/MediaEventSource.h
Line
Count
Source (jump to first uncovered line)
1
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
/* vim:set ts=2 sw=2 sts=2 et cindent: */
3
/* This Source Code Form is subject to the terms of the Mozilla Public
4
 * License, v. 2.0. If a copy of the MPL was not distributed with this
5
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6
7
#ifndef MediaEventSource_h_
8
#define MediaEventSource_h_
9
10
#include "mozilla/AbstractThread.h"
11
#include "mozilla/Atomics.h"
12
#include "mozilla/Mutex.h"
13
#include "mozilla/Tuple.h"
14
#include "mozilla/TypeTraits.h"
15
#include "mozilla/Unused.h"
16
17
#include "nsISupportsImpl.h"
18
#include "nsTArray.h"
19
#include "nsThreadUtils.h"
20
21
namespace mozilla {
22
23
/**
24
 * A thread-safe tool to communicate "revocation" across threads. It is used to
25
 * disconnect a listener from the event source to prevent future notifications
26
 * from coming. Revoke() can be called on any thread. However, it is recommended
27
 * to be called on the target thread to avoid race condition.
28
 *
29
 * RevocableToken is not exposed to the client code directly.
30
 * Use MediaEventListener below to do the job.
31
 */
32
class RevocableToken {
33
  NS_INLINE_DECL_THREADSAFE_REFCOUNTING(RevocableToken);
34
35
public:
36
  RevocableToken() : mRevoked(false) {}
37
38
0
  void Revoke() {
39
0
    mRevoked = true;
40
0
  }
41
42
  bool IsRevoked() const {
43
    return mRevoked;
44
  }
45
46
protected:
47
  // Virtual destructor is required since we might delete a Listener object
48
  // through its base type pointer.
49
  virtual ~RevocableToken() { }
50
51
private:
52
  Atomic<bool> mRevoked;
53
};
54
55
enum class ListenerPolicy : int8_t {
56
  // Allow at most one listener. Move will be used when possible
57
  // to pass the event data to save copy.
58
  Exclusive,
59
  // Allow multiple listeners. Event data will always be copied when passed
60
  // to the listeners.
61
  NonExclusive
62
};
63
64
namespace detail {
65
66
/**
67
 * Define how an event type is passed internally in MediaEventSource and to the
68
 * listeners. Specialized for the void type to pass a dummy bool instead.
69
 */
70
template <typename T>
71
struct EventTypeTraits {
72
  typedef T ArgType;
73
};
74
75
template <>
76
struct EventTypeTraits<void> {
77
  typedef bool ArgType;
78
};
79
80
/**
81
 * Test if a method function or lambda accepts one or more arguments.
82
 */
83
template <typename T>
84
class TakeArgsHelper {
85
  template <typename C> static FalseType test(void(C::*)(), int);
86
  template <typename C> static FalseType test(void(C::*)() const, int);
87
  template <typename C> static FalseType test(void(C::*)() volatile, int);
88
  template <typename C> static FalseType test(void(C::*)() const volatile, int);
89
  template <typename F> static FalseType test(F&&, decltype(DeclVal<F>()(), 0));
90
  static TrueType test(...);
91
public:
92
  typedef decltype(test(DeclVal<T>(), 0)) Type;
93
};
94
95
template <typename T>
96
struct TakeArgs : public TakeArgsHelper<T>::Type {};
97
98
template <typename T> struct EventTarget;
99
100
template <>
101
struct EventTarget<nsIEventTarget> {
102
  static void
103
  Dispatch(nsIEventTarget* aTarget, already_AddRefed<nsIRunnable> aTask) {
104
    aTarget->Dispatch(std::move(aTask), NS_DISPATCH_NORMAL);
105
  }
106
};
107
108
template <>
109
struct EventTarget<AbstractThread> {
110
  static void
111
  Dispatch(AbstractThread* aTarget, already_AddRefed<nsIRunnable> aTask) {
112
    Unused << aTarget->Dispatch(std::move(aTask));
113
  }
114
};
115
116
/**
117
 * Encapsulate a raw pointer to be captured by a lambda without causing
118
 * static-analysis errors.
119
 */
120
template <typename T>
121
class RawPtr {
122
public:
123
0
  explicit RawPtr(T* aPtr) : mPtr(aPtr) {}
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::RawPtr<MediaEventSource_VoidEventType_Test::TestBody()::Foo>::RawPtr(MediaEventSource_VoidEventType_Test::TestBody()::Foo*)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::RawPtr<MediaEventSource_ListenerType2_Test::TestBody()::Foo>::RawPtr(MediaEventSource_ListenerType2_Test::TestBody()::Foo*)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::RawPtr<MediaEventSource_CopyEvent1_Test::TestBody()::Foo>::RawPtr(MediaEventSource_CopyEvent1_Test::TestBody()::Foo*)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::RawPtr<MediaEventSource_CopyEvent2_Test::TestBody()::Foo>::RawPtr(MediaEventSource_CopyEvent2_Test::TestBody()::Foo*)
124
0
  T* get() const { return mPtr; }
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::RawPtr<MediaEventSource_VoidEventType_Test::TestBody()::Foo>::get() const
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::RawPtr<MediaEventSource_ListenerType2_Test::TestBody()::Foo>::get() const
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::RawPtr<MediaEventSource_CopyEvent1_Test::TestBody()::Foo>::get() const
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::RawPtr<MediaEventSource_CopyEvent2_Test::TestBody()::Foo>::get() const
125
private:
126
  T* const mPtr;
127
};
128
129
template <typename... As>
130
class Listener : public RevocableToken
131
{
132
public:
133
  template <typename... Ts>
134
  void Dispatch(Ts&&... aEvents)
135
0
  {
136
0
    if (CanTakeArgs()) {
137
0
      DispatchTask(NewRunnableMethod<typename Decay<Ts>::Type&&...>(
138
0
        "detail::Listener::ApplyWithArgs",
139
0
        this,
140
0
        &Listener::ApplyWithArgs,
141
0
        std::forward<Ts>(aEvents)...));
142
0
    } else {
143
0
      DispatchTask(NewRunnableMethod(
144
0
        "detail::Listener::ApplyWithNoArgs", this, &Listener::ApplyWithNoArgs));
145
0
    }
146
0
  }
Unexecuted instantiation: void mozilla::detail::Listener<int>::Dispatch<int&>(int&)
Unexecuted instantiation: void mozilla::detail::Listener<SomeEvent>::Dispatch<SomeEvent&>(SomeEvent&)
Unexecuted instantiation: void mozilla::detail::Listener<mozilla::UniquePtr<int, mozilla::DefaultDelete<int> > >::Dispatch<mozilla::UniquePtr<int, mozilla::DefaultDelete<int> > >(mozilla::UniquePtr<int, mozilla::DefaultDelete<int> >&&)
Unexecuted instantiation: void mozilla::detail::Listener<RefPtr<RefCounter> >::Dispatch<RefPtr<RefCounter>&>(RefPtr<RefCounter>&)
147
148
protected:
149
  virtual ~Listener()
150
0
  {
151
0
    MOZ_ASSERT(IsRevoked(), "Must disconnect the listener.");
152
0
  }
Unexecuted instantiation: mozilla::detail::Listener<int>::~Listener()
Unexecuted instantiation: mozilla::detail::Listener<SomeEvent>::~Listener()
Unexecuted instantiation: mozilla::detail::Listener<mozilla::UniquePtr<int, mozilla::DefaultDelete<int> > >::~Listener()
Unexecuted instantiation: mozilla::detail::Listener<RefPtr<RefCounter> >::~Listener()
153
154
private:
155
  virtual void DispatchTask(already_AddRefed<nsIRunnable> aTask) = 0;
156
157
  // True if the underlying listener function takes non-zero arguments.
158
  virtual bool CanTakeArgs() const = 0;
159
  // Pass the event data to the underlying listener function. Should be called
160
  // only when CanTakeArgs() returns true.
161
  virtual void ApplyWithArgs(As&&... aEvents) = 0;
162
  // Invoke the underlying listener function. Should be called only when
163
  // CanTakeArgs() returns false.
164
  virtual void ApplyWithNoArgs() = 0;
165
};
166
167
/**
168
 * Store the registered target thread and function so it knows where and to
169
 * whom to send the event data.
170
 */
171
template <typename Target, typename Function, typename... As>
172
class ListenerImpl : public Listener<As...>
173
{
174
  // Strip CV and reference from Function.
175
  using FunctionStorage = typename Decay<Function>::Type;
176
177
public:
178
  template <typename F>
179
  ListenerImpl(Target* aTarget, F&& aFunction)
180
    : mTarget(aTarget)
181
    , mFunction(std::forward<F>(aFunction))
182
0
  {
183
0
  }
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_SingleListener_Test::TestBody()::$_9&, int>::ListenerImpl<MediaEventSource_SingleListener_Test::TestBody()::$_9&>(mozilla::AbstractThread*, MediaEventSource_SingleListener_Test::TestBody()::$_9&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_MultiListener_Test::TestBody()::$_10&, int>::ListenerImpl<MediaEventSource_MultiListener_Test::TestBody()::$_10&>(mozilla::AbstractThread*, MediaEventSource_MultiListener_Test::TestBody()::$_10&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_MultiListener_Test::TestBody()::$_11&, int>::ListenerImpl<MediaEventSource_MultiListener_Test::TestBody()::$_11&>(mozilla::AbstractThread*, MediaEventSource_MultiListener_Test::TestBody()::$_11&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_DisconnectAfterNotification_Test::TestBody()::$_12&, int>::ListenerImpl<MediaEventSource_DisconnectAfterNotification_Test::TestBody()::$_12&>(mozilla::AbstractThread*, MediaEventSource_DisconnectAfterNotification_Test::TestBody()::$_12&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_DisconnectBeforeNotification_Test::TestBody()::$_13&, int>::ListenerImpl<MediaEventSource_DisconnectBeforeNotification_Test::TestBody()::$_13&>(mozilla::AbstractThread*, MediaEventSource_DisconnectBeforeNotification_Test::TestBody()::$_13&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_DisconnectBeforeNotification_Test::TestBody()::$_14&, int>::ListenerImpl<MediaEventSource_DisconnectBeforeNotification_Test::TestBody()::$_14&>(mozilla::AbstractThread*, MediaEventSource_DisconnectBeforeNotification_Test::TestBody()::$_14&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_DisconnectAndConnect_Test::TestBody()::$_15, int>::ListenerImpl<MediaEventSource_DisconnectAndConnect_Test::TestBody()::$_15>(mozilla::AbstractThread*, MediaEventSource_DisconnectAndConnect_Test::TestBody()::$_15&&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_DisconnectAndConnect_Test::TestBody()::$_16, int>::ListenerImpl<MediaEventSource_DisconnectAndConnect_Test::TestBody()::$_16>(mozilla::AbstractThread*, MediaEventSource_DisconnectAndConnect_Test::TestBody()::$_16&&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_VoidEventType_Test::TestBody()::$_17&, bool>::ListenerImpl<MediaEventSource_VoidEventType_Test::TestBody()::$_17&>(mozilla::AbstractThread*, MediaEventSource_VoidEventType_Test::TestBody()::$_17&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJvEE15ConnectInternalIS2_ZN35MediaEventSource_VoidEventType_Test8TestBodyEvE3FooMS8_FvvEEENS_8EnableIfIXntsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SC_EUlvE_JbEEC2ISK_EEPS2_OSG_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_ListenerType1_Test::TestBody()::$_18&, int>::ListenerImpl<MediaEventSource_ListenerType1_Test::TestBody()::$_18&>(mozilla::AbstractThread*, MediaEventSource_ListenerType1_Test::TestBody()::$_18&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_ListenerType1_Test::TestBody()::$_19&, int>::ListenerImpl<MediaEventSource_ListenerType1_Test::TestBody()::$_19&>(mozilla::AbstractThread*, MediaEventSource_ListenerType1_Test::TestBody()::$_19&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_ListenerType1_Test::TestBody()::$_20&, int>::ListenerImpl<MediaEventSource_ListenerType1_Test::TestBody()::$_20&>(mozilla::AbstractThread*, MediaEventSource_ListenerType1_Test::TestBody()::$_20&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalIS2_ZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS8_FvOiEEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SD_EUlS9_E_JiEEC2ISL_EEPS2_OSH_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalIS2_ZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS8_FvRKiEEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SE_EUlOiE_JiEEC2ISN_EEPS2_OSI_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalIS2_ZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS8_FvvEEENS_8EnableIfIXntsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SC_EUlvE_JiEEC2ISK_EEPS2_OSG_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalIS2_ZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS8_KFviEEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SC_EUlOiE_JiEEC2ISL_EEPS2_OSG_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalIS2_ZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS8_VFviEEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SC_EUlOiE_JiEEC2ISL_EEPS2_OSG_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_CopyEvent1_Test::TestBody()::$_21&, SomeEvent>::ListenerImpl<MediaEventSource_CopyEvent1_Test::TestBody()::$_21&>(mozilla::AbstractThread*, MediaEventSource_CopyEvent1_Test::TestBody()::$_21&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJ9SomeEventEE15ConnectInternalIS2_ZN32MediaEventSource_CopyEvent1_Test8TestBodyEvE3FooMS9_FvOS5_EEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SE_EUlSA_E_JS5_EEC2ISM_EEPS2_OSI_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_CopyEvent2_Test::TestBody()::$_22&, SomeEvent>::ListenerImpl<MediaEventSource_CopyEvent2_Test::TestBody()::$_22&>(mozilla::AbstractThread*, MediaEventSource_CopyEvent2_Test::TestBody()::$_22&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJ9SomeEventEE15ConnectInternalIS2_ZN32MediaEventSource_CopyEvent2_Test8TestBodyEvE3FooMS9_FvvEEENS_8EnableIfIXntsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SD_EUlvE_JS5_EEC2ISL_EEPS2_OSH_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_MoveOnly_Test::TestBody()::$_23&, mozilla::UniquePtr<int, mozilla::DefaultDelete<int> > >::ListenerImpl<MediaEventSource_MoveOnly_Test::TestBody()::$_23&>(mozilla::AbstractThread*, MediaEventSource_MoveOnly_Test::TestBody()::$_23&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_NoMove_Test::TestBody()::$_24&, RefPtr<RefCounter> >::ListenerImpl<MediaEventSource_NoMove_Test::TestBody()::$_24&>(mozilla::AbstractThread*, MediaEventSource_NoMove_Test::TestBody()::$_24&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_NoMove_Test::TestBody()::$_25&, RefPtr<RefCounter> >::ListenerImpl<MediaEventSource_NoMove_Test::TestBody()::$_25&>(mozilla::AbstractThread*, MediaEventSource_NoMove_Test::TestBody()::$_25&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_MoveLambda_Test::TestBody()::$_26&, bool>::ListenerImpl<MediaEventSource_MoveLambda_Test::TestBody()::$_26&>(mozilla::AbstractThread*, MediaEventSource_MoveLambda_Test::TestBody()::$_26&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_MoveLambda_Test::TestBody()::$_26, bool>::ListenerImpl<MediaEventSource_MoveLambda_Test::TestBody()::$_26>(mozilla::AbstractThread*, MediaEventSource_MoveLambda_Test::TestBody()::$_26&&)
184
185
private:
186
  void DispatchTask(already_AddRefed<nsIRunnable> aTask) override
187
0
  {
188
0
    EventTarget<Target>::Dispatch(mTarget.get(), std::move(aTask));
189
0
  }
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_SingleListener_Test::TestBody()::$_9&, int>::DispatchTask(already_AddRefed<nsIRunnable>)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_MultiListener_Test::TestBody()::$_10&, int>::DispatchTask(already_AddRefed<nsIRunnable>)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_MultiListener_Test::TestBody()::$_11&, int>::DispatchTask(already_AddRefed<nsIRunnable>)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_DisconnectAfterNotification_Test::TestBody()::$_12&, int>::DispatchTask(already_AddRefed<nsIRunnable>)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_DisconnectBeforeNotification_Test::TestBody()::$_13&, int>::DispatchTask(already_AddRefed<nsIRunnable>)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_DisconnectBeforeNotification_Test::TestBody()::$_14&, int>::DispatchTask(already_AddRefed<nsIRunnable>)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_DisconnectAndConnect_Test::TestBody()::$_15, int>::DispatchTask(already_AddRefed<nsIRunnable>)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_DisconnectAndConnect_Test::TestBody()::$_16, int>::DispatchTask(already_AddRefed<nsIRunnable>)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_VoidEventType_Test::TestBody()::$_17&, bool>::DispatchTask(already_AddRefed<nsIRunnable>)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJvEE15ConnectInternalIS2_ZN35MediaEventSource_VoidEventType_Test8TestBodyEvE3FooMS8_FvvEEENS_8EnableIfIXntsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SC_EUlvE_JbEE12DispatchTaskE16already_AddRefedI11nsIRunnableE
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_ListenerType1_Test::TestBody()::$_18&, int>::DispatchTask(already_AddRefed<nsIRunnable>)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_ListenerType1_Test::TestBody()::$_19&, int>::DispatchTask(already_AddRefed<nsIRunnable>)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_ListenerType1_Test::TestBody()::$_20&, int>::DispatchTask(already_AddRefed<nsIRunnable>)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalIS2_ZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS8_FvOiEEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SD_EUlS9_E_JiEE12DispatchTaskE16already_AddRefedI11nsIRunnableE
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalIS2_ZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS8_FvRKiEEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SE_EUlOiE_JiEE12DispatchTaskE16already_AddRefedI11nsIRunnableE
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalIS2_ZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS8_FvvEEENS_8EnableIfIXntsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SC_EUlvE_JiEE12DispatchTaskE16already_AddRefedI11nsIRunnableE
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalIS2_ZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS8_KFviEEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SC_EUlOiE_JiEE12DispatchTaskE16already_AddRefedI11nsIRunnableE
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalIS2_ZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS8_VFviEEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SC_EUlOiE_JiEE12DispatchTaskE16already_AddRefedI11nsIRunnableE
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_CopyEvent1_Test::TestBody()::$_21&, SomeEvent>::DispatchTask(already_AddRefed<nsIRunnable>)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJ9SomeEventEE15ConnectInternalIS2_ZN32MediaEventSource_CopyEvent1_Test8TestBodyEvE3FooMS9_FvOS5_EEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SE_EUlSA_E_JS5_EE12DispatchTaskE16already_AddRefedI11nsIRunnableE
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_CopyEvent2_Test::TestBody()::$_22&, SomeEvent>::DispatchTask(already_AddRefed<nsIRunnable>)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJ9SomeEventEE15ConnectInternalIS2_ZN32MediaEventSource_CopyEvent2_Test8TestBodyEvE3FooMS9_FvvEEENS_8EnableIfIXntsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SD_EUlvE_JS5_EE12DispatchTaskE16already_AddRefedI11nsIRunnableE
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_MoveOnly_Test::TestBody()::$_23&, mozilla::UniquePtr<int, mozilla::DefaultDelete<int> > >::DispatchTask(already_AddRefed<nsIRunnable>)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_NoMove_Test::TestBody()::$_24&, RefPtr<RefCounter> >::DispatchTask(already_AddRefed<nsIRunnable>)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_NoMove_Test::TestBody()::$_25&, RefPtr<RefCounter> >::DispatchTask(already_AddRefed<nsIRunnable>)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_MoveLambda_Test::TestBody()::$_26&, bool>::DispatchTask(already_AddRefed<nsIRunnable>)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_MoveLambda_Test::TestBody()::$_26, bool>::DispatchTask(already_AddRefed<nsIRunnable>)
190
191
  bool CanTakeArgs() const override
192
0
  {
193
0
    return TakeArgs<FunctionStorage>::value;
194
0
  }
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_SingleListener_Test::TestBody()::$_9&, int>::CanTakeArgs() const
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_MultiListener_Test::TestBody()::$_10&, int>::CanTakeArgs() const
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_MultiListener_Test::TestBody()::$_11&, int>::CanTakeArgs() const
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_DisconnectAfterNotification_Test::TestBody()::$_12&, int>::CanTakeArgs() const
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_DisconnectBeforeNotification_Test::TestBody()::$_13&, int>::CanTakeArgs() const
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_DisconnectBeforeNotification_Test::TestBody()::$_14&, int>::CanTakeArgs() const
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_DisconnectAndConnect_Test::TestBody()::$_15, int>::CanTakeArgs() const
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_DisconnectAndConnect_Test::TestBody()::$_16, int>::CanTakeArgs() const
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_VoidEventType_Test::TestBody()::$_17&, bool>::CanTakeArgs() const
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZNK7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJvEE15ConnectInternalIS2_ZN35MediaEventSource_VoidEventType_Test8TestBodyEvE3FooMS8_FvvEEENS_8EnableIfIXntsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SC_EUlvE_JbEE11CanTakeArgsEv
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_ListenerType1_Test::TestBody()::$_18&, int>::CanTakeArgs() const
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_ListenerType1_Test::TestBody()::$_19&, int>::CanTakeArgs() const
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_ListenerType1_Test::TestBody()::$_20&, int>::CanTakeArgs() const
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZNK7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalIS2_ZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS8_FvOiEEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SD_EUlS9_E_JiEE11CanTakeArgsEv
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZNK7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalIS2_ZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS8_FvRKiEEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SE_EUlOiE_JiEE11CanTakeArgsEv
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZNK7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalIS2_ZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS8_FvvEEENS_8EnableIfIXntsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SC_EUlvE_JiEE11CanTakeArgsEv
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZNK7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalIS2_ZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS8_KFviEEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SC_EUlOiE_JiEE11CanTakeArgsEv
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZNK7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalIS2_ZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS8_VFviEEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SC_EUlOiE_JiEE11CanTakeArgsEv
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_CopyEvent1_Test::TestBody()::$_21&, SomeEvent>::CanTakeArgs() const
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZNK7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJ9SomeEventEE15ConnectInternalIS2_ZN32MediaEventSource_CopyEvent1_Test8TestBodyEvE3FooMS9_FvOS5_EEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SE_EUlSA_E_JS5_EE11CanTakeArgsEv
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_CopyEvent2_Test::TestBody()::$_22&, SomeEvent>::CanTakeArgs() const
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZNK7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJ9SomeEventEE15ConnectInternalIS2_ZN32MediaEventSource_CopyEvent2_Test8TestBodyEvE3FooMS9_FvvEEENS_8EnableIfIXntsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SD_EUlvE_JS5_EE11CanTakeArgsEv
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_MoveOnly_Test::TestBody()::$_23&, mozilla::UniquePtr<int, mozilla::DefaultDelete<int> > >::CanTakeArgs() const
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_NoMove_Test::TestBody()::$_24&, RefPtr<RefCounter> >::CanTakeArgs() const
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_NoMove_Test::TestBody()::$_25&, RefPtr<RefCounter> >::CanTakeArgs() const
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_MoveLambda_Test::TestBody()::$_26&, bool>::CanTakeArgs() const
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_MoveLambda_Test::TestBody()::$_26, bool>::CanTakeArgs() const
195
196
  // |F| takes one or more arguments.
197
  template <typename F>
198
  typename EnableIf<TakeArgs<F>::value, void>::Type
199
  ApplyWithArgsImpl(const F& aFunc, As&&... aEvents)
200
0
  {
201
0
    aFunc(std::move(aEvents)...);
202
0
  }
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadERZN36MediaEventSource_SingleListener_Test8TestBodyEvE3$_9JiEE17ApplyWithArgsImplIS4_EENS_8EnableIfIXsr8TakeArgsIT_EE5valueEvE4TypeERKS9_Oi
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadERZN35MediaEventSource_MultiListener_Test8TestBodyEvE4$_10JiEE17ApplyWithArgsImplIS4_EENS_8EnableIfIXsr8TakeArgsIT_EE5valueEvE4TypeERKS9_Oi
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadERZN35MediaEventSource_MultiListener_Test8TestBodyEvE4$_11JiEE17ApplyWithArgsImplIS4_EENS_8EnableIfIXsr8TakeArgsIT_EE5valueEvE4TypeERKS9_Oi
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadERZN49MediaEventSource_DisconnectAfterNotification_Test8TestBodyEvE4$_12JiEE17ApplyWithArgsImplIS4_EENS_8EnableIfIXsr8TakeArgsIT_EE5valueEvE4TypeERKS9_Oi
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadERZN50MediaEventSource_DisconnectBeforeNotification_Test8TestBodyEvE4$_13JiEE17ApplyWithArgsImplIS4_EENS_8EnableIfIXsr8TakeArgsIT_EE5valueEvE4TypeERKS9_Oi
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadERZN50MediaEventSource_DisconnectBeforeNotification_Test8TestBodyEvE4$_14JiEE17ApplyWithArgsImplIS4_EENS_8EnableIfIXsr8TakeArgsIT_EE5valueEvE4TypeERKS9_Oi
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadERZN35MediaEventSource_ListenerType1_Test8TestBodyEvE4$_18JiEE17ApplyWithArgsImplIS4_EENS_8EnableIfIXsr8TakeArgsIT_EE5valueEvE4TypeERKS9_Oi
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadERZN35MediaEventSource_ListenerType1_Test8TestBodyEvE4$_19JiEE17ApplyWithArgsImplIS4_EENS_8EnableIfIXsr8TakeArgsIT_EE5valueEvE4TypeERKS9_Oi
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalIS2_ZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS8_FvOiEEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SD_EUlS9_E_JiEE17ApplyWithArgsImplISL_EENSC_IXsr8TakeArgsISH_EE5valueEvE4TypeERKSH_S9_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalIS2_ZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS8_FvRKiEEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SE_EUlOiE_JiEE17ApplyWithArgsImplISN_EENSD_IXsr8TakeArgsISI_EE5valueEvE4TypeERKSI_SM_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalIS2_ZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS8_KFviEEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SC_EUlOiE_JiEE17ApplyWithArgsImplISL_EENSB_IXsr8TakeArgsISG_EE5valueEvE4TypeERKSG_SK_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalIS2_ZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS8_VFviEEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SC_EUlOiE_JiEE17ApplyWithArgsImplISL_EENSB_IXsr8TakeArgsISG_EE5valueEvE4TypeERKSG_SK_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadERZN32MediaEventSource_CopyEvent1_Test8TestBodyEvE4$_21J9SomeEventEE17ApplyWithArgsImplIS4_EENS_8EnableIfIXsr8TakeArgsIT_EE5valueEvE4TypeERKSA_OS6_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJ9SomeEventEE15ConnectInternalIS2_ZN32MediaEventSource_CopyEvent1_Test8TestBodyEvE3FooMS9_FvOS5_EEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SE_EUlSA_E_JS5_EE17ApplyWithArgsImplISM_EENSD_IXsr8TakeArgsISI_EE5valueEvE4TypeERKSI_SA_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadERZN30MediaEventSource_MoveOnly_Test8TestBodyEvE4$_23JNS_9UniquePtrIiNS_13DefaultDeleteIiEEEEEE17ApplyWithArgsImplIS4_EENS_8EnableIfIXsr8TakeArgsIT_EE5valueEvE4TypeERKSD_OS9_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadERZN28MediaEventSource_NoMove_Test8TestBodyEvE4$_24J6RefPtrI10RefCounterEEE17ApplyWithArgsImplIS4_EENS_8EnableIfIXsr8TakeArgsIT_EE5valueEvE4TypeERKSC_OS8_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadERZN28MediaEventSource_NoMove_Test8TestBodyEvE4$_25J6RefPtrI10RefCounterEEE17ApplyWithArgsImplIS4_EENS_8EnableIfIXsr8TakeArgsIT_EE5valueEvE4TypeERKSC_OS8_
203
204
  // |F| takes no arguments.
205
  template <typename F>
206
  typename EnableIf<!TakeArgs<F>::value, void>::Type
207
  ApplyWithArgsImpl(const F& aFunc, As&&... aEvents)
208
0
  {
209
0
    MOZ_CRASH("Call ApplyWithNoArgs instead.");
210
0
  }
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZN42MediaEventSource_DisconnectAndConnect_Test8TestBodyEvE4$_15JiEE17ApplyWithArgsImplIS4_EENS_8EnableIfIXntsr8TakeArgsIT_EE5valueEvE4TypeERKS8_Oi
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZN42MediaEventSource_DisconnectAndConnect_Test8TestBodyEvE4$_16JiEE17ApplyWithArgsImplIS4_EENS_8EnableIfIXntsr8TakeArgsIT_EE5valueEvE4TypeERKS8_Oi
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadERZN35MediaEventSource_VoidEventType_Test8TestBodyEvE4$_17JbEE17ApplyWithArgsImplIS4_EENS_8EnableIfIXntsr8TakeArgsIT_EE5valueEvE4TypeERKS9_Ob
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJvEE15ConnectInternalIS2_ZN35MediaEventSource_VoidEventType_Test8TestBodyEvE3FooMS8_FvvEEENS_8EnableIfIXntsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SC_EUlvE_JbEE17ApplyWithArgsImplISK_EENSB_IXntsr8TakeArgsISG_EE5valueEvE4TypeERKSG_Ob
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadERZN35MediaEventSource_ListenerType1_Test8TestBodyEvE4$_20JiEE17ApplyWithArgsImplIS4_EENS_8EnableIfIXntsr8TakeArgsIT_EE5valueEvE4TypeERKS9_Oi
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalIS2_ZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS8_FvvEEENS_8EnableIfIXntsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SC_EUlvE_JiEE17ApplyWithArgsImplISK_EENSB_IXntsr8TakeArgsISG_EE5valueEvE4TypeERKSG_Oi
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadERZN32MediaEventSource_CopyEvent2_Test8TestBodyEvE4$_22J9SomeEventEE17ApplyWithArgsImplIS4_EENS_8EnableIfIXntsr8TakeArgsIT_EE5valueEvE4TypeERKSA_OS6_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJ9SomeEventEE15ConnectInternalIS2_ZN32MediaEventSource_CopyEvent2_Test8TestBodyEvE3FooMS9_FvvEEENS_8EnableIfIXntsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SD_EUlvE_JS5_EE17ApplyWithArgsImplISL_EENSC_IXntsr8TakeArgsISH_EE5valueEvE4TypeERKSH_OS5_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadERZN32MediaEventSource_MoveLambda_Test8TestBodyEvE4$_26JbEE17ApplyWithArgsImplIS4_EENS_8EnableIfIXntsr8TakeArgsIT_EE5valueEvE4TypeERKS9_Ob
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZN32MediaEventSource_MoveLambda_Test8TestBodyEvE4$_26JbEE17ApplyWithArgsImplIS4_EENS_8EnableIfIXntsr8TakeArgsIT_EE5valueEvE4TypeERKS8_Ob
211
212
  void ApplyWithArgs(As&&... aEvents) override
213
0
  {
214
0
    MOZ_RELEASE_ASSERT(TakeArgs<Function>::value);
215
0
    // Don't call the listener if it is disconnected.
216
0
    if (!RevocableToken::IsRevoked()) {
217
0
      ApplyWithArgsImpl(mFunction, std::move(aEvents)...);
218
0
    }
219
0
  }
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_SingleListener_Test::TestBody()::$_9&, int>::ApplyWithArgs(int&&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_MultiListener_Test::TestBody()::$_10&, int>::ApplyWithArgs(int&&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_MultiListener_Test::TestBody()::$_11&, int>::ApplyWithArgs(int&&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_DisconnectAfterNotification_Test::TestBody()::$_12&, int>::ApplyWithArgs(int&&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_DisconnectBeforeNotification_Test::TestBody()::$_13&, int>::ApplyWithArgs(int&&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_DisconnectBeforeNotification_Test::TestBody()::$_14&, int>::ApplyWithArgs(int&&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_DisconnectAndConnect_Test::TestBody()::$_15, int>::ApplyWithArgs(int&&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_DisconnectAndConnect_Test::TestBody()::$_16, int>::ApplyWithArgs(int&&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_VoidEventType_Test::TestBody()::$_17&, bool>::ApplyWithArgs(bool&&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJvEE15ConnectInternalIS2_ZN35MediaEventSource_VoidEventType_Test8TestBodyEvE3FooMS8_FvvEEENS_8EnableIfIXntsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SC_EUlvE_JbEE13ApplyWithArgsEOb
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_ListenerType1_Test::TestBody()::$_18&, int>::ApplyWithArgs(int&&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_ListenerType1_Test::TestBody()::$_19&, int>::ApplyWithArgs(int&&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_ListenerType1_Test::TestBody()::$_20&, int>::ApplyWithArgs(int&&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalIS2_ZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS8_FvOiEEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SD_EUlS9_E_JiEE13ApplyWithArgsES9_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalIS2_ZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS8_FvRKiEEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SE_EUlOiE_JiEE13ApplyWithArgsESM_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalIS2_ZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS8_FvvEEENS_8EnableIfIXntsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SC_EUlvE_JiEE13ApplyWithArgsEOi
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalIS2_ZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS8_KFviEEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SC_EUlOiE_JiEE13ApplyWithArgsESK_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalIS2_ZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS8_VFviEEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SC_EUlOiE_JiEE13ApplyWithArgsESK_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_CopyEvent1_Test::TestBody()::$_21&, SomeEvent>::ApplyWithArgs(SomeEvent&&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJ9SomeEventEE15ConnectInternalIS2_ZN32MediaEventSource_CopyEvent1_Test8TestBodyEvE3FooMS9_FvOS5_EEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SE_EUlSA_E_JS5_EE13ApplyWithArgsESA_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_CopyEvent2_Test::TestBody()::$_22&, SomeEvent>::ApplyWithArgs(SomeEvent&&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJ9SomeEventEE15ConnectInternalIS2_ZN32MediaEventSource_CopyEvent2_Test8TestBodyEvE3FooMS9_FvvEEENS_8EnableIfIXntsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SD_EUlvE_JS5_EE13ApplyWithArgsEOS5_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_MoveOnly_Test::TestBody()::$_23&, mozilla::UniquePtr<int, mozilla::DefaultDelete<int> > >::ApplyWithArgs(mozilla::UniquePtr<int, mozilla::DefaultDelete<int> >&&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_NoMove_Test::TestBody()::$_24&, RefPtr<RefCounter> >::ApplyWithArgs(RefPtr<RefCounter>&&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_NoMove_Test::TestBody()::$_25&, RefPtr<RefCounter> >::ApplyWithArgs(RefPtr<RefCounter>&&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_MoveLambda_Test::TestBody()::$_26&, bool>::ApplyWithArgs(bool&&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_MoveLambda_Test::TestBody()::$_26, bool>::ApplyWithArgs(bool&&)
220
221
  // |F| takes one or more arguments.
222
  template <typename F>
223
  typename EnableIf<TakeArgs<F>::value, void>::Type
224
  ApplyWithNoArgsImpl(const F& aFunc)
225
0
  {
226
0
    MOZ_CRASH("Call ApplyWithArgs instead.");
227
0
  }
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadERZN36MediaEventSource_SingleListener_Test8TestBodyEvE3$_9JiEE19ApplyWithNoArgsImplIS4_EENS_8EnableIfIXsr8TakeArgsIT_EE5valueEvE4TypeERKS9_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadERZN35MediaEventSource_MultiListener_Test8TestBodyEvE4$_10JiEE19ApplyWithNoArgsImplIS4_EENS_8EnableIfIXsr8TakeArgsIT_EE5valueEvE4TypeERKS9_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadERZN35MediaEventSource_MultiListener_Test8TestBodyEvE4$_11JiEE19ApplyWithNoArgsImplIS4_EENS_8EnableIfIXsr8TakeArgsIT_EE5valueEvE4TypeERKS9_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadERZN49MediaEventSource_DisconnectAfterNotification_Test8TestBodyEvE4$_12JiEE19ApplyWithNoArgsImplIS4_EENS_8EnableIfIXsr8TakeArgsIT_EE5valueEvE4TypeERKS9_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadERZN50MediaEventSource_DisconnectBeforeNotification_Test8TestBodyEvE4$_13JiEE19ApplyWithNoArgsImplIS4_EENS_8EnableIfIXsr8TakeArgsIT_EE5valueEvE4TypeERKS9_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadERZN50MediaEventSource_DisconnectBeforeNotification_Test8TestBodyEvE4$_14JiEE19ApplyWithNoArgsImplIS4_EENS_8EnableIfIXsr8TakeArgsIT_EE5valueEvE4TypeERKS9_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadERZN35MediaEventSource_ListenerType1_Test8TestBodyEvE4$_18JiEE19ApplyWithNoArgsImplIS4_EENS_8EnableIfIXsr8TakeArgsIT_EE5valueEvE4TypeERKS9_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadERZN35MediaEventSource_ListenerType1_Test8TestBodyEvE4$_19JiEE19ApplyWithNoArgsImplIS4_EENS_8EnableIfIXsr8TakeArgsIT_EE5valueEvE4TypeERKS9_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalIS2_ZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS8_FvOiEEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SD_EUlS9_E_JiEE19ApplyWithNoArgsImplISL_EENSC_IXsr8TakeArgsISH_EE5valueEvE4TypeERKSH_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalIS2_ZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS8_FvRKiEEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SE_EUlOiE_JiEE19ApplyWithNoArgsImplISN_EENSD_IXsr8TakeArgsISI_EE5valueEvE4TypeERKSI_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalIS2_ZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS8_KFviEEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SC_EUlOiE_JiEE19ApplyWithNoArgsImplISL_EENSB_IXsr8TakeArgsISG_EE5valueEvE4TypeERKSG_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalIS2_ZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS8_VFviEEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SC_EUlOiE_JiEE19ApplyWithNoArgsImplISL_EENSB_IXsr8TakeArgsISG_EE5valueEvE4TypeERKSG_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadERZN32MediaEventSource_CopyEvent1_Test8TestBodyEvE4$_21J9SomeEventEE19ApplyWithNoArgsImplIS4_EENS_8EnableIfIXsr8TakeArgsIT_EE5valueEvE4TypeERKSA_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJ9SomeEventEE15ConnectInternalIS2_ZN32MediaEventSource_CopyEvent1_Test8TestBodyEvE3FooMS9_FvOS5_EEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SE_EUlSA_E_JS5_EE19ApplyWithNoArgsImplISM_EENSD_IXsr8TakeArgsISI_EE5valueEvE4TypeERKSI_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadERZN30MediaEventSource_MoveOnly_Test8TestBodyEvE4$_23JNS_9UniquePtrIiNS_13DefaultDeleteIiEEEEEE19ApplyWithNoArgsImplIS4_EENS_8EnableIfIXsr8TakeArgsIT_EE5valueEvE4TypeERKSD_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadERZN28MediaEventSource_NoMove_Test8TestBodyEvE4$_24J6RefPtrI10RefCounterEEE19ApplyWithNoArgsImplIS4_EENS_8EnableIfIXsr8TakeArgsIT_EE5valueEvE4TypeERKSC_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadERZN28MediaEventSource_NoMove_Test8TestBodyEvE4$_25J6RefPtrI10RefCounterEEE19ApplyWithNoArgsImplIS4_EENS_8EnableIfIXsr8TakeArgsIT_EE5valueEvE4TypeERKSC_
228
229
  // |F| takes no arguments.
230
  template <typename F>
231
  typename EnableIf<!TakeArgs<F>::value, void>::Type
232
  ApplyWithNoArgsImpl(const F& aFunc)
233
0
  {
234
0
    aFunc();
235
0
  }
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZN42MediaEventSource_DisconnectAndConnect_Test8TestBodyEvE4$_15JiEE19ApplyWithNoArgsImplIS4_EENS_8EnableIfIXntsr8TakeArgsIT_EE5valueEvE4TypeERKS8_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZN42MediaEventSource_DisconnectAndConnect_Test8TestBodyEvE4$_16JiEE19ApplyWithNoArgsImplIS4_EENS_8EnableIfIXntsr8TakeArgsIT_EE5valueEvE4TypeERKS8_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadERZN35MediaEventSource_VoidEventType_Test8TestBodyEvE4$_17JbEE19ApplyWithNoArgsImplIS4_EENS_8EnableIfIXntsr8TakeArgsIT_EE5valueEvE4TypeERKS9_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJvEE15ConnectInternalIS2_ZN35MediaEventSource_VoidEventType_Test8TestBodyEvE3FooMS8_FvvEEENS_8EnableIfIXntsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SC_EUlvE_JbEE19ApplyWithNoArgsImplISK_EENSB_IXntsr8TakeArgsISG_EE5valueEvE4TypeERKSG_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadERZN35MediaEventSource_ListenerType1_Test8TestBodyEvE4$_20JiEE19ApplyWithNoArgsImplIS4_EENS_8EnableIfIXntsr8TakeArgsIT_EE5valueEvE4TypeERKS9_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalIS2_ZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS8_FvvEEENS_8EnableIfIXntsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SC_EUlvE_JiEE19ApplyWithNoArgsImplISK_EENSB_IXntsr8TakeArgsISG_EE5valueEvE4TypeERKSG_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadERZN32MediaEventSource_CopyEvent2_Test8TestBodyEvE4$_22J9SomeEventEE19ApplyWithNoArgsImplIS4_EENS_8EnableIfIXntsr8TakeArgsIT_EE5valueEvE4TypeERKSA_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJ9SomeEventEE15ConnectInternalIS2_ZN32MediaEventSource_CopyEvent2_Test8TestBodyEvE3FooMS9_FvvEEENS_8EnableIfIXntsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SD_EUlvE_JS5_EE19ApplyWithNoArgsImplISL_EENSC_IXntsr8TakeArgsISH_EE5valueEvE4TypeERKSH_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadERZN32MediaEventSource_MoveLambda_Test8TestBodyEvE4$_26JbEE19ApplyWithNoArgsImplIS4_EENS_8EnableIfIXntsr8TakeArgsIT_EE5valueEvE4TypeERKS9_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZN32MediaEventSource_MoveLambda_Test8TestBodyEvE4$_26JbEE19ApplyWithNoArgsImplIS4_EENS_8EnableIfIXntsr8TakeArgsIT_EE5valueEvE4TypeERKS8_
236
237
  virtual void ApplyWithNoArgs() override
238
0
  {
239
0
    MOZ_RELEASE_ASSERT(!TakeArgs<Function>::value);
240
0
    // Don't call the listener if it is disconnected.
241
0
    if (!RevocableToken::IsRevoked()) {
242
0
      ApplyWithNoArgsImpl(mFunction);
243
0
    }
244
0
  }
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_SingleListener_Test::TestBody()::$_9&, int>::ApplyWithNoArgs()
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_MultiListener_Test::TestBody()::$_10&, int>::ApplyWithNoArgs()
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_MultiListener_Test::TestBody()::$_11&, int>::ApplyWithNoArgs()
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_DisconnectAfterNotification_Test::TestBody()::$_12&, int>::ApplyWithNoArgs()
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_DisconnectBeforeNotification_Test::TestBody()::$_13&, int>::ApplyWithNoArgs()
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_DisconnectBeforeNotification_Test::TestBody()::$_14&, int>::ApplyWithNoArgs()
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_DisconnectAndConnect_Test::TestBody()::$_15, int>::ApplyWithNoArgs()
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_DisconnectAndConnect_Test::TestBody()::$_16, int>::ApplyWithNoArgs()
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_VoidEventType_Test::TestBody()::$_17&, bool>::ApplyWithNoArgs()
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJvEE15ConnectInternalIS2_ZN35MediaEventSource_VoidEventType_Test8TestBodyEvE3FooMS8_FvvEEENS_8EnableIfIXntsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SC_EUlvE_JbEE15ApplyWithNoArgsEv
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_ListenerType1_Test::TestBody()::$_18&, int>::ApplyWithNoArgs()
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_ListenerType1_Test::TestBody()::$_19&, int>::ApplyWithNoArgs()
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_ListenerType1_Test::TestBody()::$_20&, int>::ApplyWithNoArgs()
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalIS2_ZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS8_FvOiEEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SD_EUlS9_E_JiEE15ApplyWithNoArgsEv
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalIS2_ZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS8_FvRKiEEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SE_EUlOiE_JiEE15ApplyWithNoArgsEv
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalIS2_ZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS8_FvvEEENS_8EnableIfIXntsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SC_EUlvE_JiEE15ApplyWithNoArgsEv
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalIS2_ZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS8_KFviEEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SC_EUlOiE_JiEE15ApplyWithNoArgsEv
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalIS2_ZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS8_VFviEEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SC_EUlOiE_JiEE15ApplyWithNoArgsEv
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_CopyEvent1_Test::TestBody()::$_21&, SomeEvent>::ApplyWithNoArgs()
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJ9SomeEventEE15ConnectInternalIS2_ZN32MediaEventSource_CopyEvent1_Test8TestBodyEvE3FooMS9_FvOS5_EEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SE_EUlSA_E_JS5_EE15ApplyWithNoArgsEv
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_CopyEvent2_Test::TestBody()::$_22&, SomeEvent>::ApplyWithNoArgs()
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla6detail12ListenerImplINS_14AbstractThreadEZNS_20MediaEventSourceImplILNS_14ListenerPolicyE1EJ9SomeEventEE15ConnectInternalIS2_ZN32MediaEventSource_CopyEvent2_Test8TestBodyEvE3FooMS9_FvvEEENS_8EnableIfIXntsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SD_EUlvE_JS5_EE15ApplyWithNoArgsEv
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_MoveOnly_Test::TestBody()::$_23&, mozilla::UniquePtr<int, mozilla::DefaultDelete<int> > >::ApplyWithNoArgs()
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_NoMove_Test::TestBody()::$_24&, RefPtr<RefCounter> >::ApplyWithNoArgs()
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_NoMove_Test::TestBody()::$_25&, RefPtr<RefCounter> >::ApplyWithNoArgs()
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_MoveLambda_Test::TestBody()::$_26&, bool>::ApplyWithNoArgs()
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::detail::ListenerImpl<mozilla::AbstractThread, MediaEventSource_MoveLambda_Test::TestBody()::$_26, bool>::ApplyWithNoArgs()
245
246
  const RefPtr<Target> mTarget;
247
  FunctionStorage mFunction;
248
};
249
250
/**
251
 * Return true if any type is a reference type.
252
 */
253
template <typename Head, typename... Tails>
254
struct IsAnyReference {
255
  static const bool value = IsReference<Head>::value ||
256
                            IsAnyReference<Tails...>::value;
257
};
258
259
template <typename T>
260
struct IsAnyReference<T> {
261
  static const bool value = IsReference<T>::value;
262
};
263
264
} // namespace detail
265
266
template <ListenerPolicy, typename... Ts> class MediaEventSourceImpl;
267
268
/**
269
 * Not thread-safe since this is not meant to be shared and therefore only
270
 * move constructor is provided. Used to hold the result of
271
 * MediaEventSource<T>::Connect() and call Disconnect() to disconnect the
272
 * listener from an event source.
273
 */
274
class MediaEventListener {
275
  template <ListenerPolicy, typename... Ts>
276
  friend class MediaEventSourceImpl;
277
278
public:
279
0
  MediaEventListener() {}
280
281
  MediaEventListener(MediaEventListener&& aOther)
282
    : mToken(std::move(aOther.mToken)) {}
283
284
  MediaEventListener& operator=(MediaEventListener&& aOther) {
285
    MOZ_ASSERT(!mToken, "Must disconnect the listener.");
286
    mToken = std::move(aOther.mToken);
287
    return *this;
288
  }
289
290
0
  ~MediaEventListener() {
291
0
    MOZ_ASSERT(!mToken, "Must disconnect the listener.");
292
0
  }
293
294
0
  void Disconnect() {
295
0
    mToken->Revoke();
296
0
    mToken = nullptr;
297
0
  }
298
299
0
  void DisconnectIfExists() {
300
0
    if (mToken) {
301
0
      Disconnect();
302
0
    }
303
0
  }
304
305
private:
306
  // Avoid exposing RevocableToken directly to the client code so that
307
  // listeners can be disconnected in a controlled manner.
308
  explicit MediaEventListener(RevocableToken* aToken) : mToken(aToken) {}
309
  RefPtr<RevocableToken> mToken;
310
};
311
312
/**
313
 * A generic and thread-safe class to implement the observer pattern.
314
 */
315
template <ListenerPolicy Lp, typename... Es>
316
class MediaEventSourceImpl {
317
  static_assert(!detail::IsAnyReference<Es...>::value,
318
                "Ref-type not supported!");
319
320
  template <typename T>
321
  using ArgType = typename detail::EventTypeTraits<T>::ArgType;
322
323
  typedef detail::Listener<ArgType<Es>...> Listener;
324
325
  template<typename Target, typename Func>
326
  using ListenerImpl = detail::ListenerImpl<Target, Func, ArgType<Es>...>;
327
328
  template <typename Method>
329
  using TakeArgs = detail::TakeArgs<Method>;
330
331
0
  void PruneListeners() {
332
0
    int32_t last = static_cast<int32_t>(mListeners.Length()) - 1;
333
0
    for (int32_t i = last; i >= 0; --i) {
334
0
      if (mListeners[i]->IsRevoked()) {
335
0
        mListeners.RemoveElementAt(i);
336
0
      }
337
0
    }
338
0
  }
Unexecuted instantiation: mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, int>::PruneListeners()
Unexecuted instantiation: mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)0, int>::PruneListeners()
Unexecuted instantiation: mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, SomeEvent>::PruneListeners()
Unexecuted instantiation: mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)0, mozilla::UniquePtr<int, mozilla::DefaultDelete<int> > >::PruneListeners()
Unexecuted instantiation: mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, RefPtr<RefCounter> >::PruneListeners()
339
340
  template<typename Target, typename Function>
341
  MediaEventListener
342
0
  ConnectInternal(Target* aTarget, Function&& aFunction) {
343
0
    MutexAutoLock lock(mMutex);
344
0
    PruneListeners();
345
0
    MOZ_ASSERT(Lp == ListenerPolicy::NonExclusive || mListeners.IsEmpty());
346
0
    auto l = mListeners.AppendElement();
347
0
    *l = new ListenerImpl<Target, Function>(
348
0
      aTarget, std::forward<Function>(aFunction));
349
0
    return MediaEventListener(*l);
350
0
  }
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::MediaEventListener mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, int>::ConnectInternal<mozilla::AbstractThread, MediaEventSource_SingleListener_Test::TestBody()::$_9&>(mozilla::AbstractThread*, MediaEventSource_SingleListener_Test::TestBody()::$_9&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::MediaEventListener mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, int>::ConnectInternal<mozilla::AbstractThread, MediaEventSource_MultiListener_Test::TestBody()::$_10&>(mozilla::AbstractThread*, MediaEventSource_MultiListener_Test::TestBody()::$_10&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::MediaEventListener mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, int>::ConnectInternal<mozilla::AbstractThread, MediaEventSource_MultiListener_Test::TestBody()::$_11&>(mozilla::AbstractThread*, MediaEventSource_MultiListener_Test::TestBody()::$_11&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::MediaEventListener mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, int>::ConnectInternal<mozilla::AbstractThread, MediaEventSource_DisconnectAfterNotification_Test::TestBody()::$_12&>(mozilla::AbstractThread*, MediaEventSource_DisconnectAfterNotification_Test::TestBody()::$_12&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::MediaEventListener mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, int>::ConnectInternal<mozilla::AbstractThread, MediaEventSource_DisconnectBeforeNotification_Test::TestBody()::$_13&>(mozilla::AbstractThread*, MediaEventSource_DisconnectBeforeNotification_Test::TestBody()::$_13&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::MediaEventListener mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, int>::ConnectInternal<mozilla::AbstractThread, MediaEventSource_DisconnectBeforeNotification_Test::TestBody()::$_14&>(mozilla::AbstractThread*, MediaEventSource_DisconnectBeforeNotification_Test::TestBody()::$_14&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::MediaEventListener mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)0, int>::ConnectInternal<mozilla::AbstractThread, MediaEventSource_DisconnectAndConnect_Test::TestBody()::$_15>(mozilla::AbstractThread*, MediaEventSource_DisconnectAndConnect_Test::TestBody()::$_15&&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::MediaEventListener mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)0, int>::ConnectInternal<mozilla::AbstractThread, MediaEventSource_DisconnectAndConnect_Test::TestBody()::$_16>(mozilla::AbstractThread*, MediaEventSource_DisconnectAndConnect_Test::TestBody()::$_16&&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::MediaEventListener mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, void>::ConnectInternal<mozilla::AbstractThread, MediaEventSource_VoidEventType_Test::TestBody()::$_17&>(mozilla::AbstractThread*, MediaEventSource_VoidEventType_Test::TestBody()::$_17&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla20MediaEventSourceImplILNS_14ListenerPolicyE1EJvEE15ConnectInternalINS_14AbstractThreadEZNS2_15ConnectInternalIS4_ZN35MediaEventSource_VoidEventType_Test8TestBodyEvE3FooMS7_FvvEEENS_8EnableIfIXntsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SB_EUlvE_EESC_SG_OSH_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::MediaEventListener mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, int>::ConnectInternal<mozilla::AbstractThread, MediaEventSource_ListenerType1_Test::TestBody()::$_18&>(mozilla::AbstractThread*, MediaEventSource_ListenerType1_Test::TestBody()::$_18&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::MediaEventListener mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, int>::ConnectInternal<mozilla::AbstractThread, MediaEventSource_ListenerType1_Test::TestBody()::$_19&>(mozilla::AbstractThread*, MediaEventSource_ListenerType1_Test::TestBody()::$_19&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::MediaEventListener mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, int>::ConnectInternal<mozilla::AbstractThread, MediaEventSource_ListenerType1_Test::TestBody()::$_20&>(mozilla::AbstractThread*, MediaEventSource_ListenerType1_Test::TestBody()::$_20&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalINS_14AbstractThreadEZNS2_15ConnectInternalIS4_ZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS7_FvOiEEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SC_EUlS8_E_EESD_SH_OSI_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalINS_14AbstractThreadEZNS2_15ConnectInternalIS4_ZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS7_FvRKiEEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SD_EUlOiE_EESE_SI_OSJ_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalINS_14AbstractThreadEZNS2_15ConnectInternalIS4_ZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS7_FvvEEENS_8EnableIfIXntsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SB_EUlvE_EESC_SG_OSH_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalINS_14AbstractThreadEZNS2_15ConnectInternalIS4_ZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS7_KFviEEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SB_EUlOiE_EESC_SG_OSH_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalINS_14AbstractThreadEZNS2_15ConnectInternalIS4_ZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS7_VFviEEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SB_EUlOiE_EESC_SG_OSH_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::MediaEventListener mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, SomeEvent>::ConnectInternal<mozilla::AbstractThread, MediaEventSource_CopyEvent1_Test::TestBody()::$_21&>(mozilla::AbstractThread*, MediaEventSource_CopyEvent1_Test::TestBody()::$_21&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla20MediaEventSourceImplILNS_14ListenerPolicyE1EJ9SomeEventEE15ConnectInternalINS_14AbstractThreadEZNS3_15ConnectInternalIS5_ZN32MediaEventSource_CopyEvent1_Test8TestBodyEvE3FooMS8_FvOS2_EEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SD_EUlS9_E_EESE_SI_OSJ_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::MediaEventListener mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, SomeEvent>::ConnectInternal<mozilla::AbstractThread, MediaEventSource_CopyEvent2_Test::TestBody()::$_22&>(mozilla::AbstractThread*, MediaEventSource_CopyEvent2_Test::TestBody()::$_22&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla20MediaEventSourceImplILNS_14ListenerPolicyE1EJ9SomeEventEE15ConnectInternalINS_14AbstractThreadEZNS3_15ConnectInternalIS5_ZN32MediaEventSource_CopyEvent2_Test8TestBodyEvE3FooMS8_FvvEEENS_8EnableIfIXntsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SC_EUlvE_EESD_SH_OSI_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::MediaEventListener mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)0, mozilla::UniquePtr<int, mozilla::DefaultDelete<int> > >::ConnectInternal<mozilla::AbstractThread, MediaEventSource_MoveOnly_Test::TestBody()::$_23&>(mozilla::AbstractThread*, MediaEventSource_MoveOnly_Test::TestBody()::$_23&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::MediaEventListener mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, RefPtr<RefCounter> >::ConnectInternal<mozilla::AbstractThread, MediaEventSource_NoMove_Test::TestBody()::$_24&>(mozilla::AbstractThread*, MediaEventSource_NoMove_Test::TestBody()::$_24&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::MediaEventListener mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, RefPtr<RefCounter> >::ConnectInternal<mozilla::AbstractThread, MediaEventSource_NoMove_Test::TestBody()::$_25&>(mozilla::AbstractThread*, MediaEventSource_NoMove_Test::TestBody()::$_25&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::MediaEventListener mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, void>::ConnectInternal<mozilla::AbstractThread, MediaEventSource_MoveLambda_Test::TestBody()::$_26&>(mozilla::AbstractThread*, MediaEventSource_MoveLambda_Test::TestBody()::$_26&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::MediaEventListener mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, void>::ConnectInternal<mozilla::AbstractThread, MediaEventSource_MoveLambda_Test::TestBody()::$_26>(mozilla::AbstractThread*, MediaEventSource_MoveLambda_Test::TestBody()::$_26&&)
351
352
  // |Method| takes one or more arguments.
353
  template <typename Target, typename This, typename Method>
354
  typename EnableIf<TakeArgs<Method>::value, MediaEventListener>::Type
355
0
  ConnectInternal(Target* aTarget, This* aThis, Method aMethod) {
356
0
    detail::RawPtr<This> thiz(aThis);
357
0
    return ConnectInternal(aTarget,
358
0
      [=](ArgType<Es>&&... aEvents) {
359
0
        (thiz.get()->*aMethod)(std::move(aEvents)...);
360
0
      });
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZZN7mozilla20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalINS_14AbstractThreadEZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS6_FvOiEEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SB_ENKUlS7_E_clES7_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZZN7mozilla20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalINS_14AbstractThreadEZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS6_FvRKiEEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SC_ENKUlOiE_clESK_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZZN7mozilla20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalINS_14AbstractThreadEZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS6_KFviEEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SA_ENKUlOiE_clESI_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZZN7mozilla20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalINS_14AbstractThreadEZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS6_VFviEEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SA_ENKUlOiE_clESI_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZZN7mozilla20MediaEventSourceImplILNS_14ListenerPolicyE1EJ9SomeEventEE15ConnectInternalINS_14AbstractThreadEZN32MediaEventSource_CopyEvent1_Test8TestBodyEvE3FooMS7_FvOS2_EEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SC_ENKUlS8_E_clES8_
361
0
  }
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalINS_14AbstractThreadEZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS6_FvOiEEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SB_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalINS_14AbstractThreadEZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS6_FvRKiEEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SC_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalINS_14AbstractThreadEZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS6_KFviEEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SA_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalINS_14AbstractThreadEZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS6_VFviEEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SA_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla20MediaEventSourceImplILNS_14ListenerPolicyE1EJ9SomeEventEE15ConnectInternalINS_14AbstractThreadEZN32MediaEventSource_CopyEvent1_Test8TestBodyEvE3FooMS7_FvOS2_EEENS_8EnableIfIXsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SC_
362
363
  // |Method| takes no arguments. Don't bother passing the event data.
364
  template <typename Target, typename This, typename Method>
365
  typename EnableIf<!TakeArgs<Method>::value, MediaEventListener>::Type
366
0
  ConnectInternal(Target* aTarget, This* aThis, Method aMethod) {
367
0
    detail::RawPtr<This> thiz(aThis);
368
0
    return ConnectInternal(aTarget,
369
0
      [=]() {
370
0
        (thiz.get()->*aMethod)();
371
0
      });
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZZN7mozilla20MediaEventSourceImplILNS_14ListenerPolicyE1EJvEE15ConnectInternalINS_14AbstractThreadEZN35MediaEventSource_VoidEventType_Test8TestBodyEvE3FooMS6_FvvEEENS_8EnableIfIXntsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SA_ENKUlvE_clEv
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZZN7mozilla20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalINS_14AbstractThreadEZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS6_FvvEEENS_8EnableIfIXntsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SA_ENKUlvE_clEv
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZZN7mozilla20MediaEventSourceImplILNS_14ListenerPolicyE1EJ9SomeEventEE15ConnectInternalINS_14AbstractThreadEZN32MediaEventSource_CopyEvent2_Test8TestBodyEvE3FooMS7_FvvEEENS_8EnableIfIXntsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SB_ENKUlvE_clEv
372
0
  }
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla20MediaEventSourceImplILNS_14ListenerPolicyE1EJvEE15ConnectInternalINS_14AbstractThreadEZN35MediaEventSource_VoidEventType_Test8TestBodyEvE3FooMS6_FvvEEENS_8EnableIfIXntsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SA_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla20MediaEventSourceImplILNS_14ListenerPolicyE1EJiEE15ConnectInternalINS_14AbstractThreadEZN35MediaEventSource_ListenerType2_Test8TestBodyEvE3FooMS6_FvvEEENS_8EnableIfIXntsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SA_
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:_ZN7mozilla20MediaEventSourceImplILNS_14ListenerPolicyE1EJ9SomeEventEE15ConnectInternalINS_14AbstractThreadEZN32MediaEventSource_CopyEvent2_Test8TestBodyEvE3FooMS7_FvvEEENS_8EnableIfIXntsr8TakeArgsIT1_EE5valueENS_18MediaEventListenerEE4TypeEPT_PT0_SB_
373
374
public:
375
  /**
376
   * Register a function to receive notifications from the event source.
377
   *
378
   * @param aTarget The target thread on which the function will run.
379
   * @param aFunction A function to be called on the target thread. The function
380
   *                  parameter must be convertible from |EventType|.
381
   * @return An object used to disconnect from the event source.
382
   */
383
  template<typename Function>
384
  MediaEventListener
385
0
  Connect(AbstractThread* aTarget, Function&& aFunction) {
386
0
    return ConnectInternal(aTarget, std::forward<Function>(aFunction));
387
0
  }
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::MediaEventListener mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, int>::Connect<MediaEventSource_SingleListener_Test::TestBody()::$_9&>(mozilla::AbstractThread*, MediaEventSource_SingleListener_Test::TestBody()::$_9&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::MediaEventListener mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, int>::Connect<MediaEventSource_MultiListener_Test::TestBody()::$_10&>(mozilla::AbstractThread*, MediaEventSource_MultiListener_Test::TestBody()::$_10&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::MediaEventListener mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, int>::Connect<MediaEventSource_MultiListener_Test::TestBody()::$_11&>(mozilla::AbstractThread*, MediaEventSource_MultiListener_Test::TestBody()::$_11&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::MediaEventListener mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, int>::Connect<MediaEventSource_DisconnectAfterNotification_Test::TestBody()::$_12&>(mozilla::AbstractThread*, MediaEventSource_DisconnectAfterNotification_Test::TestBody()::$_12&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::MediaEventListener mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, int>::Connect<MediaEventSource_DisconnectBeforeNotification_Test::TestBody()::$_13&>(mozilla::AbstractThread*, MediaEventSource_DisconnectBeforeNotification_Test::TestBody()::$_13&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::MediaEventListener mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, int>::Connect<MediaEventSource_DisconnectBeforeNotification_Test::TestBody()::$_14&>(mozilla::AbstractThread*, MediaEventSource_DisconnectBeforeNotification_Test::TestBody()::$_14&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::MediaEventListener mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)0, int>::Connect<MediaEventSource_DisconnectAndConnect_Test::TestBody()::$_15>(mozilla::AbstractThread*, MediaEventSource_DisconnectAndConnect_Test::TestBody()::$_15&&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::MediaEventListener mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)0, int>::Connect<MediaEventSource_DisconnectAndConnect_Test::TestBody()::$_16>(mozilla::AbstractThread*, MediaEventSource_DisconnectAndConnect_Test::TestBody()::$_16&&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::MediaEventListener mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, void>::Connect<MediaEventSource_VoidEventType_Test::TestBody()::$_17&>(mozilla::AbstractThread*, MediaEventSource_VoidEventType_Test::TestBody()::$_17&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::MediaEventListener mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, int>::Connect<MediaEventSource_ListenerType1_Test::TestBody()::$_18&>(mozilla::AbstractThread*, MediaEventSource_ListenerType1_Test::TestBody()::$_18&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::MediaEventListener mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, int>::Connect<MediaEventSource_ListenerType1_Test::TestBody()::$_19&>(mozilla::AbstractThread*, MediaEventSource_ListenerType1_Test::TestBody()::$_19&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::MediaEventListener mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, int>::Connect<MediaEventSource_ListenerType1_Test::TestBody()::$_20&>(mozilla::AbstractThread*, MediaEventSource_ListenerType1_Test::TestBody()::$_20&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::MediaEventListener mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, SomeEvent>::Connect<MediaEventSource_CopyEvent1_Test::TestBody()::$_21&>(mozilla::AbstractThread*, MediaEventSource_CopyEvent1_Test::TestBody()::$_21&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::MediaEventListener mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, SomeEvent>::Connect<MediaEventSource_CopyEvent2_Test::TestBody()::$_22&>(mozilla::AbstractThread*, MediaEventSource_CopyEvent2_Test::TestBody()::$_22&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::MediaEventListener mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)0, mozilla::UniquePtr<int, mozilla::DefaultDelete<int> > >::Connect<MediaEventSource_MoveOnly_Test::TestBody()::$_23&>(mozilla::AbstractThread*, MediaEventSource_MoveOnly_Test::TestBody()::$_23&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::MediaEventListener mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, RefPtr<RefCounter> >::Connect<MediaEventSource_NoMove_Test::TestBody()::$_24&>(mozilla::AbstractThread*, MediaEventSource_NoMove_Test::TestBody()::$_24&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::MediaEventListener mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, RefPtr<RefCounter> >::Connect<MediaEventSource_NoMove_Test::TestBody()::$_25&>(mozilla::AbstractThread*, MediaEventSource_NoMove_Test::TestBody()::$_25&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::MediaEventListener mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, void>::Connect<MediaEventSource_MoveLambda_Test::TestBody()::$_26&>(mozilla::AbstractThread*, MediaEventSource_MoveLambda_Test::TestBody()::$_26&)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::MediaEventListener mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, void>::Connect<MediaEventSource_MoveLambda_Test::TestBody()::$_26>(mozilla::AbstractThread*, MediaEventSource_MoveLambda_Test::TestBody()::$_26&&)
388
389
  template<typename Function>
390
  MediaEventListener
391
  Connect(nsIEventTarget* aTarget, Function&& aFunction) {
392
    return ConnectInternal(aTarget, std::forward<Function>(aFunction));
393
  }
394
395
  /**
396
   * As above.
397
   *
398
   * Note we deliberately keep a weak reference to |aThis| in order not to
399
   * change its lifetime. This is because notifications are dispatched
400
   * asynchronously and removing a listener doesn't always break the reference
401
   * cycle for the pending event could still hold a reference to |aThis|.
402
   *
403
   * The caller must call MediaEventListener::Disconnect() to avoid dangling
404
   * pointers.
405
   */
406
  template <typename This, typename Method>
407
  MediaEventListener
408
0
  Connect(AbstractThread* aTarget, This* aThis, Method aMethod) {
409
0
    return ConnectInternal(aTarget, aThis, aMethod);
410
0
  }
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::MediaEventListener mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, void>::Connect<MediaEventSource_VoidEventType_Test::TestBody()::Foo, void (MediaEventSource_VoidEventType_Test::TestBody()::Foo::*)()>(mozilla::AbstractThread*, MediaEventSource_VoidEventType_Test::TestBody()::Foo*, void (MediaEventSource_VoidEventType_Test::TestBody()::Foo::*)())
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::MediaEventListener mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, int>::Connect<MediaEventSource_ListenerType2_Test::TestBody()::Foo, void (MediaEventSource_ListenerType2_Test::TestBody()::Foo::*)(int&&)>(mozilla::AbstractThread*, MediaEventSource_ListenerType2_Test::TestBody()::Foo*, void (MediaEventSource_ListenerType2_Test::TestBody()::Foo::*)(int&&))
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::MediaEventListener mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, int>::Connect<MediaEventSource_ListenerType2_Test::TestBody()::Foo, void (MediaEventSource_ListenerType2_Test::TestBody()::Foo::*)(int const&)>(mozilla::AbstractThread*, MediaEventSource_ListenerType2_Test::TestBody()::Foo*, void (MediaEventSource_ListenerType2_Test::TestBody()::Foo::*)(int const&))
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::MediaEventListener mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, int>::Connect<MediaEventSource_ListenerType2_Test::TestBody()::Foo, void (MediaEventSource_ListenerType2_Test::TestBody()::Foo::*)()>(mozilla::AbstractThread*, MediaEventSource_ListenerType2_Test::TestBody()::Foo*, void (MediaEventSource_ListenerType2_Test::TestBody()::Foo::*)())
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::MediaEventListener mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, int>::Connect<MediaEventSource_ListenerType2_Test::TestBody()::Foo, void (MediaEventSource_ListenerType2_Test::TestBody()::Foo::*)(int) const>(mozilla::AbstractThread*, MediaEventSource_ListenerType2_Test::TestBody()::Foo*, void (MediaEventSource_ListenerType2_Test::TestBody()::Foo::*)(int) const)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::MediaEventListener mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, int>::Connect<MediaEventSource_ListenerType2_Test::TestBody()::Foo, void (MediaEventSource_ListenerType2_Test::TestBody()::Foo::*)(int) volatile>(mozilla::AbstractThread*, MediaEventSource_ListenerType2_Test::TestBody()::Foo*, void (MediaEventSource_ListenerType2_Test::TestBody()::Foo::*)(int) volatile)
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::MediaEventListener mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, SomeEvent>::Connect<MediaEventSource_CopyEvent1_Test::TestBody()::Foo, void (MediaEventSource_CopyEvent1_Test::TestBody()::Foo::*)(SomeEvent&&)>(mozilla::AbstractThread*, MediaEventSource_CopyEvent1_Test::TestBody()::Foo*, void (MediaEventSource_CopyEvent1_Test::TestBody()::Foo::*)(SomeEvent&&))
Unexecuted instantiation: Unified_cpp_dom_media_gtest1.cpp:mozilla::MediaEventListener mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, SomeEvent>::Connect<MediaEventSource_CopyEvent2_Test::TestBody()::Foo, void (MediaEventSource_CopyEvent2_Test::TestBody()::Foo::*)()>(mozilla::AbstractThread*, MediaEventSource_CopyEvent2_Test::TestBody()::Foo*, void (MediaEventSource_CopyEvent2_Test::TestBody()::Foo::*)())
411
412
  template <typename This, typename Method>
413
  MediaEventListener
414
  Connect(nsIEventTarget* aTarget, This* aThis, Method aMethod) {
415
    return ConnectInternal(aTarget, aThis, aMethod);
416
  }
417
418
protected:
419
0
  MediaEventSourceImpl() : mMutex("MediaEventSourceImpl::mMutex") {}
Unexecuted instantiation: mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, int>::MediaEventSourceImpl()
Unexecuted instantiation: mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)0, int>::MediaEventSourceImpl()
Unexecuted instantiation: mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, SomeEvent>::MediaEventSourceImpl()
Unexecuted instantiation: mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)0, mozilla::UniquePtr<int, mozilla::DefaultDelete<int> > >::MediaEventSourceImpl()
Unexecuted instantiation: mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, RefPtr<RefCounter> >::MediaEventSourceImpl()
420
421
  template <typename... Ts>
422
0
  void NotifyInternal(Ts&&... aEvents) {
423
0
    MutexAutoLock lock(mMutex);
424
0
    int32_t last = static_cast<int32_t>(mListeners.Length()) - 1;
425
0
    for (int32_t i = last; i >= 0; --i) {
426
0
      auto&& l = mListeners[i];
427
0
      // Remove disconnected listeners.
428
0
      // It is not optimal but is simple and works well.
429
0
      if (l->IsRevoked()) {
430
0
        mListeners.RemoveElementAt(i);
431
0
        continue;
432
0
      }
433
0
      l->Dispatch(std::forward<Ts>(aEvents)...);
434
0
    }
435
0
  }
Unexecuted instantiation: void mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, int>::NotifyInternal<int&>(int&)
Unexecuted instantiation: void mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, SomeEvent>::NotifyInternal<SomeEvent&>(SomeEvent&)
Unexecuted instantiation: void mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)0, mozilla::UniquePtr<int, mozilla::DefaultDelete<int> > >::NotifyInternal<mozilla::UniquePtr<int, mozilla::DefaultDelete<int> > >(mozilla::UniquePtr<int, mozilla::DefaultDelete<int> >&&)
Unexecuted instantiation: void mozilla::MediaEventSourceImpl<(mozilla::ListenerPolicy)1, RefPtr<RefCounter> >::NotifyInternal<RefPtr<RefCounter>&>(RefPtr<RefCounter>&)
436
437
private:
438
  Mutex mMutex;
439
  nsTArray<RefPtr<Listener>> mListeners;
440
};
441
442
template <typename... Es>
443
using MediaEventSource =
444
  MediaEventSourceImpl<ListenerPolicy::NonExclusive, Es...>;
445
446
template <typename... Es>
447
using MediaEventSourceExc =
448
  MediaEventSourceImpl<ListenerPolicy::Exclusive, Es...>;
449
450
/**
451
 * A class to separate the interface of event subject (MediaEventSource)
452
 * and event publisher. Mostly used as a member variable to publish events
453
 * to the listeners.
454
 */
455
template <typename... Es>
456
class MediaEventProducer : public MediaEventSource<Es...> {
457
public:
458
  template <typename... Ts>
459
0
  void Notify(Ts&&... aEvents) {
460
0
    // Pass lvalues to prevent move in NonExclusive mode.
461
0
    this->NotifyInternal(aEvents...);
462
0
  }
Unexecuted instantiation: void mozilla::MediaEventProducer<int>::Notify<int>(int&&)
Unexecuted instantiation: void mozilla::MediaEventProducer<SomeEvent>::Notify<SomeEvent>(SomeEvent&&)
Unexecuted instantiation: void mozilla::MediaEventProducer<RefPtr<RefCounter> >::Notify<RefPtr<RefCounter> >(RefPtr<RefCounter>&&)
463
};
464
465
/**
466
 * Specialization for void type. A dummy bool is passed to NotifyInternal
467
 * since there is no way to pass a void value.
468
 */
469
template <>
470
class MediaEventProducer<void> : public MediaEventSource<void> {
471
public:
472
  void Notify() {
473
    this->NotifyInternal(true /* dummy */);
474
  }
475
};
476
477
/**
478
 * A producer allowing at most one listener.
479
 */
480
template <typename... Es>
481
class MediaEventProducerExc : public MediaEventSourceExc<Es...> {
482
public:
483
  template <typename... Ts>
484
0
  void Notify(Ts&&... aEvents) {
485
0
    this->NotifyInternal(std::forward<Ts>(aEvents)...);
486
0
  }
487
};
488
489
} // namespace mozilla
490
491
#endif //MediaEventSource_h_