#include "fxjs/xfa/cfxjse_class.h"
#include <memory>
#include <utility>
#include "core/fxcrt/check.h"
#include "core/fxcrt/check_op.h"
#include "core/fxcrt/compiler_specific.h"
#include "fxjs/cjs_result.h"
#include "fxjs/fxv8.h"
#include "fxjs/js_resources.h"
#include "fxjs/xfa/cfxjse_context.h"
#include "fxjs/xfa/cfxjse_isolatetracker.h"
#include "fxjs/xfa/cfxjse_value.h"
#include "v8/include/v8-container.h"
#include "v8/include/v8-external.h"
#include "v8/include/v8-function-callback.h"
#include "v8/include/v8-function.h"
#include "v8/include/v8-isolate.h"
#include "v8/include/v8-object.h"
#include "v8/include/v8-primitive.h"
#include "v8/include/v8-template.h"
kClassTag;
kFuncTag;
namespace {
FXJSE_FUNCTION_DESCRIPTOR* AsFunctionDescriptor(void* ptr) { … }
FXJSE_CLASS_DESCRIPTOR* AsClassDescriptor(void* ptr) { … }
void V8FunctionCallback_Wrapper(
const v8::FunctionCallbackInfo<v8::Value>& info) { … }
void V8ConstructorCallback_Wrapper(
const v8::FunctionCallbackInfo<v8::Value>& info) { … }
void Context_GlobalObjToString(
const v8::FunctionCallbackInfo<v8::Value>& info) { … }
void DynPropGetterAdapter_MethodCallback(
const v8::FunctionCallbackInfo<v8::Value>& info) { … }
std::unique_ptr<CFXJSE_Value> DynPropGetterAdapter(
v8::Isolate* pIsolate,
const FXJSE_CLASS_DESCRIPTOR* pClassDescriptor,
v8::Local<v8::Object> pObject,
ByteStringView szPropName) { … }
void DynPropSetterAdapter(v8::Isolate* pIsolate,
const FXJSE_CLASS_DESCRIPTOR* pClassDescriptor,
v8::Local<v8::Object> pObject,
ByteStringView szPropName,
CFXJSE_Value* pValue) { … }
bool DynPropQueryAdapter(v8::Isolate* pIsolate,
const FXJSE_CLASS_DESCRIPTOR* pClassDescriptor,
v8::Local<v8::Object> pObject,
ByteStringView szPropName) { … }
v8::Intercepted NamedPropertyQueryCallback(
v8::Local<v8::Name> property,
const v8::PropertyCallbackInfo<v8::Integer>& info) { … }
v8::Intercepted NamedPropertyGetterCallback(
v8::Local<v8::Name> property,
const v8::PropertyCallbackInfo<v8::Value>& info) { … }
v8::Intercepted NamedPropertySetterCallback(
v8::Local<v8::Name> property,
v8::Local<v8::Value> value,
const v8::PropertyCallbackInfo<void>& info) { … }
void NamedPropertyEnumeratorCallback(
const v8::PropertyCallbackInfo<v8::Array>& info) { … }
void SetUpNamedPropHandler(v8::Isolate* pIsolate,
v8::Local<v8::ObjectTemplate> pObjectTemplate,
const FXJSE_CLASS_DESCRIPTOR* pClassDescriptor) { … }
}
CFXJSE_Class* CFXJSE_Class::Create(
CFXJSE_Context* pContext,
const FXJSE_CLASS_DESCRIPTOR* pClassDescriptor,
bool bIsJSGlobal) { … }
CFXJSE_Class::CFXJSE_Class(const CFXJSE_Context* pContext)
: … { … }
CFXJSE_Class::~CFXJSE_Class() = default;
v8::Local<v8::FunctionTemplate> CFXJSE_Class::GetTemplate(
v8::Isolate* pIsolate) { … }