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..12f20422d758e5cb93905308c8b99cbd1cda0edf 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_native()) { |
Label ok; |
__ cmp(r5, Operand(0)); |
__ b(eq, &ok); |