5 #ifndef V8_OBJECTS_JS_PROXY_H_ 6 #define V8_OBJECTS_JS_PROXY_H_ 8 #include "src/objects/js-objects.h" 11 #include "src/objects/object-macros.h" 24 DECL_ACCESSORS(handler,
Object)
26 DECL_ACCESSORS(target,
Object)
32 V8_INLINE
bool IsRevoked()
const;
39 V8_WARN_UNUSED_RESULT
static Maybe<bool> SetPrototype(
41 ShouldThrow should_throw);
49 V8_WARN_UNUSED_RESULT
static Maybe<bool> PreventExtensions(
53 V8_WARN_UNUSED_RESULT
static Maybe<bool> GetOwnPropertyDescriptor(
58 V8_WARN_UNUSED_RESULT
static Maybe<bool> DefineOwnProperty(
69 V8_WARN_UNUSED_RESULT
static Maybe<bool> CheckHasTrap(
77 enum AccessKind { kGet, kSet };
83 AccessKind access_kind);
86 V8_WARN_UNUSED_RESULT
static Maybe<bool> SetProperty(
91 V8_WARN_UNUSED_RESULT
static Maybe<bool> DeletePropertyOrElement(
95 V8_WARN_UNUSED_RESULT
static Maybe<bool> OwnPropertyKeys(
106 static const int kMaxIterationLimit = 100 * 1024;
109 #define JS_PROXY_FIELDS(V) \ 110 V(kTargetOffset, kTaggedSize) \ 111 V(kHandlerOffset, kTaggedSize) \ 115 DEFINE_FIELD_OFFSET_CONSTANTS(JSReceiver::kHeaderSize, JS_PROXY_FIELDS)
116 #undef JS_PROXY_FIELDS 122 STATIC_ASSERT(JSObject::kElementsOffset == JSProxy::kTargetOffset);
130 ShouldThrow should_throw);
133 DISALLOW_IMPLICIT_CONSTRUCTORS(
JSProxy);
142 #define JS_PROXY_REVOCATABLE_RESULT_FIELDS(V) \ 143 V(kProxyOffset, kTaggedSize) \ 144 V(kRevokeOffset, kTaggedSize) \ 148 DEFINE_FIELD_OFFSET_CONSTANTS(JSObject::kHeaderSize,
149 JS_PROXY_REVOCATABLE_RESULT_FIELDS)
150 #undef JS_PROXY_REVOCATABLE_RESULT_FIELDS 153 static const int kProxyIndex = 0;
154 static const int kRevokeIndex = 1;
163 #include "src/objects/object-macros-undef.h" 165 #endif // V8_OBJECTS_JS_PROXY_H_