/work/obj-fuzz/dist/include/mozilla/WeakPtr.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
2 | | /* vim: set ts=8 sts=2 et sw=2 tw=80: */ |
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 | | /* Weak pointer functionality, implemented as a mixin for use with any class. */ |
8 | | |
9 | | /** |
10 | | * SupportsWeakPtr lets you have a pointer to an object 'Foo' without affecting |
11 | | * its lifetime. It works by creating a single shared reference counted object |
12 | | * (WeakReference) that each WeakPtr will access 'Foo' through. This lets 'Foo' |
13 | | * clear the pointer in the WeakReference without having to know about all of |
14 | | * the WeakPtrs to it and allows the WeakReference to live beyond the lifetime |
15 | | * of 'Foo'. |
16 | | * |
17 | | * PLEASE NOTE: This weak pointer implementation is not thread-safe. |
18 | | * |
19 | | * Note that when deriving from SupportsWeakPtr you should add |
20 | | * MOZ_DECLARE_WEAKREFERENCE_TYPENAME(ClassName) to the public section of your |
21 | | * class, where ClassName is the name of your class. |
22 | | * |
23 | | * The overhead of WeakPtr is that accesses to 'Foo' becomes an additional |
24 | | * dereference, and an additional heap allocated pointer sized object shared |
25 | | * between all of the WeakPtrs. |
26 | | * |
27 | | * Example of usage: |
28 | | * |
29 | | * // To have a class C support weak pointers, inherit from |
30 | | * // SupportsWeakPtr<C>. |
31 | | * class C : public SupportsWeakPtr<C> |
32 | | * { |
33 | | * public: |
34 | | * MOZ_DECLARE_WEAKREFERENCE_TYPENAME(C) |
35 | | * int mNum; |
36 | | * void act(); |
37 | | * }; |
38 | | * |
39 | | * C* ptr = new C(); |
40 | | * |
41 | | * // Get weak pointers to ptr. The first time a weak pointer |
42 | | * // is obtained, a reference counted WeakReference object is created that |
43 | | * // can live beyond the lifetime of 'ptr'. The WeakReference |
44 | | * // object will be notified of 'ptr's destruction. |
45 | | * WeakPtr<C> weak = ptr; |
46 | | * WeakPtr<C> other = ptr; |
47 | | * |
48 | | * // Test a weak pointer for validity before using it. |
49 | | * if (weak) { |
50 | | * weak->mNum = 17; |
51 | | * weak->act(); |
52 | | * } |
53 | | * |
54 | | * // Destroying the underlying object clears weak pointers to it. |
55 | | * delete ptr; |
56 | | * |
57 | | * MOZ_ASSERT(!weak, "Deleting |ptr| clears weak pointers to it."); |
58 | | * MOZ_ASSERT(!other, "Deleting |ptr| clears all weak pointers to it."); |
59 | | * |
60 | | * WeakPtr is typesafe and may be used with any class. It is not required that |
61 | | * the class be reference-counted or allocated in any particular way. |
62 | | * |
63 | | * The API was loosely inspired by Chromium's weak_ptr.h: |
64 | | * http://src.chromium.org/svn/trunk/src/base/memory/weak_ptr.h |
65 | | */ |
66 | | |
67 | | #ifndef mozilla_WeakPtr_h |
68 | | #define mozilla_WeakPtr_h |
69 | | |
70 | | #include "mozilla/ArrayUtils.h" |
71 | | #include "mozilla/Assertions.h" |
72 | | #include "mozilla/Attributes.h" |
73 | | #include "mozilla/Maybe.h" |
74 | | #include "mozilla/RefCounted.h" |
75 | | #include "mozilla/RefPtr.h" |
76 | | #include "mozilla/TypeTraits.h" |
77 | | |
78 | | #include <string.h> |
79 | | |
80 | | #if defined(MOZILLA_INTERNAL_API) |
81 | | // For thread safety checking. |
82 | | #include "nsISupportsImpl.h" |
83 | | #endif |
84 | | |
85 | | #if defined(MOZILLA_INTERNAL_API) && defined(MOZ_THREAD_SAFETY_OWNERSHIP_CHECKS_SUPPORTED) |
86 | | |
87 | | // Weak referencing is not implemeted as thread safe. When a WeakPtr |
88 | | // is created or dereferenced on thread A but the real object is just |
89 | | // being Released() on thread B, there is a possibility of a race |
90 | | // when the proxy object (detail::WeakReference) is notified about |
91 | | // the real object destruction just between when thread A is storing |
92 | | // the object pointer locally and is about to add a reference to it. |
93 | | // |
94 | | // Hence, a non-null weak proxy object is considered to have a single |
95 | | // "owning thread". It means that each query for a weak reference, |
96 | | // its dereference, and destruction of the real object must all happen |
97 | | // on a single thread. The following macros implement assertions for |
98 | | // checking these conditions. |
99 | | // |
100 | | // We re-use XPCOM's nsAutoOwningThread checks when they are available. This has |
101 | | // the advantage that it works with cooperative thread pools. |
102 | | |
103 | | #define MOZ_WEAKPTR_DECLARE_THREAD_SAFETY_CHECK \ |
104 | | /* Will be none if mPtr = nullptr. */ \ |
105 | | Maybe<nsAutoOwningThread> _owningThread; |
106 | | #define MOZ_WEAKPTR_INIT_THREAD_SAFETY_CHECK() \ |
107 | | do { \ |
108 | | if (p) { \ |
109 | | _owningThread.emplace(); \ |
110 | | } \ |
111 | | } while (false) |
112 | | #define MOZ_WEAKPTR_ASSERT_THREAD_SAFETY() \ |
113 | | do { \ |
114 | | if (_owningThread.isSome() && !_owningThread.ref().IsCurrentThread()) { \ |
115 | | WeakPtrTraits<T>::AssertSafeToAccessFromNonOwningThread(); \ |
116 | | } \ |
117 | | } while (false) |
118 | | #define MOZ_WEAKPTR_ASSERT_THREAD_SAFETY_DELEGATED(that) \ |
119 | | (that)->AssertThreadSafety(); |
120 | | |
121 | | #define MOZ_WEAKPTR_THREAD_SAFETY_CHECKING 1 |
122 | | |
123 | | #else |
124 | | |
125 | | #define MOZ_WEAKPTR_DECLARE_THREAD_SAFETY_CHECK |
126 | 0 | #define MOZ_WEAKPTR_INIT_THREAD_SAFETY_CHECK() do { } while (false) |
127 | 0 | #define MOZ_WEAKPTR_ASSERT_THREAD_SAFETY() do { } while (false) |
128 | 0 | #define MOZ_WEAKPTR_ASSERT_THREAD_SAFETY_DELEGATED(that) do { } while (false) |
129 | | |
130 | | #endif |
131 | | |
132 | | namespace mozilla { |
133 | | |
134 | | template <typename T> class WeakPtr; |
135 | | template <typename T> class SupportsWeakPtr; |
136 | | |
137 | | #ifdef MOZ_REFCOUNTED_LEAK_CHECKING |
138 | | #define MOZ_DECLARE_WEAKREFERENCE_TYPENAME(T) \ |
139 | | static const char* weakReferenceTypeName() { return "WeakReference<" #T ">"; } |
140 | | #else |
141 | | #define MOZ_DECLARE_WEAKREFERENCE_TYPENAME(T) |
142 | | #endif |
143 | | |
144 | | template<class T> |
145 | | struct WeakPtrTraits |
146 | | { |
147 | | static void AssertSafeToAccessFromNonOwningThread() |
148 | | { |
149 | | MOZ_DIAGNOSTIC_ASSERT(false, "WeakPtr accessed from multiple threads"); |
150 | | } |
151 | | }; |
152 | | |
153 | | namespace detail { |
154 | | |
155 | | // This can live beyond the lifetime of the class derived from |
156 | | // SupportsWeakPtr. |
157 | | template<class T> |
158 | | class WeakReference : public ::mozilla::RefCounted<WeakReference<T> > |
159 | | { |
160 | | public: |
161 | | explicit WeakReference(T* p) : mPtr(p) |
162 | 0 | { |
163 | 0 | MOZ_WEAKPTR_INIT_THREAD_SAFETY_CHECK(); |
164 | 0 | } Unexecuted instantiation: Unified_cpp_xpcom_base2.cpp:mozilla::detail::WeakReference<(anonymous namespace)::MessageLoopIdleTask>::WeakReference((anonymous namespace)::MessageLoopIdleTask*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::net::Http2Stream>::WeakReference(mozilla::net::Http2Stream*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::DataChannelConnection::DataConnectionListener>::WeakReference(mozilla::DataChannelConnection::DataConnectionListener*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::layers::PCompositorManagerChild>::WeakReference(mozilla::layers::PCompositorManagerChild*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::layers::PCompositorManagerParent>::WeakReference(mozilla::layers::PCompositorManagerParent*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::PContentChild>::WeakReference(mozilla::dom::PContentChild*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::PContentParent>::WeakReference(mozilla::dom::PContentParent*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::net::PNeckoChild>::WeakReference(mozilla::net::PNeckoChild*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::net::PNeckoParent>::WeakReference(mozilla::net::PNeckoParent*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::PProfilerChild>::WeakReference(mozilla::PProfilerChild*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::PProfilerParent>::WeakReference(mozilla::PProfilerParent*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::PRemoteSpellcheckEngineChild>::WeakReference(mozilla::PRemoteSpellcheckEngineChild*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::PRemoteSpellcheckEngineParent>::WeakReference(mozilla::PRemoteSpellcheckEngineParent*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::PServiceWorkerContainerChild>::WeakReference(mozilla::dom::PServiceWorkerContainerChild*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::PServiceWorkerContainerParent>::WeakReference(mozilla::dom::PServiceWorkerContainerParent*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::PServiceWorkerRegistrationChild>::WeakReference(mozilla::dom::PServiceWorkerRegistrationChild*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::PServiceWorkerRegistrationParent>::WeakReference(mozilla::dom::PServiceWorkerRegistrationParent*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::PBrowserChild>::WeakReference(mozilla::dom::PBrowserChild*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::PBrowserParent>::WeakReference(mozilla::dom::PBrowserParent*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::cache::PCacheStreamControlChild>::WeakReference(mozilla::dom::cache::PCacheStreamControlChild*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::cache::PCacheStreamControlParent>::WeakReference(mozilla::dom::cache::PCacheStreamControlParent*) Unexecuted instantiation: mozilla::detail::WeakReference<nsOfflineCacheUpdateOwner>::WeakReference(nsOfflineCacheUpdateOwner*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::extensions::WebExtensionPolicy>::WeakReference(mozilla::extensions::WebExtensionPolicy*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::gl::GLContext>::WeakReference(mozilla::gl::GLContext*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::gl::SurfaceFactory>::WeakReference(mozilla::gl::SurfaceFactory*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::layers::ImageContainer>::WeakReference(mozilla::layers::ImageContainer*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::image::IProgressObserver>::WeakReference(mozilla::image::IProgressObserver*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::image::ProgressTracker>::WeakReference(mozilla::image::ProgressTracker*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::image::RasterImage>::WeakReference(mozilla::image::RasterImage*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::PlacesWeakCallbackWrapper>::WeakReference(mozilla::dom::PlacesWeakCallbackWrapper*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::places::INativePlacesEventCallback>::WeakReference(mozilla::places::INativePlacesEventCallback*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::Selection>::WeakReference(mozilla::dom::Selection*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::CSSStyleRule>::WeakReference(mozilla::dom::CSSStyleRule*) Unexecuted instantiation: mozilla::detail::WeakReference<nsDocShell>::WeakReference(nsDocShell*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::WebGLContextLossHandler>::WeakReference(mozilla::WebGLContextLossHandler*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::WebGLFramebuffer>::WeakReference(mozilla::WebGLFramebuffer*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::webgl::LinkedProgramInfo>::WeakReference(mozilla::webgl::LinkedProgramInfo*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::webgl::LinkedProgramInfo const>::WeakReference(mozilla::webgl::LinkedProgramInfo const*) Unexecuted instantiation: mozilla::detail::WeakReference<nsGeolocationRequest>::WeakReference(nsGeolocationRequest*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::AutoplayPermissionManager>::WeakReference(mozilla::AutoplayPermissionManager*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::FrameCaptureListener>::WeakReference(mozilla::dom::FrameCaptureListener*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::MediaStreamTrackSource::Sink>::WeakReference(mozilla::dom::MediaStreamTrackSource::Sink*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::HTMLMediaElement>::WeakReference(mozilla::dom::HTMLMediaElement*) Unexecuted instantiation: mozilla::detail::WeakReference<nsTextEditorState>::WeakReference(nsTextEditorState*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::MediaStreamTrackConsumer>::WeakReference(mozilla::dom::MediaStreamTrackConsumer*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::SourceListener>::WeakReference(mozilla::SourceListener*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::MediaKeys>::WeakReference(mozilla::dom::MediaKeys*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::PannerNode>::WeakReference(mozilla::dom::PannerNode*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::SpeechRecognition>::WeakReference(mozilla::dom::SpeechRecognition*) Unexecuted instantiation: mozilla::detail::WeakReference<nsNPAPIPluginInstance>::WeakReference(nsNPAPIPluginInstance*) Unexecuted instantiation: ProcessHangMonitor.cpp:mozilla::detail::WeakReference<(anonymous namespace)::HangMonitorParent>::WeakReference((anonymous namespace)::HangMonitorParent*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::Worker>::WeakReference(mozilla::dom::Worker*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::Promise>::WeakReference(mozilla::dom::Promise*) Unexecuted instantiation: mozilla::detail::WeakReference<nsXBLPrototypeBinding>::WeakReference(nsXBLPrototypeBinding*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::PresentationAvailability>::WeakReference(mozilla::dom::PresentationAvailability*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::PresentationConnection>::WeakReference(mozilla::dom::PresentationConnection*) Unexecuted instantiation: mozilla::detail::WeakReference<nsPresContext>::WeakReference(nsPresContext*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::BrowsingContext>::WeakReference(mozilla::dom::BrowsingContext*) Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::extensions::ChannelWrapper>::WeakReference(mozilla::extensions::ChannelWrapper*) |
165 | | |
166 | 0 | T* get() const { |
167 | 0 | MOZ_WEAKPTR_ASSERT_THREAD_SAFETY(); |
168 | 0 | return mPtr; |
169 | 0 | } Unexecuted instantiation: mozilla::detail::WeakReference<nsDocShell>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<nsPresContext>::get() const Unexecuted instantiation: Unified_cpp_xpcom_base2.cpp:mozilla::detail::WeakReference<(anonymous namespace)::MessageLoopIdleTask>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::image::IProgressObserver>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::BrowsingContext>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::net::Http2Stream>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::extensions::ChannelWrapper>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::DataChannelConnection::DataConnectionListener>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::MediaStreamTrackSource::Sink>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::layers::PCompositorManagerChild>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::layers::PCompositorManagerParent>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::PContentChild>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::PContentParent>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::net::PNeckoChild>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::net::PNeckoParent>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::PProfilerChild>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::PProfilerParent>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::PRemoteSpellcheckEngineChild>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::PRemoteSpellcheckEngineParent>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::PServiceWorkerContainerChild>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::PServiceWorkerContainerParent>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::PServiceWorkerRegistrationChild>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::PServiceWorkerRegistrationParent>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::PBrowserChild>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::PBrowserParent>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::cache::PCacheStreamControlChild>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::cache::PCacheStreamControlParent>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<nsOfflineCacheUpdateOwner>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::extensions::WebExtensionPolicy>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::gl::GLContext>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::gl::SurfaceFactory>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::layers::ImageContainer>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::FrameCaptureListener>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::image::ProgressTracker>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::image::RasterImage>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<nsXBLPrototypeBinding>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::PlacesWeakCallbackWrapper>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::places::INativePlacesEventCallback>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::Selection>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::CSSStyleRule>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::SpeechRecognition>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::WebGLFramebuffer>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::WebGLContextLossHandler>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::webgl::LinkedProgramInfo>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::webgl::LinkedProgramInfo const>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<nsGeolocationRequest>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::AutoplayPermissionManager>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::HTMLMediaElement>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<nsTextEditorState>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::MediaStreamTrackConsumer>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::SourceListener>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::MediaKeys>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::PannerNode>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<nsNPAPIPluginInstance>::get() const Unexecuted instantiation: ProcessHangMonitor.cpp:mozilla::detail::WeakReference<(anonymous namespace)::HangMonitorParent>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::Worker>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::Promise>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::PresentationAvailability>::get() const Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::PresentationConnection>::get() const |
170 | | |
171 | | #ifdef MOZ_REFCOUNTED_LEAK_CHECKING |
172 | | const char* typeName() const |
173 | | { |
174 | | // The first time this is called mPtr is null, so don't |
175 | | // invoke any methods on mPtr. |
176 | | return T::weakReferenceTypeName(); |
177 | | } |
178 | | size_t typeSize() const { return sizeof(*this); } |
179 | | #endif |
180 | | |
181 | | #ifdef MOZ_WEAKPTR_THREAD_SAFETY_CHECKING |
182 | | void AssertThreadSafety() { MOZ_WEAKPTR_ASSERT_THREAD_SAFETY(); } |
183 | | #endif |
184 | | |
185 | | private: |
186 | | friend class mozilla::SupportsWeakPtr<T>; |
187 | | |
188 | 0 | void detach() { |
189 | 0 | MOZ_WEAKPTR_ASSERT_THREAD_SAFETY(); |
190 | 0 | mPtr = nullptr; |
191 | 0 | } Unexecuted instantiation: Unified_cpp_xpcom_base2.cpp:mozilla::detail::WeakReference<(anonymous namespace)::MessageLoopIdleTask>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::image::IProgressObserver>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::net::Http2Stream>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::extensions::ChannelWrapper>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::layers::PCompositorManagerChild>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::layers::PCompositorManagerParent>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::PContentChild>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::PContentParent>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::net::PNeckoChild>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::net::PNeckoParent>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::PProfilerChild>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::PProfilerParent>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::PRemoteSpellcheckEngineChild>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::PRemoteSpellcheckEngineParent>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::PServiceWorkerContainerChild>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::PServiceWorkerContainerParent>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::PServiceWorkerRegistrationChild>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::PServiceWorkerRegistrationParent>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::PBrowserChild>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::PBrowserParent>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::cache::PCacheStreamControlChild>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::cache::PCacheStreamControlParent>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::DataChannelConnection::DataConnectionListener>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<nsOfflineCacheUpdateOwner>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::gl::GLContext>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::gl::SurfaceFactory>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::layers::ImageContainer>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::FrameCaptureListener>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::image::ProgressTracker>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::image::RasterImage>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::PlacesWeakCallbackWrapper>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::places::INativePlacesEventCallback>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::Selection>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::CSSStyleRule>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::SpeechRecognition>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::WebGLFramebuffer>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::WebGLContextLossHandler>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::webgl::LinkedProgramInfo>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<nsGeolocationRequest>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::AutoplayPermissionManager>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::MediaStreamTrackSource::Sink>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::HTMLMediaElement>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<nsTextEditorState>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::MediaStreamTrackConsumer>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::SourceListener>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::MediaKeys>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::PannerNode>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<nsNPAPIPluginInstance>::detach() Unexecuted instantiation: ProcessHangMonitor.cpp:mozilla::detail::WeakReference<(anonymous namespace)::HangMonitorParent>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::Worker>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::Promise>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<nsXBLPrototypeBinding>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::PresentationAvailability>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::PresentationConnection>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<nsPresContext>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::dom::BrowsingContext>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<nsDocShell>::detach() Unexecuted instantiation: mozilla::detail::WeakReference<mozilla::extensions::WebExtensionPolicy>::detach() |
192 | | |
193 | | T* MOZ_NON_OWNING_REF mPtr; |
194 | | MOZ_WEAKPTR_DECLARE_THREAD_SAFETY_CHECK |
195 | | }; |
196 | | |
197 | | } // namespace detail |
198 | | |
199 | | template <typename T> |
200 | | class SupportsWeakPtr |
201 | | { |
202 | | protected: |
203 | | ~SupportsWeakPtr() |
204 | 0 | { |
205 | 0 | static_assert(IsBaseOf<SupportsWeakPtr<T>, T>::value, |
206 | 0 | "T must derive from SupportsWeakPtr<T>"); |
207 | 0 | if (mSelfReferencingWeakPtr) { |
208 | 0 | mSelfReferencingWeakPtr.mRef->detach(); |
209 | 0 | } |
210 | 0 | } Unexecuted instantiation: Unified_cpp_xpcom_base2.cpp:mozilla::SupportsWeakPtr<(anonymous namespace)::MessageLoopIdleTask>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::net::Http2Stream>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::layers::PCompositorManagerChild>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::layers::PCompositorManagerParent>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::dom::PContentChild>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::dom::PContentParent>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::net::PNeckoChild>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::net::PNeckoParent>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::PProfilerChild>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::PProfilerParent>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::PRemoteSpellcheckEngineChild>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::PRemoteSpellcheckEngineParent>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::dom::PServiceWorkerContainerChild>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::dom::PServiceWorkerContainerParent>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::dom::PServiceWorkerRegistrationChild>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::dom::PServiceWorkerRegistrationParent>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::dom::PBrowserChild>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::dom::PBrowserParent>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::dom::cache::PCacheStreamControlChild>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::dom::cache::PCacheStreamControlParent>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::DataChannelConnection::DataConnectionListener>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<nsOfflineCacheUpdateOwner>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::gl::GLContext>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::gl::SurfaceFactory>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::layers::ImageContainer>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::image::IProgressObserver>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::image::RasterImage>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::image::ProgressTracker>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::dom::PlacesWeakCallbackWrapper>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::dom::Selection>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::WebGLContextLossHandler>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::WebGLFramebuffer>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::webgl::LinkedProgramInfo>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<nsGeolocationRequest>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::AutoplayPermissionManager>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::dom::MediaStreamTrackSource::Sink>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::dom::HTMLMediaElement>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<nsTextEditorState>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::dom::FrameCaptureListener>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::dom::MediaStreamTrackConsumer>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::SourceListener>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::dom::MediaKeys>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::dom::PannerNode>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::dom::SpeechRecognition>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<nsNPAPIPluginInstance>::~SupportsWeakPtr() Unexecuted instantiation: ProcessHangMonitor.cpp:mozilla::SupportsWeakPtr<(anonymous namespace)::HangMonitorParent>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::dom::Worker>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::dom::Promise>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<nsXBLPrototypeBinding>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::dom::PresentationAvailability>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::dom::PresentationConnection>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::dom::CSSStyleRule>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<nsPresContext>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::dom::BrowsingContext>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<nsDocShell>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::extensions::WebExtensionPolicy>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::extensions::ChannelWrapper>::~SupportsWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::places::INativePlacesEventCallback>::~SupportsWeakPtr() |
211 | | |
212 | | private: |
213 | | const WeakPtr<T>& SelfReferencingWeakPtr() |
214 | 0 | { |
215 | 0 | if (!mSelfReferencingWeakPtr) { |
216 | 0 | mSelfReferencingWeakPtr.mRef = new detail::WeakReference<T>(static_cast<T*>(this)); |
217 | 0 | } else { |
218 | 0 | MOZ_WEAKPTR_ASSERT_THREAD_SAFETY_DELEGATED(mSelfReferencingWeakPtr.mRef); |
219 | 0 | } |
220 | 0 | return mSelfReferencingWeakPtr; |
221 | 0 | } Unexecuted instantiation: Unified_cpp_xpcom_base2.cpp:mozilla::SupportsWeakPtr<(anonymous namespace)::MessageLoopIdleTask>::SelfReferencingWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::net::Http2Stream>::SelfReferencingWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::DataChannelConnection::DataConnectionListener>::SelfReferencingWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::dom::MediaStreamTrackSource::Sink>::SelfReferencingWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::layers::PCompositorManagerParent>::SelfReferencingWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::dom::PContentChild>::SelfReferencingWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::dom::PContentParent>::SelfReferencingWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::net::PNeckoParent>::SelfReferencingWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::PProfilerChild>::SelfReferencingWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::PRemoteSpellcheckEngineParent>::SelfReferencingWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::dom::PServiceWorkerContainerParent>::SelfReferencingWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::dom::PServiceWorkerRegistrationParent>::SelfReferencingWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::dom::PBrowserParent>::SelfReferencingWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::dom::cache::PCacheStreamControlParent>::SelfReferencingWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<nsOfflineCacheUpdateOwner>::SelfReferencingWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::extensions::WebExtensionPolicy>::SelfReferencingWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::gl::GLContext>::SelfReferencingWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::layers::ImageContainer>::SelfReferencingWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::image::IProgressObserver>::SelfReferencingWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::dom::PlacesWeakCallbackWrapper>::SelfReferencingWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::places::INativePlacesEventCallback>::SelfReferencingWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<nsDocShell>::SelfReferencingWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::WebGLContextLossHandler>::SelfReferencingWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::webgl::LinkedProgramInfo>::SelfReferencingWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<nsGeolocationRequest>::SelfReferencingWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::AutoplayPermissionManager>::SelfReferencingWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::dom::FrameCaptureListener>::SelfReferencingWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::dom::HTMLMediaElement>::SelfReferencingWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<nsTextEditorState>::SelfReferencingWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::SourceListener>::SelfReferencingWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::dom::MediaStreamTrackConsumer>::SelfReferencingWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::dom::MediaKeys>::SelfReferencingWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::dom::SpeechRecognition>::SelfReferencingWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<nsXBLPrototypeBinding>::SelfReferencingWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::dom::PresentationAvailability>::SelfReferencingWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::dom::PresentationConnection>::SelfReferencingWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<nsPresContext>::SelfReferencingWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::dom::Selection>::SelfReferencingWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::dom::CSSStyleRule>::SelfReferencingWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::dom::BrowsingContext>::SelfReferencingWeakPtr() Unexecuted instantiation: mozilla::SupportsWeakPtr<mozilla::extensions::ChannelWrapper>::SelfReferencingWeakPtr() |
222 | | |
223 | | const WeakPtr<const T>& SelfReferencingWeakPtr() const |
224 | 0 | { |
225 | 0 | const WeakPtr<T>& p = const_cast<SupportsWeakPtr*>(this)->SelfReferencingWeakPtr(); |
226 | 0 | return reinterpret_cast<const WeakPtr<const T>&>(p); |
227 | 0 | } |
228 | | |
229 | | friend class WeakPtr<T>; |
230 | | friend class WeakPtr<const T>; |
231 | | |
232 | | WeakPtr<T> mSelfReferencingWeakPtr; |
233 | | }; |
234 | | |
235 | | template <typename T> |
236 | | class WeakPtr |
237 | | { |
238 | | typedef detail::WeakReference<T> WeakReference; |
239 | | |
240 | | public: |
241 | | WeakPtr& operator=(const WeakPtr& aOther) |
242 | 0 | { |
243 | 0 | mRef = aOther.mRef; |
244 | 0 | MOZ_WEAKPTR_ASSERT_THREAD_SAFETY_DELEGATED(mRef); |
245 | 0 | return *this; |
246 | 0 | } Unexecuted instantiation: Unified_cpp_xpcom_base2.cpp:mozilla::WeakPtr<(anonymous namespace)::MessageLoopIdleTask>::operator=(mozilla::WeakPtr<(anonymous namespace)::MessageLoopIdleTask> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::net::Http2Stream>::operator=(mozilla::WeakPtr<mozilla::net::Http2Stream> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::DataChannelConnection::DataConnectionListener>::operator=(mozilla::WeakPtr<mozilla::DataChannelConnection::DataConnectionListener> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::MediaStreamTrackSource::Sink>::operator=(mozilla::WeakPtr<mozilla::dom::MediaStreamTrackSource::Sink> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::layers::PCompositorManagerParent>::operator=(mozilla::WeakPtr<mozilla::layers::PCompositorManagerParent> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PContentChild>::operator=(mozilla::WeakPtr<mozilla::dom::PContentChild> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PContentParent>::operator=(mozilla::WeakPtr<mozilla::dom::PContentParent> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::net::PNeckoParent>::operator=(mozilla::WeakPtr<mozilla::net::PNeckoParent> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::PProfilerChild>::operator=(mozilla::WeakPtr<mozilla::PProfilerChild> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::PRemoteSpellcheckEngineParent>::operator=(mozilla::WeakPtr<mozilla::PRemoteSpellcheckEngineParent> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PServiceWorkerContainerParent>::operator=(mozilla::WeakPtr<mozilla::dom::PServiceWorkerContainerParent> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PServiceWorkerRegistrationParent>::operator=(mozilla::WeakPtr<mozilla::dom::PServiceWorkerRegistrationParent> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PBrowserParent>::operator=(mozilla::WeakPtr<mozilla::dom::PBrowserParent> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::cache::PCacheStreamControlParent>::operator=(mozilla::WeakPtr<mozilla::dom::cache::PCacheStreamControlParent> const&) Unexecuted instantiation: mozilla::WeakPtr<nsOfflineCacheUpdateOwner>::operator=(mozilla::WeakPtr<nsOfflineCacheUpdateOwner> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::extensions::WebExtensionPolicy>::operator=(mozilla::WeakPtr<mozilla::extensions::WebExtensionPolicy> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::gl::GLContext>::operator=(mozilla::WeakPtr<mozilla::gl::GLContext> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::layers::ImageContainer>::operator=(mozilla::WeakPtr<mozilla::layers::ImageContainer> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::image::IProgressObserver>::operator=(mozilla::WeakPtr<mozilla::image::IProgressObserver> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PlacesWeakCallbackWrapper>::operator=(mozilla::WeakPtr<mozilla::dom::PlacesWeakCallbackWrapper> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::places::INativePlacesEventCallback>::operator=(mozilla::WeakPtr<mozilla::places::INativePlacesEventCallback> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::CSSStyleRule>::operator=(mozilla::WeakPtr<mozilla::dom::CSSStyleRule> const&) Unexecuted instantiation: mozilla::WeakPtr<nsDocShell>::operator=(mozilla::WeakPtr<nsDocShell> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::WebGLContextLossHandler>::operator=(mozilla::WeakPtr<mozilla::WebGLContextLossHandler> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::webgl::LinkedProgramInfo const>::operator=(mozilla::WeakPtr<mozilla::webgl::LinkedProgramInfo const> const&) Unexecuted instantiation: mozilla::WeakPtr<nsGeolocationRequest>::operator=(mozilla::WeakPtr<nsGeolocationRequest> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::AutoplayPermissionManager>::operator=(mozilla::WeakPtr<mozilla::AutoplayPermissionManager> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::FrameCaptureListener>::operator=(mozilla::WeakPtr<mozilla::dom::FrameCaptureListener> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::HTMLMediaElement>::operator=(mozilla::WeakPtr<mozilla::dom::HTMLMediaElement> const&) Unexecuted instantiation: mozilla::WeakPtr<nsTextEditorState>::operator=(mozilla::WeakPtr<nsTextEditorState> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::SourceListener>::operator=(mozilla::WeakPtr<mozilla::SourceListener> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::MediaStreamTrackConsumer>::operator=(mozilla::WeakPtr<mozilla::dom::MediaStreamTrackConsumer> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::MediaKeys>::operator=(mozilla::WeakPtr<mozilla::dom::MediaKeys> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::SpeechRecognition>::operator=(mozilla::WeakPtr<mozilla::dom::SpeechRecognition> const&) Unexecuted instantiation: mozilla::WeakPtr<nsXBLPrototypeBinding>::operator=(mozilla::WeakPtr<nsXBLPrototypeBinding> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PresentationAvailability>::operator=(mozilla::WeakPtr<mozilla::dom::PresentationAvailability> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PresentationConnection>::operator=(mozilla::WeakPtr<mozilla::dom::PresentationConnection> const&) Unexecuted instantiation: mozilla::WeakPtr<nsPresContext>::operator=(mozilla::WeakPtr<nsPresContext> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::Selection>::operator=(mozilla::WeakPtr<mozilla::dom::Selection> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::BrowsingContext>::operator=(mozilla::WeakPtr<mozilla::dom::BrowsingContext> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::extensions::ChannelWrapper>::operator=(mozilla::WeakPtr<mozilla::extensions::ChannelWrapper> const&) |
247 | | |
248 | | WeakPtr(const WeakPtr& aOther) |
249 | 0 | { |
250 | 0 | // The thread safety check is performed inside of the operator= method. |
251 | 0 | *this = aOther; |
252 | 0 | } Unexecuted instantiation: mozilla::WeakPtr<mozilla::layers::PCompositorManagerParent>::WeakPtr(mozilla::WeakPtr<mozilla::layers::PCompositorManagerParent> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PContentChild>::WeakPtr(mozilla::WeakPtr<mozilla::dom::PContentChild> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PContentParent>::WeakPtr(mozilla::WeakPtr<mozilla::dom::PContentParent> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::net::PNeckoParent>::WeakPtr(mozilla::WeakPtr<mozilla::net::PNeckoParent> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::PProfilerChild>::WeakPtr(mozilla::WeakPtr<mozilla::PProfilerChild> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::PRemoteSpellcheckEngineParent>::WeakPtr(mozilla::WeakPtr<mozilla::PRemoteSpellcheckEngineParent> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PServiceWorkerContainerParent>::WeakPtr(mozilla::WeakPtr<mozilla::dom::PServiceWorkerContainerParent> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PServiceWorkerRegistrationParent>::WeakPtr(mozilla::WeakPtr<mozilla::dom::PServiceWorkerRegistrationParent> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PBrowserParent>::WeakPtr(mozilla::WeakPtr<mozilla::dom::PBrowserParent> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::cache::PCacheStreamControlParent>::WeakPtr(mozilla::WeakPtr<mozilla::dom::cache::PCacheStreamControlParent> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::MediaStreamTrackSource::Sink>::WeakPtr(mozilla::WeakPtr<mozilla::dom::MediaStreamTrackSource::Sink> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::extensions::WebExtensionPolicy>::WeakPtr(mozilla::WeakPtr<mozilla::extensions::WebExtensionPolicy> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::gl::GLContext>::WeakPtr(mozilla::WeakPtr<mozilla::gl::GLContext> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::layers::ImageContainer>::WeakPtr(mozilla::WeakPtr<mozilla::layers::ImageContainer> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PlacesWeakCallbackWrapper>::WeakPtr(mozilla::WeakPtr<mozilla::dom::PlacesWeakCallbackWrapper> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::places::INativePlacesEventCallback>::WeakPtr(mozilla::WeakPtr<mozilla::places::INativePlacesEventCallback> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::FrameCaptureListener>::WeakPtr(mozilla::WeakPtr<mozilla::dom::FrameCaptureListener> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::SourceListener>::WeakPtr(mozilla::WeakPtr<mozilla::SourceListener> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::MediaStreamTrackConsumer>::WeakPtr(mozilla::WeakPtr<mozilla::dom::MediaStreamTrackConsumer> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PresentationAvailability>::WeakPtr(mozilla::WeakPtr<mozilla::dom::PresentationAvailability> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PresentationConnection>::WeakPtr(mozilla::WeakPtr<mozilla::dom::PresentationConnection> const&) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::CSSStyleRule>::WeakPtr(mozilla::WeakPtr<mozilla::dom::CSSStyleRule> const&) |
253 | | |
254 | | WeakPtr& operator=(T* aOther) |
255 | 0 | { |
256 | 0 | if (aOther) { |
257 | 0 | *this = aOther->SelfReferencingWeakPtr(); |
258 | 0 | } else if (!mRef || mRef->get()) { |
259 | 0 | // Ensure that mRef is dereferenceable in the uninitialized state. |
260 | 0 | mRef = new WeakReference(nullptr); |
261 | 0 | } |
262 | 0 | // The thread safety check happens inside SelfReferencingWeakPtr |
263 | 0 | // or is initialized in the WeakReference constructor. |
264 | 0 | return *this; |
265 | 0 | } Unexecuted instantiation: Unified_cpp_xpcom_base2.cpp:mozilla::WeakPtr<(anonymous namespace)::MessageLoopIdleTask>::operator=((anonymous namespace)::MessageLoopIdleTask*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::net::Http2Stream>::operator=(mozilla::net::Http2Stream*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::DataChannelConnection::DataConnectionListener>::operator=(mozilla::DataChannelConnection::DataConnectionListener*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::MediaStreamTrackSource::Sink>::operator=(mozilla::dom::MediaStreamTrackSource::Sink*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::layers::PCompositorManagerParent>::operator=(mozilla::layers::PCompositorManagerParent*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PContentChild>::operator=(mozilla::dom::PContentChild*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PContentParent>::operator=(mozilla::dom::PContentParent*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::net::PNeckoParent>::operator=(mozilla::net::PNeckoParent*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::PProfilerChild>::operator=(mozilla::PProfilerChild*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::PRemoteSpellcheckEngineParent>::operator=(mozilla::PRemoteSpellcheckEngineParent*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PServiceWorkerContainerParent>::operator=(mozilla::dom::PServiceWorkerContainerParent*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PServiceWorkerRegistrationParent>::operator=(mozilla::dom::PServiceWorkerRegistrationParent*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PBrowserParent>::operator=(mozilla::dom::PBrowserParent*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::cache::PCacheStreamControlParent>::operator=(mozilla::dom::cache::PCacheStreamControlParent*) Unexecuted instantiation: mozilla::WeakPtr<nsOfflineCacheUpdateOwner>::operator=(nsOfflineCacheUpdateOwner*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::extensions::WebExtensionPolicy>::operator=(mozilla::extensions::WebExtensionPolicy*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::gl::GLContext>::operator=(mozilla::gl::GLContext*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::layers::ImageContainer>::operator=(mozilla::layers::ImageContainer*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::image::IProgressObserver>::operator=(mozilla::image::IProgressObserver*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PlacesWeakCallbackWrapper>::operator=(mozilla::dom::PlacesWeakCallbackWrapper*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::places::INativePlacesEventCallback>::operator=(mozilla::places::INativePlacesEventCallback*) Unexecuted instantiation: mozilla::WeakPtr<nsDocShell>::operator=(nsDocShell*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::WebGLContextLossHandler>::operator=(mozilla::WebGLContextLossHandler*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::webgl::LinkedProgramInfo const>::operator=(mozilla::webgl::LinkedProgramInfo const*) Unexecuted instantiation: mozilla::WeakPtr<nsGeolocationRequest>::operator=(nsGeolocationRequest*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::AutoplayPermissionManager>::operator=(mozilla::AutoplayPermissionManager*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::FrameCaptureListener>::operator=(mozilla::dom::FrameCaptureListener*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::HTMLMediaElement>::operator=(mozilla::dom::HTMLMediaElement*) Unexecuted instantiation: mozilla::WeakPtr<nsTextEditorState>::operator=(nsTextEditorState*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::SourceListener>::operator=(mozilla::SourceListener*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::MediaStreamTrackConsumer>::operator=(mozilla::dom::MediaStreamTrackConsumer*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::MediaKeys>::operator=(mozilla::dom::MediaKeys*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::SpeechRecognition>::operator=(mozilla::dom::SpeechRecognition*) Unexecuted instantiation: mozilla::WeakPtr<nsXBLPrototypeBinding>::operator=(nsXBLPrototypeBinding*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PresentationAvailability>::operator=(mozilla::dom::PresentationAvailability*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PresentationConnection>::operator=(mozilla::dom::PresentationConnection*) Unexecuted instantiation: mozilla::WeakPtr<nsPresContext>::operator=(nsPresContext*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::Selection>::operator=(mozilla::dom::Selection*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::CSSStyleRule>::operator=(mozilla::dom::CSSStyleRule*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::BrowsingContext>::operator=(mozilla::dom::BrowsingContext*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::extensions::ChannelWrapper>::operator=(mozilla::extensions::ChannelWrapper*) |
266 | | |
267 | | MOZ_IMPLICIT WeakPtr(T* aOther) |
268 | 0 | { |
269 | 0 | *this = aOther; |
270 | 0 | MOZ_WEAKPTR_ASSERT_THREAD_SAFETY_DELEGATED(mRef); |
271 | 0 | } Unexecuted instantiation: Unified_cpp_xpcom_base2.cpp:mozilla::WeakPtr<(anonymous namespace)::MessageLoopIdleTask>::WeakPtr((anonymous namespace)::MessageLoopIdleTask*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::net::Http2Stream>::WeakPtr(mozilla::net::Http2Stream*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::layers::PCompositorManagerParent>::WeakPtr(mozilla::layers::PCompositorManagerParent*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PContentChild>::WeakPtr(mozilla::dom::PContentChild*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PContentParent>::WeakPtr(mozilla::dom::PContentParent*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::net::PNeckoParent>::WeakPtr(mozilla::net::PNeckoParent*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::PProfilerChild>::WeakPtr(mozilla::PProfilerChild*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::PRemoteSpellcheckEngineParent>::WeakPtr(mozilla::PRemoteSpellcheckEngineParent*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PServiceWorkerContainerParent>::WeakPtr(mozilla::dom::PServiceWorkerContainerParent*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PServiceWorkerRegistrationParent>::WeakPtr(mozilla::dom::PServiceWorkerRegistrationParent*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PBrowserParent>::WeakPtr(mozilla::dom::PBrowserParent*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::cache::PCacheStreamControlParent>::WeakPtr(mozilla::dom::cache::PCacheStreamControlParent*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::extensions::WebExtensionPolicy>::WeakPtr(mozilla::extensions::WebExtensionPolicy*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::gl::GLContext>::WeakPtr(mozilla::gl::GLContext*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::layers::ImageContainer>::WeakPtr(mozilla::layers::ImageContainer*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::image::IProgressObserver>::WeakPtr(mozilla::image::IProgressObserver*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PlacesWeakCallbackWrapper>::WeakPtr(mozilla::dom::PlacesWeakCallbackWrapper*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::places::INativePlacesEventCallback>::WeakPtr(mozilla::places::INativePlacesEventCallback*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::WebGLContextLossHandler>::WeakPtr(mozilla::WebGLContextLossHandler*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::webgl::LinkedProgramInfo const>::WeakPtr(mozilla::webgl::LinkedProgramInfo const*) Unexecuted instantiation: mozilla::WeakPtr<nsGeolocationRequest>::WeakPtr(nsGeolocationRequest*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::AutoplayPermissionManager>::WeakPtr(mozilla::AutoplayPermissionManager*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::FrameCaptureListener>::WeakPtr(mozilla::dom::FrameCaptureListener*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::MediaStreamTrackSource::Sink>::WeakPtr(mozilla::dom::MediaStreamTrackSource::Sink*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::HTMLMediaElement>::WeakPtr(mozilla::dom::HTMLMediaElement*) Unexecuted instantiation: mozilla::WeakPtr<nsTextEditorState>::WeakPtr(nsTextEditorState*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::SourceListener>::WeakPtr(mozilla::SourceListener*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::MediaStreamTrackConsumer>::WeakPtr(mozilla::dom::MediaStreamTrackConsumer*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::MediaKeys>::WeakPtr(mozilla::dom::MediaKeys*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::SpeechRecognition>::WeakPtr(mozilla::dom::SpeechRecognition*) Unexecuted instantiation: mozilla::WeakPtr<nsXBLPrototypeBinding>::WeakPtr(nsXBLPrototypeBinding*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PresentationAvailability>::WeakPtr(mozilla::dom::PresentationAvailability*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PresentationConnection>::WeakPtr(mozilla::dom::PresentationConnection*) Unexecuted instantiation: mozilla::WeakPtr<nsPresContext>::WeakPtr(nsPresContext*) Unexecuted instantiation: mozilla::WeakPtr<nsDocShell>::WeakPtr(nsDocShell*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::CSSStyleRule>::WeakPtr(mozilla::dom::CSSStyleRule*) Unexecuted instantiation: mozilla::WeakPtr<mozilla::extensions::ChannelWrapper>::WeakPtr(mozilla::extensions::ChannelWrapper*) |
272 | | |
273 | | // Ensure that mRef is dereferenceable in the uninitialized state. |
274 | 0 | WeakPtr() : mRef(new WeakReference(nullptr)) {} Unexecuted instantiation: Unified_cpp_xpcom_base2.cpp:mozilla::WeakPtr<(anonymous namespace)::MessageLoopIdleTask>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::net::Http2Stream>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::DataChannelConnection::DataConnectionListener>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::layers::PCompositorManagerChild>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::layers::PCompositorManagerParent>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PContentChild>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PContentParent>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::net::PNeckoChild>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::net::PNeckoParent>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::PProfilerChild>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::PProfilerParent>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::PRemoteSpellcheckEngineChild>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::PRemoteSpellcheckEngineParent>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PServiceWorkerContainerChild>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PServiceWorkerContainerParent>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PServiceWorkerRegistrationChild>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PServiceWorkerRegistrationParent>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PBrowserChild>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PBrowserParent>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::cache::PCacheStreamControlChild>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::cache::PCacheStreamControlParent>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<nsOfflineCacheUpdateOwner>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::gl::GLContext>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::gl::SurfaceFactory>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::layers::ImageContainer>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::image::IProgressObserver>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::image::ProgressTracker>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::image::RasterImage>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PlacesWeakCallbackWrapper>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::Selection>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::CSSStyleRule>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<nsDocShell>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::WebGLContextLossHandler>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::WebGLFramebuffer>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::webgl::LinkedProgramInfo>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<nsGeolocationRequest>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::AutoplayPermissionManager>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::MediaStreamTrackSource::Sink>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::HTMLMediaElement>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<nsTextEditorState>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::FrameCaptureListener>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::MediaStreamTrackConsumer>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::SourceListener>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::MediaKeys>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PannerNode>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::SpeechRecognition>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<nsNPAPIPluginInstance>::WeakPtr() Unexecuted instantiation: ProcessHangMonitor.cpp:mozilla::WeakPtr<(anonymous namespace)::HangMonitorParent>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::Worker>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::Promise>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<nsXBLPrototypeBinding>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PresentationAvailability>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PresentationConnection>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<nsPresContext>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::BrowsingContext>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::extensions::WebExtensionPolicy>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::extensions::ChannelWrapper>::WeakPtr() Unexecuted instantiation: mozilla::WeakPtr<mozilla::places::INativePlacesEventCallback>::WeakPtr() |
275 | | |
276 | 0 | operator T*() const { return mRef->get(); } Unexecuted instantiation: mozilla::WeakPtr<nsDocShell>::operator nsDocShell*() const Unexecuted instantiation: mozilla::WeakPtr<nsPresContext>::operator nsPresContext*() const Unexecuted instantiation: Unified_cpp_xpcom_base2.cpp:mozilla::WeakPtr<(anonymous namespace)::MessageLoopIdleTask>::operator (anonymous namespace)::MessageLoopIdleTask*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::image::IProgressObserver>::operator mozilla::image::IProgressObserver*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::net::Http2Stream>::operator mozilla::net::Http2Stream*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::extensions::ChannelWrapper>::operator mozilla::extensions::ChannelWrapper*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::DataChannelConnection::DataConnectionListener>::operator mozilla::DataChannelConnection::DataConnectionListener*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::MediaStreamTrackSource::Sink>::operator mozilla::dom::MediaStreamTrackSource::Sink*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::layers::PCompositorManagerChild>::operator mozilla::layers::PCompositorManagerChild*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::layers::PCompositorManagerParent>::operator mozilla::layers::PCompositorManagerParent*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PContentChild>::operator mozilla::dom::PContentChild*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PContentParent>::operator mozilla::dom::PContentParent*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::net::PNeckoChild>::operator mozilla::net::PNeckoChild*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::net::PNeckoParent>::operator mozilla::net::PNeckoParent*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::PProfilerChild>::operator mozilla::PProfilerChild*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::PProfilerParent>::operator mozilla::PProfilerParent*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::PRemoteSpellcheckEngineChild>::operator mozilla::PRemoteSpellcheckEngineChild*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::PRemoteSpellcheckEngineParent>::operator mozilla::PRemoteSpellcheckEngineParent*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PServiceWorkerContainerChild>::operator mozilla::dom::PServiceWorkerContainerChild*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PServiceWorkerContainerParent>::operator mozilla::dom::PServiceWorkerContainerParent*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PServiceWorkerRegistrationChild>::operator mozilla::dom::PServiceWorkerRegistrationChild*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PServiceWorkerRegistrationParent>::operator mozilla::dom::PServiceWorkerRegistrationParent*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PBrowserChild>::operator mozilla::dom::PBrowserChild*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PBrowserParent>::operator mozilla::dom::PBrowserParent*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::cache::PCacheStreamControlChild>::operator mozilla::dom::cache::PCacheStreamControlChild*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::cache::PCacheStreamControlParent>::operator mozilla::dom::cache::PCacheStreamControlParent*() const Unexecuted instantiation: mozilla::WeakPtr<nsOfflineCacheUpdateOwner>::operator nsOfflineCacheUpdateOwner*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::extensions::WebExtensionPolicy>::operator mozilla::extensions::WebExtensionPolicy*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::gl::GLContext>::operator mozilla::gl::GLContext*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::gl::SurfaceFactory>::operator mozilla::gl::SurfaceFactory*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::layers::ImageContainer>::operator mozilla::layers::ImageContainer*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::FrameCaptureListener>::operator mozilla::dom::FrameCaptureListener*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::image::ProgressTracker>::operator mozilla::image::ProgressTracker*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::image::RasterImage>::operator mozilla::image::RasterImage*() const Unexecuted instantiation: mozilla::WeakPtr<nsXBLPrototypeBinding>::operator nsXBLPrototypeBinding*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PlacesWeakCallbackWrapper>::operator mozilla::dom::PlacesWeakCallbackWrapper*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::places::INativePlacesEventCallback>::operator mozilla::places::INativePlacesEventCallback*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::Selection>::operator mozilla::dom::Selection*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::CSSStyleRule>::operator mozilla::dom::CSSStyleRule*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::SpeechRecognition>::operator mozilla::dom::SpeechRecognition*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::WebGLFramebuffer>::operator mozilla::WebGLFramebuffer*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::WebGLContextLossHandler>::operator mozilla::WebGLContextLossHandler*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::webgl::LinkedProgramInfo>::operator mozilla::webgl::LinkedProgramInfo*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::webgl::LinkedProgramInfo const>::operator mozilla::webgl::LinkedProgramInfo const*() const Unexecuted instantiation: mozilla::WeakPtr<nsGeolocationRequest>::operator nsGeolocationRequest*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::AutoplayPermissionManager>::operator mozilla::AutoplayPermissionManager*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::HTMLMediaElement>::operator mozilla::dom::HTMLMediaElement*() const Unexecuted instantiation: mozilla::WeakPtr<nsTextEditorState>::operator nsTextEditorState*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::MediaStreamTrackConsumer>::operator mozilla::dom::MediaStreamTrackConsumer*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::SourceListener>::operator mozilla::SourceListener*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::MediaKeys>::operator mozilla::dom::MediaKeys*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PannerNode>::operator mozilla::dom::PannerNode*() const Unexecuted instantiation: mozilla::WeakPtr<nsNPAPIPluginInstance>::operator nsNPAPIPluginInstance*() const Unexecuted instantiation: ProcessHangMonitor.cpp:mozilla::WeakPtr<(anonymous namespace)::HangMonitorParent>::operator (anonymous namespace)::HangMonitorParent*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::Worker>::operator mozilla::dom::Worker*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::Promise>::operator mozilla::dom::Promise*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PresentationAvailability>::operator mozilla::dom::PresentationAvailability*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PresentationConnection>::operator mozilla::dom::PresentationConnection*() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::BrowsingContext>::operator mozilla::dom::BrowsingContext*() const |
277 | | T& operator*() const { return *mRef->get(); } |
278 | | |
279 | 0 | T* operator->() const MOZ_NO_ADDREF_RELEASE_ON_RETURN { return mRef->get(); } Unexecuted instantiation: Unified_cpp_xpcom_base2.cpp:mozilla::WeakPtr<(anonymous namespace)::MessageLoopIdleTask>::operator->() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::net::Http2Stream>::operator->() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::DataChannelConnection::DataConnectionListener>::operator->() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::MediaStreamTrackSource::Sink>::operator->() const Unexecuted instantiation: mozilla::WeakPtr<nsOfflineCacheUpdateOwner>::operator->() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::gl::GLContext>::operator->() const Unexecuted instantiation: mozilla::WeakPtr<nsDocShell>::operator->() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::WebGLContextLossHandler>::operator->() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::webgl::LinkedProgramInfo const>::operator->() const Unexecuted instantiation: mozilla::WeakPtr<nsGeolocationRequest>::operator->() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::AutoplayPermissionManager>::operator->() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::FrameCaptureListener>::operator->() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::HTMLMediaElement>::operator->() const Unexecuted instantiation: mozilla::WeakPtr<nsTextEditorState>::operator->() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::SourceListener>::operator->() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::MediaStreamTrackConsumer>::operator->() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::MediaKeys>::operator->() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::SpeechRecognition>::operator->() const Unexecuted instantiation: mozilla::WeakPtr<nsXBLPrototypeBinding>::operator->() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PresentationAvailability>::operator->() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PresentationConnection>::operator->() const Unexecuted instantiation: mozilla::WeakPtr<nsPresContext>::operator->() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::Selection>::operator->() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::BrowsingContext>::operator->() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::extensions::ChannelWrapper>::operator->() const |
280 | | |
281 | 0 | T* get() const { return mRef->get(); } Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::BrowsingContext>::get() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::DataChannelConnection::DataConnectionListener>::get() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::layers::ImageContainer>::get() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::image::IProgressObserver>::get() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PlacesWeakCallbackWrapper>::get() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::places::INativePlacesEventCallback>::get() const Unexecuted instantiation: mozilla::WeakPtr<nsDocShell>::get() const Unexecuted instantiation: mozilla::WeakPtr<nsTextEditorState>::get() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PresentationAvailability>::get() const Unexecuted instantiation: mozilla::WeakPtr<mozilla::dom::PresentationConnection>::get() const |
282 | | |
283 | | private: |
284 | | friend class SupportsWeakPtr<T>; |
285 | | |
286 | | explicit WeakPtr(const RefPtr<WeakReference>& aOther) : mRef(aOther) {} |
287 | | |
288 | | RefPtr<WeakReference> mRef; |
289 | | }; |
290 | | |
291 | | } // namespace mozilla |
292 | | |
293 | | #endif /* mozilla_WeakPtr_h */ |