From 32e8155127126c187ce32f7368742057bcaf69da Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Fri, 17 Apr 2020 05:47:12 -0400 Subject: Bug 1372829 - Part 2: mozilla::EditorBase should cache raw pointer of nsISelectionController and nsIDocument with nsWeakPtr Tag #1375 --- xpcom/glue/nsWeakReference.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'xpcom/glue') diff --git a/xpcom/glue/nsWeakReference.cpp b/xpcom/glue/nsWeakReference.cpp index 57f372641..be263e1c2 100644 --- a/xpcom/glue/nsWeakReference.cpp +++ b/xpcom/glue/nsWeakReference.cpp @@ -37,6 +37,7 @@ public: // nsIWeakReference... NS_DECL_NSIWEAKREFERENCE virtual size_t SizeOfOnlyThis(mozilla::MallocSizeOf aMallocSizeOf) const override; + bool IsAlive() const override { return mReferent != nullptr; } private: MOZ_WEAKREF_DECL_OWNINGTHREAD -- cgit v1.2.3