Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXuguang Mei <meixg@foxmail.com>2022-03-06 12:24:42 +0300
committerGitHub <noreply@github.com>2022-03-06 12:24:42 +0300
commit3d4f3ca5eb598107eab8e4f4ee775e431e8e1bff (patch)
treecc891d9b25cf283846126a4979a0bdf34a7121b9 /src/node_blob.cc
parent406949e4dca34a84a7fbcc32ac41f25c7426f40c (diff)
src: skip revoke_data_object if uuid is not found
Fix: https://github.com/nodejs/node/issues/42206 PR-URL: https://github.com/nodejs/node/pull/42212 Fixes: https://github.com/nodejs/node/issues/42206 Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Mestery <mestery@protonmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
Diffstat (limited to 'src/node_blob.cc')
-rw-r--r--src/node_blob.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/node_blob.cc b/src/node_blob.cc
index 0d23158256c..e1bf3be2b07 100644
--- a/src/node_blob.cc
+++ b/src/node_blob.cc
@@ -444,7 +444,9 @@ void BlobBindingData::store_data_object(
}
void BlobBindingData::revoke_data_object(const std::string& uuid) {
- CHECK_NE(data_objects_.find(uuid), data_objects_.end());
+ if (data_objects_.find(uuid) == data_objects_.end()) {
+ return;
+ }
data_objects_.erase(uuid);
CHECK_EQ(data_objects_.find(uuid), data_objects_.end());
}