Index: src/runtime.cc |
diff --git a/src/runtime.cc b/src/runtime.cc |
index 7dc6bce49782f99e4181ca3a2272dee781a70aaf..d7b571060857cf66970eb9609668e99f76ce1f47 100644 |
--- a/src/runtime.cc |
+++ b/src/runtime.cc |
@@ -7952,21 +7952,18 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_NewStrictArgumentsFast) { |
// Allocate the elements if needed. |
if (length > 0) { |
// Allocate the fixed array. |
- Object* obj; |
- { MaybeObject* maybe_obj = isolate->heap()->AllocateRawFixedArray(length); |
- if (!maybe_obj->ToObject(&obj)) return maybe_obj; |
+ FixedArray* array; |
+ { MaybeObject* maybe_obj = |
+ isolate->heap()->AllocateUninitializedFixedArray(length); |
+ if (!maybe_obj->To(&array)) return maybe_obj; |
} |
DisallowHeapAllocation no_gc; |
- FixedArray* array = reinterpret_cast<FixedArray*>(obj); |
- array->set_map_no_write_barrier(isolate->heap()->fixed_array_map()); |
- array->set_length(length); |
- |
WriteBarrierMode mode = array->GetWriteBarrierMode(no_gc); |
for (int i = 0; i < length; i++) { |
array->set(i, *--parameters, mode); |
} |
- JSObject::cast(result)->set_elements(FixedArray::cast(obj)); |
+ JSObject::cast(result)->set_elements(array); |
} |
return result; |
} |