File indexing completed on 2026-01-07 10:10:00
0001
0002
0003
0004
0005 #ifndef INCLUDE_V8_PROXY_H_
0006 #define INCLUDE_V8_PROXY_H_
0007
0008 #include "v8-context.h" // NOLINT(build/include_directory)
0009 #include "v8-local-handle.h" // NOLINT(build/include_directory)
0010 #include "v8-object.h" // NOLINT(build/include_directory)
0011 #include "v8config.h" // NOLINT(build/include_directory)
0012
0013 namespace v8 {
0014
0015 class Context;
0016
0017
0018
0019
0020
0021 class V8_EXPORT Proxy : public Object {
0022 public:
0023 Local<Value> GetTarget();
0024 Local<Value> GetHandler();
0025 bool IsRevoked() const;
0026 void Revoke();
0027
0028
0029
0030
0031 static MaybeLocal<Proxy> New(Local<Context> context,
0032 Local<Object> local_target,
0033 Local<Object> local_handler);
0034
0035 V8_INLINE static Proxy* Cast(Value* value) {
0036 #ifdef V8_ENABLE_CHECKS
0037 CheckCast(value);
0038 #endif
0039 return static_cast<Proxy*>(value);
0040 }
0041
0042 private:
0043 Proxy();
0044 static void CheckCast(Value* obj);
0045 };
0046
0047 }
0048
0049 #endif