diff options
author | Moonchild <moonchild@palemoon.org> | 2021-09-09 13:37:46 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2022-04-01 14:27:25 +0200 |
commit | 44d2b36effffd47a62c182fba52d4fc3e8b7c036 (patch) | |
tree | 75da8a576d8410fe874e9dd5bd2abe0dc59248d2 /dom/ipc | |
parent | c6b1b30bb562736c3a779cfc3a1c9f593016a083 (diff) | |
download | uxp-44d2b36effffd47a62c182fba52d4fc3e8b7c036.tar.gz |
[DOM] Use RefPtr in ContentChild::RecvGetFilesResponse.
Diffstat (limited to 'dom/ipc')
-rw-r--r-- | dom/ipc/ContentChild.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/dom/ipc/ContentChild.cpp b/dom/ipc/ContentChild.cpp index 046934277c..5ff77092ab 100644 --- a/dom/ipc/ContentChild.cpp +++ b/dom/ipc/ContentChild.cpp @@ -2817,10 +2817,10 @@ bool ContentChild::RecvGetFilesResponse(const nsID& aUUID, const GetFilesResponseResult& aResult) { - GetFilesHelperChild* child = mGetFilesPendingRequests.GetWeak(aUUID); + RefPtr<GetFilesHelperChild> child; // This object can already been deleted in case DeleteGetFilesRequest has // been called when the response was sending by the parent. - if (!child) { + if (!mGetFilesPendingRequests.Remove(aUUID, getter_AddRefs(child))) { return true; } @@ -2841,7 +2841,6 @@ ContentChild::RecvGetFilesResponse(const nsID& aUUID, child->Finished(succeeded ? NS_OK : NS_ERROR_OUT_OF_MEMORY); } - mGetFilesPendingRequests.Remove(aUUID); return true; } |