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

Unified Diff: src/objects.h

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/isolate.cc ('k') | src/objects.cc » ('j') | src/objects.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 694b93265a67b5d1042f42b74c3fbf8f9ecbb4c3..8d6f0fce9d6882897933daeb29e0e6a008e31c2c 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -2471,6 +2471,17 @@ class JSObject: public JSReceiver {
friend class JSReceiver;
friend class Object;
+ static Handle<InterceptorInfo> GetInterceptorForFailedAccessCheck(
+ LookupIterator* it);
+ MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithInterceptorInternal(
+ LookupIterator* it, Handle<InterceptorInfo> interceptor, bool* done);
+ MUST_USE_RESULT static Maybe<PropertyAttributes>
+ GetPropertyAttributesWithInterceptorInternal(
+ LookupIterator* it, Handle<InterceptorInfo> interceptor);
+ MUST_USE_RESULT static Maybe<bool> SetPropertyWithInterceptorInternal(
+ LookupIterator* it, Handle<InterceptorInfo> interceptor,
+ ShouldThrow should_throw, Handle<Object> value);
+
// Used from Object::GetProperty().
MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithFailedAccessCheck(
LookupIterator* it);
@@ -10386,6 +10397,8 @@ class AccessorPair: public Struct {
class AccessCheckInfo: public Struct {
public:
DECL_ACCESSORS(callback, Object)
+ DECL_ACCESSORS(named_interceptor, Object)
+ DECL_ACCESSORS(indexed_interceptor, Object)
DECL_ACCESSORS(data, Object)
DECLARE_CAST(AccessCheckInfo)
@@ -10394,8 +10407,13 @@ class AccessCheckInfo: public Struct {
DECLARE_PRINTER(AccessCheckInfo)
DECLARE_VERIFIER(AccessCheckInfo)
+ static AccessCheckInfo* Get(Isolate* isolate, Handle<JSObject> receiver);
+
static const int kCallbackOffset = HeapObject::kHeaderSize;
- static const int kDataOffset = kCallbackOffset + kPointerSize;
+ static const int kNamedInterceptorOffset = kCallbackOffset + kPointerSize;
+ static const int kIndexedInterceptorOffset =
+ kNamedInterceptorOffset + kPointerSize;
+ static const int kDataOffset = kIndexedInterceptorOffset + kPointerSize;
static const int kSize = kDataOffset + kPointerSize;
private:
« no previous file with comments | « src/isolate.cc ('k') | src/objects.cc » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698