Index: src/runtime/runtime-object.cc |
diff --git a/src/runtime/runtime-object.cc b/src/runtime/runtime-object.cc |
index 87f416fd131ff0e7f2c3e658c2aabb6e6087e5a8..84becb41773663a6ef9b8d3f5a85d73d6a2bae74 100644 |
--- a/src/runtime/runtime-object.cc |
+++ b/src/runtime/runtime-object.cc |
@@ -157,22 +157,7 @@ RUNTIME_FUNCTION(Runtime_GetPrototype) { |
HandleScope scope(isolate); |
DCHECK(args.length() == 1); |
CONVERT_ARG_HANDLE_CHECKED(Object, obj, 0); |
- // We don't expect access checks to be needed on JSProxy objects. |
- DCHECK(!obj->IsAccessCheckNeeded() || obj->IsJSObject()); |
- PrototypeIterator iter(isolate, obj, PrototypeIterator::START_AT_RECEIVER); |
- Handle<Context> context(isolate->context()); |
- do { |
- if (PrototypeIterator::GetCurrent(iter)->IsAccessCheckNeeded() && |
- !isolate->MayAccess(context, |
- PrototypeIterator::GetCurrent<JSObject>(iter))) { |
- return isolate->heap()->null_value(); |
- } |
- iter.AdvanceIgnoringProxies(); |
- if (PrototypeIterator::GetCurrent(iter)->IsJSProxy()) { |
- return *PrototypeIterator::GetCurrent(iter); |
- } |
- } while (!iter.IsAtEnd(PrototypeIterator::END_AT_NON_HIDDEN)); |
- return *PrototypeIterator::GetCurrent(iter); |
+ return *Object::GetPrototype(isolate, obj); |
} |