Index: src/x64/full-codegen-x64.cc |
diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc |
index 64717b979db00d8884583ba4d74060bf1906c5c7..ac21199008919dd872cc80d39413b0c3337c01ad 100644 |
--- a/src/x64/full-codegen-x64.cc |
+++ b/src/x64/full-codegen-x64.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->scope()->has_this_declaration()) { |
Label ok; |
// +1 for return address. |
StackArgumentsAccessor args(rsp, info->scope()->num_parameters()); |