Index: src/full-codegen/x64/full-codegen-x64.cc |
diff --git a/src/full-codegen/x64/full-codegen-x64.cc b/src/full-codegen/x64/full-codegen-x64.cc |
index 39d4f0cf7411ac21a1426016d6e71e5c9879162a..9ef1faea3139ff6a20f8e42c1a73247e645fd604 100644 |
--- a/src/full-codegen/x64/full-codegen-x64.cc |
+++ b/src/full-codegen/x64/full-codegen-x64.cc |
@@ -108,8 +108,7 @@ 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() && |
- info->MayUseThis() && info->scope()->has_this_declaration()) { |
+ if (info->MustReplaceUndefinedReceiverWithGlobalProxy()) { |
Label ok; |
// +1 for return address. |
StackArgumentsAccessor args(rsp, info->scope()->num_parameters()); |