| Index: src/ia32/stub-cache-ia32.cc
|
| ===================================================================
|
| --- src/ia32/stub-cache-ia32.cc (revision 4551)
|
| +++ src/ia32/stub-cache-ia32.cc (working copy)
|
| @@ -1223,6 +1223,11 @@
|
| // -----------------------------------
|
| ASSERT(check == RECEIVER_MAP_CHECK);
|
|
|
| + // If object is not an array, bail out to regular call.
|
| + if (!object->IsJSArray()) {
|
| + return Heap::undefined_value();
|
| + }
|
| +
|
| Label miss;
|
|
|
| // Get the receiver from the stack.
|
| @@ -1371,6 +1376,11 @@
|
| // -----------------------------------
|
| ASSERT(check == RECEIVER_MAP_CHECK);
|
|
|
| + // If object is not an array, bail out to regular call.
|
| + if (!object->IsJSArray()) {
|
| + return Heap::undefined_value();
|
| + }
|
| +
|
| Label miss, empty_array, call_builtin;
|
|
|
| // Get the receiver from the stack.
|
| @@ -1458,7 +1468,11 @@
|
| if (function_info->HasCustomCallGenerator()) {
|
| CustomCallGenerator generator =
|
| ToCData<CustomCallGenerator>(function_info->function_data());
|
| - return generator(this, object, holder, function, name, check);
|
| + Object* result = generator(this, object, holder, function, name, check);
|
| + // undefined means bail out to regular compiler.
|
| + if (!result->IsUndefined()) {
|
| + return result;
|
| + }
|
| }
|
|
|
| Label miss_in_smi_check;
|
|
|