Index: src/arm/full-codegen-arm.cc |
diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc |
index 6116513569c7f171d1f2f79de7f3537aad64e6f3..98e22686d2cbe8fe55545006f64c5cc3cde7eda1 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); |