Lines Matching refs:v8
14 CJS_V8::CJS_V8(v8::Isolate* isolate) : m_isolate(isolate) {} in CJS_V8()
20 v8::Local<v8::Value> CJS_V8::GetObjectProperty( in GetObjectProperty()
21 v8::Local<v8::Object> pObj, in GetObjectProperty()
24 return v8::Local<v8::Value>(); in GetObjectProperty()
25 v8::Local<v8::Value> val; in GetObjectProperty()
29 return v8::Local<v8::Value>(); in GetObjectProperty()
34 v8::Local<v8::Object> pObj) { in GetObjectPropertyNames()
38 v8::Local<v8::Array> val; in GetObjectPropertyNames()
39 v8::Local<v8::Context> context = m_isolate->GetCurrentContext(); in GetObjectPropertyNames()
51 void CJS_V8::PutObjectProperty(v8::Local<v8::Object> pObj, in PutObjectProperty()
53 v8::Local<v8::Value> pPut) { in PutObjectProperty()
61 v8::Local<v8::Array> CJS_V8::NewArray() { in NewArray()
62 return v8::Array::New(m_isolate); in NewArray()
65 unsigned CJS_V8::PutArrayElement(v8::Local<v8::Array> pArray, in PutArrayElement()
67 v8::Local<v8::Value> pValue) { in PutArrayElement()
75 v8::Local<v8::Value> CJS_V8::GetArrayElement(v8::Local<v8::Array> pArray, in GetArrayElement()
78 return v8::Local<v8::Value>(); in GetArrayElement()
79 v8::Local<v8::Value> val; in GetArrayElement()
81 return v8::Local<v8::Value>(); in GetArrayElement()
85 unsigned CJS_V8::GetArrayLength(v8::Local<v8::Array> pArray) { in GetArrayLength()
91 v8::Local<v8::Context> CJS_V8::NewLocalContext() { in NewLocalContext()
92 return v8::Local<v8::Context>::New(m_isolate, m_V8PersistentContext); in NewLocalContext()
95 v8::Local<v8::Context> CJS_V8::GetPersistentContext() { in GetPersistentContext()
99 v8::Local<v8::Number> CJS_V8::NewNumber(int number) { in NewNumber()
100 return v8::Int32::New(m_isolate, number); in NewNumber()
103 v8::Local<v8::Number> CJS_V8::NewNumber(double number) { in NewNumber()
104 return v8::Number::New(m_isolate, number); in NewNumber()
107 v8::Local<v8::Number> CJS_V8::NewNumber(float number) { in NewNumber()
108 return v8::Number::New(m_isolate, (float)number); in NewNumber()
111 v8::Local<v8::Boolean> CJS_V8::NewBoolean(bool b) { in NewBoolean()
112 return v8::Boolean::New(m_isolate, b); in NewBoolean()
115 v8::Local<v8::String> CJS_V8::NewString(const ByteStringView& str) { in NewString()
116 v8::Isolate* pIsolate = m_isolate ? m_isolate : v8::Isolate::GetCurrent(); in NewString()
117 return v8::String::NewFromUtf8(pIsolate, str.unterminated_c_str(), in NewString()
118 v8::NewStringType::kNormal, str.GetLength()) in NewString()
122 v8::Local<v8::String> CJS_V8::NewString(const WideStringView& str) { in NewString()
129 v8::Local<v8::Value> CJS_V8::NewNull() { in NewNull()
130 return v8::Null(m_isolate); in NewNull()
133 v8::Local<v8::Value> CJS_V8::NewUndefined() { in NewUndefined()
134 return v8::Undefined(m_isolate); in NewUndefined()
137 v8::Local<v8::Date> CJS_V8::NewDate(double d) { in NewDate()
138 return v8::Date::New(m_isolate->GetCurrentContext(), d) in NewDate()
140 .As<v8::Date>(); in NewDate()
143 int CJS_V8::ToInt32(v8::Local<v8::Value> pValue) { in ToInt32()
146 v8::Local<v8::Context> context = m_isolate->GetCurrentContext(); in ToInt32()
147 v8::MaybeLocal<v8::Int32> maybe_int32 = pValue->ToInt32(context); in ToInt32()
153 bool CJS_V8::ToBoolean(v8::Local<v8::Value> pValue) { in ToBoolean()
156 v8::Local<v8::Context> context = m_isolate->GetCurrentContext(); in ToBoolean()
157 v8::MaybeLocal<v8::Boolean> maybe_boolean = pValue->ToBoolean(context); in ToBoolean()
163 double CJS_V8::ToDouble(v8::Local<v8::Value> pValue) { in ToDouble()
166 v8::Local<v8::Context> context = m_isolate->GetCurrentContext(); in ToDouble()
167 v8::MaybeLocal<v8::Number> maybe_number = pValue->ToNumber(context); in ToDouble()
173 WideString CJS_V8::ToWideString(v8::Local<v8::Value> pValue) { in ToWideString()
176 v8::Local<v8::Context> context = m_isolate->GetCurrentContext(); in ToWideString()
177 v8::MaybeLocal<v8::String> maybe_string = pValue->ToString(context); in ToWideString()
180 v8::String::Utf8Value s(m_isolate, maybe_string.ToLocalChecked()); in ToWideString()
184 ByteString CJS_V8::ToByteString(v8::Local<v8::Value> pValue) { in ToByteString()
187 v8::Local<v8::Context> context = m_isolate->GetCurrentContext(); in ToByteString()
188 v8::MaybeLocal<v8::String> maybe_string = pValue->ToString(context); in ToByteString()
191 v8::String::Utf8Value s(m_isolate, maybe_string.ToLocalChecked()); in ToByteString()
195 v8::Local<v8::Object> CJS_V8::ToObject(v8::Local<v8::Value> pValue) { in ToObject()
197 return v8::Local<v8::Object>(); in ToObject()
198 v8::Local<v8::Context> context = m_isolate->GetCurrentContext(); in ToObject()
202 v8::Local<v8::Array> CJS_V8::ToArray(v8::Local<v8::Value> pValue) { in ToArray()
204 return v8::Local<v8::Array>(); in ToArray()
205 v8::Local<v8::Context> context = m_isolate->GetCurrentContext(); in ToArray()
206 return v8::Local<v8::Array>::Cast(pValue->ToObject(context).ToLocalChecked()); in ToArray()
209 void CJS_V8::SetConstArray(const WideString& name, v8::Local<v8::Array> array) { in SetConstArray()
210 m_ConstArrays[name] = v8::Global<v8::Array>(GetIsolate(), array); in SetConstArray()
213 v8::Local<v8::Array> CJS_V8::GetConstArray(const WideString& name) { in GetConstArray()
214 return v8::Local<v8::Array>::New(GetIsolate(), m_ConstArrays[name]); in GetConstArray()
218 CXFA_Object* CJS_V8::ToXFAObject(v8::Local<v8::Value> obj) { in ToXFAObject()
225 FXJSE_RetrieveObjectBinding(obj.As<v8::Object>(), nullptr); in ToXFAObject()
231 v8::Local<v8::Value> CJS_V8::NewXFAObject( in NewXFAObject()
233 v8::Global<v8::FunctionTemplate>& tmpl) { in NewXFAObject()
234 v8::EscapableHandleScope scope(m_isolate); in NewXFAObject()
235 v8::Local<v8::FunctionTemplate> klass = in NewXFAObject()
236 v8::Local<v8::FunctionTemplate>::New(m_isolate, tmpl); in NewXFAObject()
237 v8::Local<v8::Object> object = klass->InstanceTemplate()->NewInstance(); in NewXFAObject()