Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(581)

Unified Diff: src/lookup.cc

Issue 2087823002: Optionally invoke an interceptor on failed access checks (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/lookup.h ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « src/lookup.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698