| Index: src/ia32/full-codegen-ia32.cc
|
| diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc
|
| index 8b941e9a3a8e6a1af90127117d70173cec9916c8..f479c825f35e94fed8b89ca37a7e0f1bd9ad531c 100644
|
| --- a/src/ia32/full-codegen-ia32.cc
|
| +++ b/src/ia32/full-codegen-ia32.cc
|
| @@ -131,11 +131,11 @@ void FullCodeGenerator::Generate(CompilationInfo* info) {
|
| }
|
| #endif
|
|
|
| - // Strict mode functions need to replace the receiver with undefined
|
| - // when called as functions (without an explicit receiver
|
| - // object). ecx is zero for method calls and non-zero for function
|
| - // calls.
|
| - if (info->is_strict_mode()) {
|
| + // Strict mode functions and builtins need to replace the receiver
|
| + // with undefined when called as functions (without an explicit
|
| + // receiver object). ecx is zero for method calls and non-zero for
|
| + // function calls.
|
| + if (info->is_strict_mode() || info->is_native()) {
|
| Label ok;
|
| __ test(ecx, Operand(ecx));
|
| __ j(zero, &ok, Label::kNear);
|
|
|