| Index: src/objects-inl.h
|
| diff --git a/src/objects-inl.h b/src/objects-inl.h
|
| index 9622c8cfc1a7c95c5abe26d15e34a99049e63bfa..31a66b1a5cf6cd753f3e853621d3cc7419405bee 100644
|
| --- a/src/objects-inl.h
|
| +++ b/src/objects-inl.h
|
| @@ -1187,14 +1187,10 @@ MaybeHandle<Object> Object::GetPrototype(Isolate* isolate,
|
| Handle<Object> receiver) {
|
| // We don't expect access checks to be needed on JSProxy objects.
|
| DCHECK(!receiver->IsAccessCheckNeeded() || receiver->IsJSObject());
|
| - Handle<Context> context(isolate->context());
|
| - if (receiver->IsAccessCheckNeeded() &&
|
| - !isolate->MayAccess(context, Handle<JSObject>::cast(receiver))) {
|
| - return isolate->factory()->null_value();
|
| - }
|
| PrototypeIterator iter(isolate, receiver,
|
| PrototypeIterator::START_AT_RECEIVER);
|
| do {
|
| + if (!iter.HasAccess()) return isolate->factory()->null_value();
|
| if (!iter.AdvanceFollowingProxies()) return MaybeHandle<Object>();
|
| } while (!iter.IsAtEnd(PrototypeIterator::END_AT_NON_HIDDEN));
|
| return PrototypeIterator::GetCurrent(iter);
|
|
|