Lines Matching refs:v8

22 void setFunctionProperty(v8::Local<v8::Context> context,  in setFunctionProperty()
23 v8::Local<v8::Object> obj, const char* name, in setFunctionProperty()
24 v8::FunctionCallback callback, in setFunctionProperty()
25 v8::Local<v8::External> external) { in setFunctionProperty()
26 v8::Local<v8::String> funcName = in setFunctionProperty()
28 v8::Local<v8::Function> func; in setFunctionProperty()
29 if (!v8::Function::New(context, callback, external, 0, in setFunctionProperty()
30 v8::ConstructorBehavior::kThrow) in setFunctionProperty()
38 const v8::FunctionCallbackInfo<v8::Value>& info) { in unwrapInspector()
42 static_cast<V8InspectorImpl*>(info.Data().As<v8::External>()->Value()); in unwrapInspector()
48 void addTypedArrayProperty(std::vector<v8::Local<v8::Value>>* props, in addTypedArrayProperty()
49 v8::Isolate* isolate, in addTypedArrayProperty()
50 v8::Local<v8::ArrayBuffer> arraybuffer, in addTypedArrayProperty()
58 v8::Local<v8::Object> V8InjectedScriptHost::create( in create()
59 v8::Local<v8::Context> context, V8InspectorImpl* inspector) { in create()
60 v8::Isolate* isolate = inspector->isolate(); in create()
61 v8::Local<v8::Object> injectedScriptHost = v8::Object::New(isolate); in create()
62 bool success = injectedScriptHost->SetPrototype(context, v8::Null(isolate)) in create()
66 v8::Local<v8::External> debuggerExternal = in create()
67 v8::External::New(isolate, inspector); in create()
101 v8::debug::GetBuiltin(isolate, v8::debug::kObjectKeys)); in create()
105 v8::debug::GetBuiltin(isolate, v8::debug::kObjectGetPrototypeOf)); in create()
109 v8::debug::GetBuiltin(isolate, in create()
110 v8::debug::kObjectGetOwnPropertyDescriptor)); in create()
114 v8::debug::GetBuiltin(isolate, v8::debug::kObjectGetOwnPropertyNames)); in create()
118 v8::debug::GetBuiltin(isolate, v8::debug::kObjectGetOwnPropertySymbols)); in create()
123 const v8::FunctionCallbackInfo<v8::Value>& info) { in nullifyPrototypeCallback()
127 v8::Isolate* isolate = info.GetIsolate(); in nullifyPrototypeCallback()
129 .As<v8::Object>() in nullifyPrototypeCallback()
130 ->SetPrototype(isolate->GetCurrentContext(), v8::Null(isolate)) in nullifyPrototypeCallback()
135 const v8::FunctionCallbackInfo<v8::Value>& info) { in getPropertyCallback()
138 v8::Isolate* isolate = info.GetIsolate(); in getPropertyCallback()
139 v8::Local<v8::Context> context = isolate->GetCurrentContext(); in getPropertyCallback()
140 v8::TryCatch tryCatch(isolate); in getPropertyCallback()
141 v8::Isolate::DisallowJavascriptExecutionScope throwJs( in getPropertyCallback()
142 isolate, v8::Isolate::DisallowJavascriptExecutionScope::THROW_ON_FAILURE); in getPropertyCallback()
143 v8::Local<v8::Value> property; in getPropertyCallback()
145 .As<v8::Object>() in getPropertyCallback()
146 ->Get(context, v8::Local<v8::String>::Cast(info[1])) in getPropertyCallback()
153 const v8::FunctionCallbackInfo<v8::Value>& info) { in internalConstructorNameCallback()
156 v8::Local<v8::Object> object = info[0].As<v8::Object>(); in internalConstructorNameCallback()
161 const v8::FunctionCallbackInfo<v8::Value>& info) { in formatAccessorsAsProperties()
166 if (info[1].As<v8::Function>()->ScriptId() != v8::UnboundScript::kNoScriptId) in formatAccessorsAsProperties()
173 const v8::FunctionCallbackInfo<v8::Value>& info) { in subtypeCallback()
176 v8::Isolate* isolate = info.GetIsolate(); in subtypeCallback()
177 v8::Local<v8::Value> value = info[0]; in subtypeCallback()
179 v8::Local<v8::Value> internalType = v8InternalValueTypeFrom( in subtypeCallback()
180 isolate->GetCurrentContext(), v8::Local<v8::Object>::Cast(value)); in subtypeCallback()
255 const v8::FunctionCallbackInfo<v8::Value>& info) { in getInternalPropertiesCallback()
275 v8::Isolate* isolate = info.GetIsolate(); in getInternalPropertiesCallback()
276 v8::Local<v8::Array> allProperties; in getInternalPropertiesCallback()
285 v8::Local<v8::Context> context = isolate->GetCurrentContext(); in getInternalPropertiesCallback()
286 v8::TryCatch tryCatch(isolate); in getInternalPropertiesCallback()
287 v8::Isolate::DisallowJavascriptExecutionScope throwJs( in getInternalPropertiesCallback()
289 v8::Isolate::DisallowJavascriptExecutionScope::THROW_ON_FAILURE); in getInternalPropertiesCallback()
291 v8::Local<v8::Array> properties = v8::Array::New(isolate); in getInternalPropertiesCallback()
296 v8::Local<v8::Value> key; in getInternalPropertiesCallback()
306 v8::Local<v8::Value> value; in getInternalPropertiesCallback()
320 const v8::FunctionCallbackInfo<v8::Value>& info) { in objectHasOwnPropertyCallback()
323 .As<v8::Object>() in objectHasOwnPropertyCallback()
325 v8::Local<v8::String>::Cast(info[1])) in objectHasOwnPropertyCallback()
327 info.GetReturnValue().Set(v8::Boolean::New(info.GetIsolate(), result)); in objectHasOwnPropertyCallback()
331 const v8::FunctionCallbackInfo<v8::Value>& info) { in bindCallback()
337 v8::Local<v8::Context> context = info.GetIsolate()->GetCurrentContext(); in bindCallback()
338 v8::Local<v8::String> v8groupName = in bindCallback()
347 const v8::FunctionCallbackInfo<v8::Value>& info) { in proxyTargetValueCallback()
352 v8::Local<v8::Value> target = info[0].As<v8::Proxy>(); in proxyTargetValueCallback()
354 target = v8::Local<v8::Proxy>::Cast(target)->GetTarget(); in proxyTargetValueCallback()
359 const v8::FunctionCallbackInfo<v8::Value>& info) { in nativeAccessorDescriptorCallback()
360 v8::Isolate* isolate = info.GetIsolate(); in nativeAccessorDescriptorCallback()
362 info.GetReturnValue().Set(v8::Undefined(isolate)); in nativeAccessorDescriptorCallback()
365 v8::Local<v8::Context> context = isolate->GetCurrentContext(); in nativeAccessorDescriptorCallback()
366 int flags = v8::debug::GetNativeAccessorDescriptor( in nativeAccessorDescriptorCallback()
367 context, v8::Local<v8::Object>::Cast(info[0]), in nativeAccessorDescriptorCallback()
368 v8::Local<v8::Name>::Cast(info[1])); in nativeAccessorDescriptorCallback()
369 if (flags == static_cast<int>(v8::debug::NativeAccessorType::None)) { in nativeAccessorDescriptorCallback()
370 info.GetReturnValue().Set(v8::Undefined(isolate)); in nativeAccessorDescriptorCallback()
375 flags & static_cast<int>(v8::debug::NativeAccessorType::IsBuiltin); in nativeAccessorDescriptorCallback()
377 flags & static_cast<int>(v8::debug::NativeAccessorType::HasGetter); in nativeAccessorDescriptorCallback()
379 flags & static_cast<int>(v8::debug::NativeAccessorType::HasSetter); in nativeAccessorDescriptorCallback()
380 v8::Local<v8::Object> result = v8::Object::New(isolate); in nativeAccessorDescriptorCallback()
381 result->SetPrototype(context, v8::Null(isolate)).ToChecked(); in nativeAccessorDescriptorCallback()
383 v8::Boolean::New(isolate, isBuiltin)); in nativeAccessorDescriptorCallback()
385 v8::Boolean::New(isolate, hasGetter)); in nativeAccessorDescriptorCallback()
387 v8::Boolean::New(isolate, hasSetter)); in nativeAccessorDescriptorCallback()
392 const v8::FunctionCallbackInfo<v8::Value>& info) { in typedArrayPropertiesCallback()
393 v8::Isolate* isolate = info.GetIsolate(); in typedArrayPropertiesCallback()
396 v8::TryCatch tryCatch(isolate); in typedArrayPropertiesCallback()
397 v8::Isolate::DisallowJavascriptExecutionScope throwJs( in typedArrayPropertiesCallback()
398 isolate, v8::Isolate::DisallowJavascriptExecutionScope::THROW_ON_FAILURE); in typedArrayPropertiesCallback()
399 v8::Local<v8::ArrayBuffer> arrayBuffer = info[0].As<v8::ArrayBuffer>(); in typedArrayPropertiesCallback()
402 std::vector<v8::Local<v8::Value>> arrays_vector; in typedArrayPropertiesCallback()
403 addTypedArrayProperty<v8::Int8Array>(&arrays_vector, isolate, arrayBuffer, in typedArrayPropertiesCallback()
405 addTypedArrayProperty<v8::Uint8Array>(&arrays_vector, isolate, arrayBuffer, in typedArrayPropertiesCallback()
409 addTypedArrayProperty<v8::Int16Array>(&arrays_vector, isolate, arrayBuffer, in typedArrayPropertiesCallback()
413 addTypedArrayProperty<v8::Int32Array>(&arrays_vector, isolate, arrayBuffer, in typedArrayPropertiesCallback()
418 v8::Local<v8::Context> context = isolate->GetCurrentContext(); in typedArrayPropertiesCallback()
419 v8::Local<v8::Array> arrays = in typedArrayPropertiesCallback()
420 v8::Array::New(isolate, static_cast<uint32_t>(arrays_vector.size())); in typedArrayPropertiesCallback()