summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chromium/mojo/public/cpp/bindings/receiver_set.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/chromium/mojo/public/cpp/bindings/receiver_set.h b/chromium/mojo/public/cpp/bindings/receiver_set.h
index 6cd2b982077..84ac4527dae 100644
--- a/chromium/mojo/public/cpp/bindings/receiver_set.h
+++ b/chromium/mojo/public/cpp/bindings/receiver_set.h
@@ -24,7 +24,7 @@
namespace mojo {
-using ReceiverId = size_t;
+using ReceiverId = uint64_t;
template <typename ReceiverType>
struct ReceiverSetTraits;
@@ -361,11 +361,11 @@ class ReceiverSetBase {
Context context,
scoped_refptr<base::SequencedTaskRunner> task_runner) {
ReceiverId id = next_receiver_id_++;
- DCHECK_GE(next_receiver_id_, 0u);
auto entry =
std::make_unique<Entry>(std::move(impl), std::move(receiver), this, id,
std::move(context), std::move(task_runner));
- receivers_.insert(std::make_pair(id, std::move(entry)));
+ auto result = receivers_.insert(std::make_pair(id, std::move(entry)));
+ CHECK(result.second) << "ReceiverId overflow with collision";
return id;
}