Index: src/arm/full-codegen-arm.cc |
diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc |
index 22846c38b6f9193503dadfe76261623d9100afc6..58bcac89e91989e72a14de076f52c170182d65a9 100644 |
--- a/src/arm/full-codegen-arm.cc |
+++ b/src/arm/full-codegen-arm.cc |
@@ -139,11 +139,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). r5 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). r5 is zero for method calls and non-zero for |
+ // function calls. |
+ if (info->is_strict_mode() || info->is_es5_native()) { |
Label ok; |
__ cmp(r5, Operand(0)); |
__ b(eq, &ok); |