Index: src/ia32/full-codegen-ia32.cc |
diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc |
index 6c38b70e5464d4552574034b20008f8837796166..703330142e12aa3b00f90b63f42aa9f6cfc01749 100644 |
--- a/src/ia32/full-codegen-ia32.cc |
+++ b/src/ia32/full-codegen-ia32.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; |