| Index: src/stub-cache.cc
|
| diff --git a/src/stub-cache.cc b/src/stub-cache.cc
|
| index 2a3d5c301ee9ad077967065c1cf01aede0e8eeac..0c9f4512326eaef114b11cbbf97b7564d5bdeea2 100644
|
| --- a/src/stub-cache.cc
|
| +++ b/src/stub-cache.cc
|
| @@ -700,8 +700,9 @@ void StubCompiler::LookupPostInterceptor(Handle<JSObject> holder,
|
| LookupResult* lookup) {
|
| holder->LookupOwnRealNamedProperty(name, lookup);
|
| if (lookup->IsFound()) return;
|
| - if (holder->GetPrototype()->IsNull()) return;
|
| - holder->GetPrototype()->Lookup(name, lookup);
|
| + PrototypeIterator iter(holder->GetIsolate(), holder);
|
| + if (iter.IsAtEnd()) return;
|
| + PrototypeIterator::GetCurrent(iter)->Lookup(name, lookup);
|
| }
|
|
|
|
|
| @@ -971,17 +972,18 @@ Handle<Code> StoreStubCompiler::CompileStoreTransition(
|
| __ CheckMapDeprecated(transition, scratch1(), &miss);
|
|
|
| // Check that we are allowed to write this.
|
| - if (object->GetPrototype()->IsJSObject()) {
|
| + PrototypeIterator iter(object->GetIsolate(), object);
|
| + if (!iter.IsAtEnd()) {
|
| Handle<JSObject> holder;
|
| // holder == object indicates that no property was found.
|
| if (lookup->holder() != *object) {
|
| holder = Handle<JSObject>(lookup->holder());
|
| } else {
|
| // Find the top object.
|
| - holder = object;
|
| do {
|
| - holder = Handle<JSObject>(JSObject::cast(holder->GetPrototype()));
|
| - } while (holder->GetPrototype()->IsJSObject());
|
| + holder = Handle<JSObject>::cast(PrototypeIterator::GetCurrent(iter));
|
| + iter.Advance();
|
| + } while (!iter.IsAtEnd());
|
| }
|
|
|
| Register holder_reg = HandlerFrontendHeader(
|
|
|