Index: src/objects.h |
diff --git a/src/objects.h b/src/objects.h |
index 6a1542280d020fa59b6abfca431361c5f573b3cf..c0cfebbb138f241e68ac7bdd51385930b5c0d14d 100644 |
--- a/src/objects.h |
+++ b/src/objects.h |
@@ -4822,6 +4822,10 @@ class Map: public HeapObject { |
inline void set_elements_kind(ElementsKind elements_kind) { |
ASSERT(elements_kind < kElementsKindCount); |
ASSERT(kElementsKindCount <= (1 << kElementsKindBitCount)); |
+ ASSERT(!is_observed() || |
+ elements_kind == DICTIONARY_ELEMENTS || |
+ elements_kind == NON_STRICT_ARGUMENTS_ELEMENTS || |
+ IsExternalArrayElementsKind(elements_kind)); |
set_bit_field2((bit_field2() & ~kElementsKindMask) | |
(elements_kind << kElementsKindShift)); |
ASSERT(this->elements_kind() == elements_kind); |