Chromium Code Reviews| Index: src/arm/full-codegen-arm.cc |
| diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc |
| index 3f26b3fe4d80dad362a614df1cddd7f48a43f9c7..bd05d54dc602df7861f44112ace4907243945fbc 100644 |
| --- a/src/arm/full-codegen-arm.cc |
| +++ b/src/arm/full-codegen-arm.cc |
| @@ -126,7 +126,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()) { |
|
wingo
2015/03/23 15:11:14
This will change the behavior of "this" scoping in
|
| Label ok; |
| int receiver_offset = info->scope()->num_parameters() * kPointerSize; |
| __ ldr(r2, MemOperand(sp, receiver_offset)); |