Index: src/runtime/runtime-array.cc |
diff --git a/src/runtime/runtime-array.cc b/src/runtime/runtime-array.cc |
index a92215c85d046ab8121dab8248d336c96e55fe15..68543d9a267c9c1473d12d3edbb89cab56a6accd 100644 |
--- a/src/runtime/runtime-array.cc |
+++ b/src/runtime/runtime-array.cc |
@@ -86,11 +86,12 @@ RUNTIME_FUNCTION(Runtime_FixedArraySet) { |
RUNTIME_FUNCTION(Runtime_TransitionElementsKind) { |
HandleScope scope(isolate); |
- DCHECK(args.length() == 2); |
- CONVERT_ARG_HANDLE_CHECKED(JSArray, array, 0); |
- CONVERT_ARG_HANDLE_CHECKED(Map, map, 1); |
- JSObject::TransitionElementsKind(array, map->elements_kind()); |
- return *array; |
+ DCHECK_EQ(2, args.length()); |
+ CONVERT_ARG_HANDLE_CHECKED(JSArray, object, 0); |
+ CONVERT_ARG_HANDLE_CHECKED(Map, to_map, 1); |
+ ElementsKind to_kind = to_map->elements_kind(); |
+ ElementsAccessor::ForKind(to_kind)->TransitionElementsKind(object, to_map); |
+ return *object; |
} |