| Index: src/contexts.cc
|
| diff --git a/src/contexts.cc b/src/contexts.cc
|
| index a6a61df624a49c9460806a96fee5b166ba65efcd..12eb871e15ddbe5eb9acb67acb4485fcec01c258 100644
|
| --- a/src/contexts.cc
|
| +++ b/src/contexts.cc
|
| @@ -258,8 +258,13 @@ Handle<Object> Context::Lookup(Handle<String> name,
|
| object->IsJSContextExtensionObject()) {
|
| maybe = JSReceiver::GetOwnPropertyAttributes(object, name);
|
| } else if (context->IsWithContext()) {
|
| - LookupIterator it(object, name);
|
| - maybe = UnscopableLookup(&it);
|
| + // A with context will never bind "this".
|
| + if (name->Equals(*isolate->factory()->this_string())) {
|
| + maybe = Just(ABSENT);
|
| + } else {
|
| + LookupIterator it(object, name);
|
| + maybe = UnscopableLookup(&it);
|
| + }
|
| } else {
|
| maybe = JSReceiver::GetPropertyAttributes(object, name);
|
| }
|
|
|