forked from mirrors/gecko-dev
Bug 1904407 - Clear nsColorPickerProxy's callback when we destroy the actor. a=dmeehan
Original Revision: https://phabricator.services.mozilla.com/D214739 Differential Revision: https://phabricator.services.mozilla.com/D216959
This commit is contained in:
parent
6d349fbdac
commit
ab63865b5d
2 changed files with 8 additions and 0 deletions
|
|
@ -52,3 +52,10 @@ mozilla::ipc::IPCResult nsColorPickerProxy::Recv__delete__(
|
|||
}
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
void nsColorPickerProxy::ActorDestroy(ActorDestroyReason aWhy) {
|
||||
if (mCallback) {
|
||||
mCallback->Done(u""_ns);
|
||||
mCallback = nullptr;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ class nsColorPickerProxy final : public nsIColorPicker,
|
|||
virtual mozilla::ipc::IPCResult RecvUpdate(const nsAString& aColor) override;
|
||||
virtual mozilla::ipc::IPCResult Recv__delete__(
|
||||
const nsAString& aColor) override;
|
||||
virtual void ActorDestroy(ActorDestroyReason aWhy) override;
|
||||
|
||||
private:
|
||||
~nsColorPickerProxy() = default;
|
||||
|
|
|
|||
Loading…
Reference in a new issue