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
This commit is contained in:
parent
57525ef893
commit
39cab48faf
@ -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()));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user