mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-17 06:09:19 +00:00
Bug 1846689 - Make IORunnable::mFilePickerParent into a RefPtr. r=mccr8, a=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D185820
This commit is contained in:
parent
50ee8d7d35
commit
1decd8e08e
@ -274,6 +274,7 @@ mozilla::ipc::IPCResult FilePickerParent::RecvOpen(
|
||||
mFilePicker->SetDisplaySpecialDirectory(aDisplaySpecialDirectory);
|
||||
}
|
||||
|
||||
MOZ_ASSERT(!mCallback);
|
||||
mCallback = new FilePickerShownCallback(this);
|
||||
|
||||
mFilePicker->Open(mCallback);
|
||||
|
@ -62,7 +62,7 @@ class FilePickerParent : public PFilePickerParent {
|
||||
|
||||
private:
|
||||
virtual ~FilePickerShownCallback() = default;
|
||||
FilePickerParent* mFilePickerParent;
|
||||
RefPtr<FilePickerParent> mFilePickerParent;
|
||||
};
|
||||
|
||||
private:
|
||||
@ -70,7 +70,7 @@ class FilePickerParent : public PFilePickerParent {
|
||||
|
||||
// This runnable is used to do some I/O operation on a separate thread.
|
||||
class IORunnable : public Runnable {
|
||||
FilePickerParent* mFilePickerParent;
|
||||
RefPtr<FilePickerParent> mFilePickerParent;
|
||||
nsTArray<nsCOMPtr<nsIFile>> mFiles;
|
||||
nsTArray<BlobImplOrString> mResults;
|
||||
nsCOMPtr<nsIEventTarget> mEventTarget;
|
||||
|
Loading…
x
Reference in New Issue
Block a user