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