diff --git a/src/elements.h b/src/elements.h index 9d86bbd657..05354eaccf 100644 --- a/src/elements.h +++ b/src/elements.h @@ -179,7 +179,7 @@ class ElementsAccessor { // Returns a shared ElementsAccessor for the specified ElementsKind. static ElementsAccessor* ForKind(ElementsKind elements_kind) { - DCHECK(elements_kind < kElementsKindCount); + DCHECK(static_cast(elements_kind) < kElementsKindCount); return elements_accessors_[elements_kind]; } diff --git a/src/objects.h b/src/objects.h index c284a49ea6..d17d0d1ef1 100644 --- a/src/objects.h +++ b/src/objects.h @@ -5739,7 +5739,7 @@ class Map: public HeapObject { inline bool is_prototype_map(); inline void set_elements_kind(ElementsKind elements_kind) { - DCHECK(elements_kind < kElementsKindCount); + DCHECK(static_cast(elements_kind) < kElementsKindCount); DCHECK(kElementsKindCount <= (1 << Map::ElementsKindBits::kSize)); set_bit_field2(Map::ElementsKindBits::update(bit_field2(), elements_kind)); DCHECK(this->elements_kind() == elements_kind);