Index: src/runtime/runtime-typedarray.cc |
diff --git a/src/runtime/runtime-typedarray.cc b/src/runtime/runtime-typedarray.cc |
index 80d57bc3f2d11c5cb64573db9852b31e4d549e9e..963f1862bc7b965d77bb7a3733541500d7f7bf01 100644 |
--- a/src/runtime/runtime-typedarray.cc |
+++ b/src/runtime/runtime-typedarray.cc |
@@ -204,6 +204,7 @@ RUNTIME_FUNCTION(Runtime_TypedArrayInitializeFromArrayLike) { |
length = JSTypedArray::cast(*source)->length_value(); |
} else { |
CHECK(TryNumberToSize(*length_obj, &length)); |
+ CHECK(length_obj->IsSmi()); |
} |
if ((length > static_cast<unsigned>(Smi::kMaxValue)) || |