Commit 39cab48f authored by danno@chromium.org's avatar danno@chromium.org

Add undefined check for default Array map in ArrayCodeGenericCommon

TBR=jkummerow@chromium.org
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9290064

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10524 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 57525ef8
......@@ -198,8 +198,9 @@ static MaybeObject* ArrayCodeGenericCommon(Arguments* args,
array->set_length(Smi::FromInt(0));
array->set_elements(heap->empty_fixed_array());
if (!FLAG_smi_only_arrays) {
if (array->GetElementsKind() == FAST_SMI_ONLY_ELEMENTS) {
Context* global_context = isolate->context()->global_context();
Context* global_context = isolate->context()->global_context();
if (array->GetElementsKind() == FAST_SMI_ONLY_ELEMENTS &&
!global_context->object_js_array_map()->IsUndefined()) {
array->set_map(Map::cast(global_context->object_js_array_map()));
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment