• Home
  • Raw
  • Download

Lines Matching refs:v8

46 v8::Local<v8::Object> CreateReturnValue(v8::Isolate* pIsolate,  in CreateReturnValue()
47 v8::TryCatch& trycatch) { in CreateReturnValue()
48 v8::Local<v8::Object> hReturnValue = v8::Object::New(pIsolate); in CreateReturnValue()
50 v8::Local<v8::Value> hException = trycatch.Exception(); in CreateReturnValue()
51 v8::Local<v8::Message> hMessage = trycatch.Message(); in CreateReturnValue()
53 v8::Local<v8::Value> hValue; in CreateReturnValue()
54 hValue = hException.As<v8::Object>()->Get( in CreateReturnValue()
55 v8::String::NewFromUtf8(pIsolate, "name")); in CreateReturnValue()
59 hReturnValue->Set(0, v8::String::NewFromUtf8(pIsolate, "Error")); in CreateReturnValue()
61 hValue = hException.As<v8::Object>()->Get( in CreateReturnValue()
62 v8::String::NewFromUtf8(pIsolate, "message")); in CreateReturnValue()
68 hReturnValue->Set(0, v8::String::NewFromUtf8(pIsolate, "Error")); in CreateReturnValue()
72 hReturnValue->Set(3, v8::Integer::New(pIsolate, hMessage->GetLineNumber())); in CreateReturnValue()
74 v8::Maybe<int32_t> maybe_int = in CreateReturnValue()
76 hReturnValue->Set(5, v8::Integer::New(pIsolate, maybe_int.FromMaybe(0))); in CreateReturnValue()
78 hReturnValue->Set(6, v8::Integer::New(pIsolate, maybe_int.FromMaybe(0))); in CreateReturnValue()
83 v8::Local<v8::Object> GetGlobalObjectFromContext( in GetGlobalObjectFromContext()
84 v8::Local<v8::Context> hContext) { in GetGlobalObjectFromContext()
85 return hContext->Global()->GetPrototype().As<v8::Object>(); in GetGlobalObjectFromContext()
98 m_cscope(v8::Local<v8::Context>::New(pContext->m_pIsolate, in CFXJSE_ScopeUtil_IsolateHandleContext()
100 v8::Isolate* GetIsolate() { return m_context->m_pIsolate; } in GetIsolate()
101 v8::Local<v8::Context> GetLocalContext() { in GetLocalContext()
102 return v8::Local<v8::Context>::New(m_context->m_pIsolate, in GetLocalContext()
115 v8::Context::Scope m_cscope;
118 void FXJSE_UpdateObjectBinding(v8::Local<v8::Object>& hObject, in FXJSE_UpdateObjectBinding()
126 CFXJSE_HostObject* FXJSE_RetrieveObjectBinding(v8::Local<v8::Object> hJSObject, in FXJSE_RetrieveObjectBinding()
132 v8::Local<v8::Object> hObject = hJSObject; in FXJSE_RetrieveObjectBinding()
134 v8::Local<v8::Value> hProtoObject = hObject->GetPrototype(); in FXJSE_RetrieveObjectBinding()
138 hObject = hProtoObject.As<v8::Object>(); in FXJSE_RetrieveObjectBinding()
145 v8::Local<v8::FunctionTemplate> hClass = in FXJSE_RetrieveObjectBinding()
146 v8::Local<v8::FunctionTemplate>::New( in FXJSE_RetrieveObjectBinding()
157 v8::Isolate* pIsolate, in Create()
162 v8::Local<v8::ObjectTemplate> hObjectTemplate; in Create()
167 v8::Local<v8::FunctionTemplate> hFunctionTemplate = in Create()
168 v8::Local<v8::FunctionTemplate>::New(pIsolate, in Create()
172 hObjectTemplate = v8::ObjectTemplate::New(pIsolate); in Create()
177 v8::Symbol::GetToStringTag(pIsolate), in Create()
178 v8::String::NewFromUtf8(pIsolate, "global", v8::NewStringType::kNormal) in Create()
180 v8::Local<v8::Context> hNewContext = in Create()
181 v8::Context::New(pIsolate, nullptr, hObjectTemplate); in Create()
182 v8::Local<v8::Context> hRootContext = v8::Local<v8::Context>::New( in Create()
185 v8::Local<v8::Object> hGlobalObject = GetGlobalObjectFromContext(hNewContext); in Create()
191 CFXJSE_Context::CFXJSE_Context(v8::Isolate* pIsolate) : m_pIsolate(pIsolate) {} in CFXJSE_Context()
198 v8::Local<v8::Context> hContext = in GetGlobalObject()
199 v8::Local<v8::Context>::New(m_pIsolate, m_hContext); in GetGlobalObject()
200 v8::Local<v8::Object> hGlobalObject = GetGlobalObjectFromContext(hContext); in GetGlobalObject()
205 v8::Local<v8::Context> CFXJSE_Context::GetContext() { in GetContext()
206 return v8::Local<v8::Context>::New(m_pIsolate, m_hContext); in GetContext()
231 v8::TryCatch trycatch(m_pIsolate); in ExecuteScript()
232 v8::Local<v8::String> hScriptString = in ExecuteScript()
233 v8::String::NewFromUtf8(m_pIsolate, szScript); in ExecuteScript()
235 v8::Local<v8::Script> hScript = v8::Script::Compile(hScriptString); in ExecuteScript()
237 v8::Local<v8::Value> hValue = hScript->Run(); in ExecuteScript()
251 v8::Local<v8::Value> hNewThis = in ExecuteScript()
252 v8::Local<v8::Value>::New(m_pIsolate, lpNewThisObject->m_hValue); in ExecuteScript()
254 v8::Local<v8::Script> hWrapper = v8::Script::Compile(v8::String::NewFromUtf8( in ExecuteScript()
256 v8::Local<v8::Value> hWrapperValue = hWrapper->Run(); in ExecuteScript()
258 v8::Local<v8::Function> hWrapperFn = hWrapperValue.As<v8::Function>(); in ExecuteScript()
260 v8::Local<v8::Value> rgArgs[] = {hScriptString}; in ExecuteScript()
261 v8::Local<v8::Value> hValue = in ExecuteScript()
262 hWrapperFn->Call(hNewThis.As<v8::Object>(), 1, rgArgs); in ExecuteScript()