Index: src/hydrogen-instructions.cc |
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc |
index 31d7d153f9b36a51ccef8ad76609bcb0a54debfd..1ff7f16fdf4195f19184eefe8c72093db641c71d 100644 |
--- a/src/hydrogen-instructions.cc |
+++ b/src/hydrogen-instructions.cc |
@@ -1227,7 +1227,9 @@ void HConstant::PrintDataTo(StringStream* stream) { |
bool HArrayLiteral::IsCopyOnWrite() const { |
- return boilerplate_object_->elements()->map() == HEAP->fixed_cow_array_map(); |
+ if (!boilerplate_object_->IsJSObject()) return false; |
+ return Handle<JSObject>::cast(boilerplate_object_)->elements()->map() == |
+ HEAP->fixed_cow_array_map(); |
} |