Index: src/x87/lithium-codegen-x87.cc |
diff --git a/src/x87/lithium-codegen-x87.cc b/src/x87/lithium-codegen-x87.cc |
index ef8ee0eaa140c2e016e6a46b9cdaf924f7895485..cfe03d20ce12f04422c35762bbe750a09f81aed6 100644 |
--- a/src/x87/lithium-codegen-x87.cc |
+++ b/src/x87/lithium-codegen-x87.cc |
@@ -109,8 +109,7 @@ bool LCodeGen::GeneratePrologue() { |
// 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()->MayUseThis() && |
- !info()->is_native() && info()->scope()->has_this_declaration()) { |
+ if (info()->MustReplaceUndefinedReceiverWithGlobalProxy()) { |
Label ok; |
// +1 for return address. |
int receiver_offset = (scope()->num_parameters() + 1) * kPointerSize; |