Index: src/lookup.cc |
diff --git a/src/lookup.cc b/src/lookup.cc |
index 2b8d261ac0052bb71e71bed168ee44f3416ce15f..8e545f747904be31b389eb1c8f11e5b161b8f545 100644 |
--- a/src/lookup.cc |
+++ b/src/lookup.cc |
@@ -757,5 +757,21 @@ LookupIterator::State LookupIterator::LookupInRegularHolder( |
return state_; |
} |
+Handle<InterceptorInfo> LookupIterator::GetInterceptorForFailedAccessCheck() |
+ const { |
+ DCHECK_EQ(ACCESS_CHECK, state_); |
+ DisallowHeapAllocation no_gc; |
+ AccessCheckInfo* access_check_info = |
+ AccessCheckInfo::Get(isolate_, Handle<JSObject>::cast(holder_)); |
+ if (access_check_info) { |
+ Object* interceptor = IsElement() ? access_check_info->indexed_interceptor() |
+ : access_check_info->named_interceptor(); |
+ if (interceptor) { |
+ return handle(InterceptorInfo::cast(interceptor), isolate_); |
+ } |
+ } |
+ return Handle<InterceptorInfo>(); |
+} |
+ |
} // namespace internal |
} // namespace v8 |