Index: src/x87/full-codegen-x87.cc |
diff --git a/src/x87/full-codegen-x87.cc b/src/x87/full-codegen-x87.cc |
index 3a6edec82be993d679f2ddd75c34726a46a9d4d0..3dbb6d41b128b27ddce603a58aff3e7c49f83d38 100644 |
--- a/src/x87/full-codegen-x87.cc |
+++ b/src/x87/full-codegen-x87.cc |
@@ -114,7 +114,8 @@ 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()) { |
+ if (is_sloppy(info->language_mode()) && !info->is_native() && |
+ info->MayUseThis()) { |
Label ok; |
// +1 for return address. |
int receiver_offset = (info->scope()->num_parameters() + 1) * kPointerSize; |