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