Index: src/full-codegen/x87/full-codegen-x87.cc |
diff --git a/src/full-codegen/x87/full-codegen-x87.cc b/src/full-codegen/x87/full-codegen-x87.cc |
index e221492bf0a3449b9fd6236171252093cb2a12d5..9e2d95cbff09bbd7deda3f20eb38e48044da5822 100644 |
--- a/src/full-codegen/x87/full-codegen-x87.cc |
+++ b/src/full-codegen/x87/full-codegen-x87.cc |
@@ -109,8 +109,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()) { |
+ if (info->MustReplaceUndefinedReceiverWithGlobalProxy()) { |
Label ok; |
// +1 for return address. |
int receiver_offset = (info->scope()->num_parameters() + 1) * kPointerSize; |