summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2021-09-09 13:37:46 +0000
committerMoonchild <moonchild@palemoon.org>2021-09-09 13:37:46 +0000
commit54049372176f23137016d4084495db1f6ac876b7 (patch)
tree75da8a576d8410fe874e9dd5bd2abe0dc59248d2
parent6f625bc364ac1f12c989ce4e95d0c64a5a919679 (diff)
downloaduxp-54049372176f23137016d4084495db1f6ac876b7.tar.gz
[DOM] Use RefPtr in ContentChild::RecvGetFilesResponse.
-rw-r--r--dom/ipc/ContentChild.cpp5
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;
}