| Index: src/objects.cc
|
| diff --git a/src/objects.cc b/src/objects.cc
|
| index a0c2c1eb98f50ca3abf4c9da977ab121bf45b285..1816d19b9bf0901112e3a9f6e28ffa1e80d04493 100644
|
| --- a/src/objects.cc
|
| +++ b/src/objects.cc
|
| @@ -3559,6 +3559,11 @@ void JSObject::LookupRealNamedProperty(Handle<Name> name,
|
|
|
| void JSObject::LookupRealNamedPropertyInPrototypes(Handle<Name> name,
|
| LookupResult* result) {
|
| + if (name->IsOwn()) {
|
| + result->NotFound();
|
| + return;
|
| + }
|
| +
|
| DisallowHeapAllocation no_gc;
|
| Isolate* isolate = GetIsolate();
|
| for (PrototypeIterator iter(isolate, this); !iter.IsAtEnd(); iter.Advance()) {
|
| @@ -6106,7 +6111,7 @@ void JSReceiver::LookupOwn(
|
| }
|
|
|
| js_object->LookupOwnRealNamedProperty(name, result);
|
| - if (result->IsFound() || !search_hidden_prototypes) return;
|
| + if (result->IsFound() || name->IsOwn() || !search_hidden_prototypes) return;
|
|
|
| PrototypeIterator iter(GetIsolate(), js_object);
|
| if (!iter.GetCurrent()->IsJSReceiver()) return;
|
| @@ -6125,6 +6130,10 @@ void JSReceiver::Lookup(Handle<Name> name, LookupResult* result) {
|
| !iter.IsAtEnd(); iter.Advance()) {
|
| JSReceiver::cast(iter.GetCurrent())->LookupOwn(name, result, false);
|
| if (result->IsFound()) return;
|
| + if (name->IsOwn()) {
|
| + result->NotFound();
|
| + return;
|
| + }
|
| }
|
| result->NotFound();
|
| }
|
|
|