Index: runtime/vm/object_id_ring.cc |
diff --git a/runtime/vm/object_id_ring.cc b/runtime/vm/object_id_ring.cc |
index f7199bddbcd652d82b5c4337e63aba8f632fc968..434463b734cdfec29e24da22700b27415feab42c 100644 |
--- a/runtime/vm/object_id_ring.cc |
+++ b/runtime/vm/object_id_ring.cc |
@@ -129,6 +129,9 @@ bool ObjectIdRing::IsValidId(int32_t id) { |
if (id == kInvalidId) { |
return false; |
} |
+ if (id < 0) { |
+ return false; |
+ } |
if (id >= max_serial_) { |
return false; |
} |