Index: src/heap/heap.cc |
diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
index 9c6029eadd3bb6f0eade26a96d75ff4c4659d391..1c2c76768dda6245a682642ea66fbc529c72bebd 100644 |
--- a/src/heap/heap.cc |
+++ b/src/heap/heap.cc |
@@ -3553,10 +3553,11 @@ AllocationResult Heap::CopyJSObject(JSObject* source, AllocationSite* site) { |
// Make the clone. |
Map* map = source->map(); |
- // We can only clone regexps, normal objects, api objects or arrays. Copying |
- // anything else will break invariants. |
+ // We can only clone regexps, normal objects, api objects, errors or arrays. |
+ // Copying anything else will break invariants. |
CHECK(map->instance_type() == JS_REGEXP_TYPE || |
map->instance_type() == JS_OBJECT_TYPE || |
+ map->instance_type() == JS_ERROR_TYPE || |
map->instance_type() == JS_ARRAY_TYPE || |
map->instance_type() == JS_API_OBJECT_TYPE || |
map->instance_type() == JS_SPECIAL_API_OBJECT_TYPE); |