Lines Matching refs:v8

19 static v8::Isolate* g_isolate = nullptr;
22 static v8::Global<v8::ObjectTemplate>* g_DefaultGlobalObjectTemplate = nullptr;
31 v8::Local<v8::Object> pObj) { in SetInObject()
39 static CFXJS_PerObjectData* GetFromObject(v8::Local<v8::Object> pObj) { in GetFromObject()
55 static int MaxID(v8::Isolate* pIsolate) { in MaxID()
59 static CFXJS_ObjDefinition* ForID(v8::Isolate* pIsolate, int id) { in ForID()
64 CFXJS_ObjDefinition(v8::Isolate* isolate, in CFXJS_ObjDefinition()
74 v8::Isolate::Scope isolate_scope(isolate); in CFXJS_ObjDefinition()
75 v8::HandleScope handle_scope(isolate); in CFXJS_ObjDefinition()
77 v8::Local<v8::FunctionTemplate> fun = v8::FunctionTemplate::New(isolate); in CFXJS_ObjDefinition()
79 fun->SetCallHandler([](const v8::FunctionCallbackInfo<v8::Value>& info) { in CFXJS_ObjDefinition()
80 v8::Local<v8::Object> holder = info.Holder(); in CFXJS_ObjDefinition()
87 v8::Symbol::GetToStringTag(isolate), in CFXJS_ObjDefinition()
88 v8::String::NewFromUtf8(isolate, "global", v8::NewStringType::kNormal) in CFXJS_ObjDefinition()
93 v8::Local<v8::Signature> sig = v8::Signature::New(isolate, fun); in CFXJS_ObjDefinition()
103 v8::Local<v8::ObjectTemplate> GetInstanceTemplate() { in GetInstanceTemplate()
104 v8::EscapableHandleScope scope(m_pIsolate); in GetInstanceTemplate()
105 v8::Local<v8::FunctionTemplate> function = in GetInstanceTemplate()
110 v8::Local<v8::Signature> GetSignature() { in GetSignature()
111 v8::EscapableHandleScope scope(m_pIsolate); in GetSignature()
120 v8::Isolate* m_pIsolate;
121 v8::Global<v8::FunctionTemplate> m_FunctionTemplate;
122 v8::Global<v8::Signature> m_Signature;
125 static v8::Local<v8::ObjectTemplate> GetGlobalObjectTemplate( in GetGlobalObjectTemplate()
126 v8::Isolate* pIsolate) { in GetGlobalObjectTemplate()
134 v8::Local<v8::ObjectTemplate> hGlobalTemplate = in GetGlobalObjectTemplate()
135 v8::ObjectTemplate::New(pIsolate); in GetGlobalObjectTemplate()
137 v8::Symbol::GetToStringTag(pIsolate), in GetGlobalObjectTemplate()
138 v8::String::NewFromUtf8(pIsolate, "global", v8::NewStringType::kNormal) in GetGlobalObjectTemplate()
141 new v8::Global<v8::ObjectTemplate>(pIsolate, hGlobalTemplate); in GetGlobalObjectTemplate()
167 void V8TemplateMapTraits::Dispose(v8::Isolate* isolate, in Dispose()
168 v8::Global<v8::Object> value, in Dispose()
170 v8::Local<v8::Object> obj = value.Get(isolate); in Dispose()
187 const v8::WeakCallbackInfo<WeakCallbackDataType>& data) { in MapFromWeakCallbackInfo()
193 void FXJS_Initialize(unsigned int embedderDataSlot, v8::Isolate* pIsolate) { in FXJS_Initialize()
213 bool FXJS_GetIsolate(v8::Isolate** pResultIsolate) { in FXJS_GetIsolate()
221 v8::Isolate::CreateParams params; in FXJS_GetIsolate()
223 *pResultIsolate = v8::Isolate::New(params); in FXJS_GetIsolate()
231 V8TemplateMap::V8TemplateMap(v8::Isolate* isolate) : m_map(isolate) {} in V8TemplateMap()
235 void V8TemplateMap::set(void* key, v8::Local<v8::Object> handle) { in set()
243 void FXJS_PerIsolateData::SetUp(v8::Isolate* pIsolate) { in SetUp()
249 FXJS_PerIsolateData* FXJS_PerIsolateData::Get(v8::Isolate* pIsolate) { in Get()
254 FXJS_PerIsolateData::FXJS_PerIsolateData(v8::Isolate* pIsolate) in FXJS_PerIsolateData()
259 CFXJS_Engine::CFXJS_Engine(v8::Isolate* pIsolate) : CJS_V8(pIsolate) {} in CFXJS_Engine()
264 CFXJS_Engine* CFXJS_Engine::CurrentEngineFromIsolate(v8::Isolate* pIsolate) { in CurrentEngineFromIsolate()
271 int CFXJS_Engine::GetObjDefnID(v8::Local<v8::Object> pObj) { in GetObjDefnID()
282 void CFXJS_Engine::FreeObjectPrivate(v8::Local<v8::Object> pObj) { in FreeObjectPrivate()
293 v8::Isolate::Scope isolate_scope(GetIsolate()); in DefineObj()
294 v8::HandleScope handle_scope(GetIsolate()); in DefineObj()
303 v8::FunctionCallback pMethodCall) { in DefineObjMethod()
304 v8::Isolate::Scope isolate_scope(GetIsolate()); in DefineObjMethod()
305 v8::HandleScope handle_scope(GetIsolate()); in DefineObjMethod()
308 v8::Local<v8::FunctionTemplate> fun = v8::FunctionTemplate::New( in DefineObjMethod()
309 GetIsolate(), pMethodCall, v8::Local<v8::Value>(), in DefineObjMethod()
313 v8::ReadOnly); in DefineObjMethod()
318 v8::AccessorGetterCallback pPropGet, in DefineObjProperty()
319 v8::AccessorSetterCallback pPropPut) { in DefineObjProperty()
320 v8::Isolate::Scope isolate_scope(GetIsolate()); in DefineObjProperty()
321 v8::HandleScope handle_scope(GetIsolate()); in DefineObjProperty()
330 v8::NamedPropertyQueryCallback pPropQurey, in DefineObjAllProperties()
331 v8::NamedPropertyGetterCallback pPropGet, in DefineObjAllProperties()
332 v8::NamedPropertySetterCallback pPropPut, in DefineObjAllProperties()
333 v8::NamedPropertyDeleterCallback pPropDel) { in DefineObjAllProperties()
334 v8::Isolate::Scope isolate_scope(GetIsolate()); in DefineObjAllProperties()
335 v8::HandleScope handle_scope(GetIsolate()); in DefineObjAllProperties()
344 v8::Local<v8::Value> pDefault) { in DefineObjConst()
345 v8::Isolate::Scope isolate_scope(GetIsolate()); in DefineObjConst()
346 v8::HandleScope handle_scope(GetIsolate()); in DefineObjConst()
353 v8::FunctionCallback pMethodCall) { in DefineGlobalMethod()
354 v8::Isolate::Scope isolate_scope(GetIsolate()); in DefineGlobalMethod()
355 v8::HandleScope handle_scope(GetIsolate()); in DefineGlobalMethod()
356 v8::Local<v8::FunctionTemplate> fun = in DefineGlobalMethod()
357 v8::FunctionTemplate::New(GetIsolate(), pMethodCall); in DefineGlobalMethod()
360 ->Set(NewString(sMethodName), fun, v8::ReadOnly); in DefineGlobalMethod()
364 v8::FunctionCallback pConstGetter) { in DefineGlobalConst()
365 v8::Isolate::Scope isolate_scope(GetIsolate()); in DefineGlobalConst()
366 v8::HandleScope handle_scope(GetIsolate()); in DefineGlobalConst()
367 v8::Local<v8::FunctionTemplate> fun = in DefineGlobalConst()
368 v8::FunctionTemplate::New(GetIsolate(), pConstGetter); in DefineGlobalConst()
378 v8::Isolate::Scope isolate_scope(GetIsolate()); in InitializeEngine()
379 v8::HandleScope handle_scope(GetIsolate()); in InitializeEngine()
385 v8::Local<v8::Context> v8Context = v8::Context::New( in InitializeEngine()
387 v8::Context::Scope context_scope(v8Context); in InitializeEngine()
408 v8::Local<v8::String> pObjName = NewString(pObjDef->m_ObjName); in InitializeEngine()
409 v8::Local<v8::Object> obj = NewFxDynamicObj(i, true); in InitializeEngine()
412 m_StaticObjects[i] = new v8::Global<v8::Object>(GetIsolate(), obj); in InitializeEngine()
422 v8::Isolate::Scope isolate_scope(GetIsolate()); in ReleaseEngine()
423 v8::HandleScope handle_scope(GetIsolate()); in ReleaseEngine()
424 v8::Local<v8::Context> context = NewLocalContext(); in ReleaseEngine()
425 v8::Context::Scope context_scope(context); in ReleaseEngine()
435 v8::Local<v8::Object> pObj; in ReleaseEngine()
440 pObj = v8::Local<v8::Object>::New(GetIsolate(), *m_StaticObjects[i]); in ReleaseEngine()
462 v8::Isolate::Scope isolate_scope(GetIsolate()); in Execute()
463 v8::TryCatch try_catch(GetIsolate()); in Execute()
464 v8::Local<v8::Context> context = GetIsolate()->GetCurrentContext(); in Execute()
465 v8::Local<v8::Script> compiled_script; in Execute()
466 if (!v8::Script::Compile(context, NewString(script.AsStringView())) in Execute()
468 v8::String::Utf8Value error(GetIsolate(), try_catch.Exception()); in Execute()
473 v8::Local<v8::Value> result; in Execute()
475 v8::String::Utf8Value error(GetIsolate(), try_catch.Exception()); in Execute()
482 v8::Local<v8::Object> CFXJS_Engine::NewFxDynamicObj(int nObjDefnID, in NewFxDynamicObj()
484 v8::Isolate::Scope isolate_scope(GetIsolate()); in NewFxDynamicObj()
485 v8::Local<v8::Context> context = GetIsolate()->GetCurrentContext(); in NewFxDynamicObj()
487 v8::Local<v8::ObjectTemplate> objTempl = in NewFxDynamicObj()
488 v8::ObjectTemplate::New(GetIsolate()); in NewFxDynamicObj()
489 v8::Local<v8::Object> obj; in NewFxDynamicObj()
491 return v8::Local<v8::Object>(); in NewFxDynamicObj()
497 return v8::Local<v8::Object>(); in NewFxDynamicObj()
500 return v8::Local<v8::Object>(); in NewFxDynamicObj()
504 v8::Local<v8::Object> obj; in NewFxDynamicObj()
506 return v8::Local<v8::Object>(); in NewFxDynamicObj()
520 v8::Local<v8::Object> CFXJS_Engine::GetThisObj() { in GetThisObj()
521 v8::Isolate::Scope isolate_scope(GetIsolate()); in GetThisObj()
523 return v8::Local<v8::Object>(); in GetThisObj()
526 v8::Local<v8::Context> context = GetIsolate()->GetCurrentContext(); in GetThisObj()
534 void CFXJS_Engine::SetObjectPrivate(v8::Local<v8::Object> pObj, void* p) { in SetObjectPrivate()
542 void* CFXJS_Engine::GetObjectPrivate(v8::Local<v8::Object> pObj) { in GetObjectPrivate()
546 v8::Local<v8::Value> v = pObj->GetPrototype(); in GetObjectPrivate()
547 v8::Local<v8::Context> context = GetIsolate()->GetCurrentContext(); in GetObjectPrivate()