Index: src/full-codegen/arm/full-codegen-arm.cc |
diff --git a/src/full-codegen/arm/full-codegen-arm.cc b/src/full-codegen/arm/full-codegen-arm.cc |
index 598d8e9f6e2af813515a1d6a70591757c6d32318..ef65b31c541f4b93ff5273a2f941e4580811f520 100644 |
--- a/src/full-codegen/arm/full-codegen-arm.cc |
+++ b/src/full-codegen/arm/full-codegen-arm.cc |
@@ -120,8 +120,7 @@ void FullCodeGenerator::Generate() { |
// Sloppy mode functions and builtins need to replace the receiver with the |
// global proxy when called as functions (without an explicit receiver |
// object). |
- if (is_sloppy(info->language_mode()) && !info->is_native() && |
- info->MayUseThis() && info->scope()->has_this_declaration()) { |
+ if (info->MustReplaceUndefinedReceiverWithGlobalProxy()) { |
Label ok; |
int receiver_offset = info->scope()->num_parameters() * kPointerSize; |
__ ldr(r2, MemOperand(sp, receiver_offset)); |