Index: src/x64/lithium-codegen-x64.cc |
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc |
index d1683e6ae7ab9685d64c9801a78891f2f56a2cb1..a1bc5841b5a5fc249619db688430983ea719b5db 100644 |
--- a/src/x64/lithium-codegen-x64.cc |
+++ b/src/x64/lithium-codegen-x64.cc |
@@ -130,7 +130,7 @@ bool LCodeGen::GeneratePrologue() { |
// Sloppy mode functions need to replace the receiver with the global proxy |
// when called as functions (without an explicit receiver object). |
if (info_->this_has_uses() && is_sloppy(info_->language_mode()) && |
- !info_->is_native()) { |
+ !info_->is_native() && info_->scope()->has_this_declaration()) { |
Label ok; |
StackArgumentsAccessor args(rsp, scope()->num_parameters()); |
__ movp(rcx, args.GetReceiverOperand()); |