Lines Matching refs:v8

51         m_cscope(v8::Local<v8::Context>::New(pContext->m_pIsolate,  in CFXJSE_ScopeUtil_IsolateHandleContext()
53 v8::Isolate* GetIsolate() { return m_context->m_pIsolate; } in GetIsolate()
54 v8::Local<v8::Context> GetLocalContext() { in GetLocalContext()
55 return v8::Local<v8::Context>::New(m_context->m_pIsolate, in GetLocalContext()
68 v8::Context::Scope m_cscope;
71 v8::Local<v8::Object> FXJSE_GetGlobalObjectFromContext( in FXJSE_GetGlobalObjectFromContext()
72 const v8::Local<v8::Context>& hContext) { in FXJSE_GetGlobalObjectFromContext()
73 return hContext->Global()->GetPrototype().As<v8::Object>(); in FXJSE_GetGlobalObjectFromContext()
76 void FXJSE_UpdateObjectBinding(v8::Local<v8::Object>& hObject, in FXJSE_UpdateObjectBinding()
85 const v8::Local<v8::Object>& hJSObject, in FXJSE_RetrieveObjectBinding()
91 v8::Local<v8::Object> hObject = hJSObject; in FXJSE_RetrieveObjectBinding()
93 v8::Local<v8::Value> hProtoObject = hObject->GetPrototype(); in FXJSE_RetrieveObjectBinding()
97 hObject = hProtoObject.As<v8::Object>(); in FXJSE_RetrieveObjectBinding()
102 v8::Local<v8::FunctionTemplate> hClass = in FXJSE_RetrieveObjectBinding()
103 v8::Local<v8::FunctionTemplate>::New( in FXJSE_RetrieveObjectBinding()
112 v8::Local<v8::Object> FXJSE_CreateReturnValue(v8::Isolate* pIsolate, in FXJSE_CreateReturnValue()
113 v8::TryCatch& trycatch) { in FXJSE_CreateReturnValue()
114 v8::Local<v8::Object> hReturnValue = v8::Object::New(pIsolate); in FXJSE_CreateReturnValue()
116 v8::Local<v8::Value> hException = trycatch.Exception(); in FXJSE_CreateReturnValue()
117 v8::Local<v8::Message> hMessage = trycatch.Message(); in FXJSE_CreateReturnValue()
119 v8::Local<v8::Value> hValue; in FXJSE_CreateReturnValue()
120 hValue = hException.As<v8::Object>()->Get( in FXJSE_CreateReturnValue()
121 v8::String::NewFromUtf8(pIsolate, "name")); in FXJSE_CreateReturnValue()
125 hReturnValue->Set(0, v8::String::NewFromUtf8(pIsolate, "Error")); in FXJSE_CreateReturnValue()
127 hValue = hException.As<v8::Object>()->Get( in FXJSE_CreateReturnValue()
128 v8::String::NewFromUtf8(pIsolate, "message")); in FXJSE_CreateReturnValue()
134 hReturnValue->Set(0, v8::String::NewFromUtf8(pIsolate, "Error")); in FXJSE_CreateReturnValue()
138 hReturnValue->Set(3, v8::Integer::New(pIsolate, hMessage->GetLineNumber())); in FXJSE_CreateReturnValue()
140 v8::Maybe<int32_t> maybe_int = in FXJSE_CreateReturnValue()
142 hReturnValue->Set(5, v8::Integer::New(pIsolate, maybe_int.FromMaybe(0))); in FXJSE_CreateReturnValue()
144 hReturnValue->Set(6, v8::Integer::New(pIsolate, maybe_int.FromMaybe(0))); in FXJSE_CreateReturnValue()
151 v8::Isolate* pIsolate, in Create()
157 v8::Local<v8::ObjectTemplate> hObjectTemplate; in Create()
161 v8::Local<v8::FunctionTemplate> hFunctionTemplate = in Create()
162 v8::Local<v8::FunctionTemplate>::New(pIsolate, in Create()
166 hObjectTemplate = v8::ObjectTemplate::New(pIsolate); in Create()
170 v8::Symbol::GetToStringTag(pIsolate), in Create()
171 v8::String::NewFromUtf8(pIsolate, "global", v8::NewStringType::kNormal) in Create()
173 v8::Local<v8::Context> hNewContext = in Create()
174 v8::Context::New(pIsolate, nullptr, hObjectTemplate); in Create()
175 v8::Local<v8::Context> hRootContext = v8::Local<v8::Context>::New( in Create()
178 v8::Local<v8::Object> hGlobalObject = in Create()
185 CFXJSE_Context::CFXJSE_Context(v8::Isolate* pIsolate) : m_pIsolate(pIsolate) {} in CFXJSE_Context()
193 v8::Local<v8::Context> hContext = in GetGlobalObject()
194 v8::Local<v8::Context>::New(m_pIsolate, m_hContext); in GetGlobalObject()
195 v8::Local<v8::Object> hGlobalObject = hContext->Global(); in GetGlobalObject()
209 v8::TryCatch trycatch(m_pIsolate); in ExecuteScript()
210 v8::Local<v8::String> hScriptString = in ExecuteScript()
211 v8::String::NewFromUtf8(m_pIsolate, szScript); in ExecuteScript()
213 v8::Local<v8::Script> hScript = v8::Script::Compile(hScriptString); in ExecuteScript()
215 v8::Local<v8::Value> hValue = hScript->Run(); in ExecuteScript()
229 v8::Local<v8::Value> hNewThis = in ExecuteScript()
230 v8::Local<v8::Value>::New(m_pIsolate, lpNewThisObject->m_hValue); in ExecuteScript()
232 v8::Local<v8::Script> hWrapper = v8::Script::Compile(v8::String::NewFromUtf8( in ExecuteScript()
234 v8::Local<v8::Value> hWrapperValue = hWrapper->Run(); in ExecuteScript()
236 v8::Local<v8::Function> hWrapperFn = hWrapperValue.As<v8::Function>(); in ExecuteScript()
238 v8::Local<v8::Value> rgArgs[] = {hScriptString}; in ExecuteScript()
239 v8::Local<v8::Value> hValue = in ExecuteScript()
240 hWrapperFn->Call(hNewThis.As<v8::Object>(), 1, rgArgs); in ExecuteScript()