From a3e6917887d3e494c14920b09b0ba722b7257eed Mon Sep 17 00:00:00 2001 From: roytam1 Date: Fri, 8 Sep 2023 08:02:31 +0800 Subject: [PATCH] Revert "[DOM] Make IORunnable::mFilePickerParent into a RefPtr." This reverts commit 0359d8a9e73968b3ed825a4f1e88ea4d894595fe. --- dom/ipc/FilePickerParent.cpp | 1 - dom/ipc/FilePickerParent.h | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/dom/ipc/FilePickerParent.cpp b/dom/ipc/FilePickerParent.cpp index 0271890758..1438e374fe 100644 --- a/dom/ipc/FilePickerParent.cpp +++ b/dom/ipc/FilePickerParent.cpp @@ -286,7 +286,6 @@ FilePickerParent::RecvOpen(const int16_t& aSelectedType, } } - MOZ_ASSERT(!mCallback); mCallback = new FilePickerShownCallback(this); mFilePicker->Open(mCallback); diff --git a/dom/ipc/FilePickerParent.h b/dom/ipc/FilePickerParent.h index 7ab2f7dab1..332007a715 100644 --- a/dom/ipc/FilePickerParent.h +++ b/dom/ipc/FilePickerParent.h @@ -69,7 +69,7 @@ class FilePickerParent : public PFilePickerParent private: virtual ~FilePickerShownCallback() {} - RefPtr mFilePickerParent; + FilePickerParent* mFilePickerParent; }; private: @@ -78,7 +78,7 @@ class FilePickerParent : public PFilePickerParent // This runnable is used to do some I/O operation on a separate thread. class IORunnable : public Runnable { - RefPtr mFilePickerParent; + FilePickerParent* mFilePickerParent; nsTArray> mFiles; nsTArray mResults; nsCOMPtr mEventTarget;