| Index: src/ia32/full-codegen-ia32.cc
|
| diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc
|
| index a589199a4cd3cad8bb03d221a191207d11d418a7..f1d6344a66842f9d7d9ec718e4e46470d31de74c 100644
|
| --- a/src/ia32/full-codegen-ia32.cc
|
| +++ b/src/ia32/full-codegen-ia32.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.
|
| int receiver_offset = (info->scope()->num_parameters() + 1) * kPointerSize;
|
|
|