Index: src/ia32/lithium-codegen-ia32.cc |
diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc |
index 7cc27744c76a8038997bf780a7cc2fb9e70f9148..19df65c28a034abae34b507f12b3c82dfd07a18f 100644 |
--- a/src/ia32/lithium-codegen-ia32.cc |
+++ b/src/ia32/lithium-codegen-ia32.cc |
@@ -128,11 +128,11 @@ bool LCodeGen::GeneratePrologue() { |
} |
#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); |