Lines Matching refs:v8
27 v8::Isolate* isolate, const v8::debug::ConsoleContext& consoleContext) { in consoleContextToString()
35 ConsoleHelper(const v8::debug::ConsoleCallArguments& info, in ConsoleHelper()
36 const v8::debug::ConsoleContext& consoleContext, in ConsoleHelper()
65 std::vector<v8::Local<v8::Value>> arguments; in reportCall()
72 std::vector<v8::Local<v8::Value>> arguments; in reportCallWithDefaultArgument()
79 std::vector<v8::Local<v8::Value>> arguments(1, in reportCallWithArgument()
85 const std::vector<v8::Local<v8::Value>>& arguments) { in reportCall()
101 std::vector<v8::Local<v8::Value>> arguments(1, in reportDeprecatedCall()
108 if (m_info[0]->IsBoolean()) return m_info[0].As<v8::Boolean>()->Value(); in firstArgToBoolean()
117 v8::Local<v8::String> titleValue; in firstArgToString()
118 v8::TryCatch tryCatch(m_context->GetIsolate()); in firstArgToString()
120 if (!m_info[0].As<v8::Object>()->ObjectProtoToString(m_context).ToLocal( in firstArgToString()
130 v8::MaybeLocal<v8::Object> firstArgAsObject() { in firstArgAsObject()
132 return v8::MaybeLocal<v8::Object>(); in firstArgAsObject()
133 return m_info[0].As<v8::Object>(); in firstArgAsObject()
136 v8::MaybeLocal<v8::Function> firstArgAsFunction() { in firstArgAsFunction()
138 return v8::MaybeLocal<v8::Function>(); in firstArgAsFunction()
139 v8::Local<v8::Function> func = m_info[0].As<v8::Function>(); in firstArgAsFunction()
141 func = func->GetBoundFunction().As<v8::Function>(); in firstArgAsFunction()
150 const v8::debug::ConsoleCallArguments& m_info;
151 const v8::debug::ConsoleContext& m_consoleContext;
152 v8::Isolate* m_isolate;
153 v8::Local<v8::Context> m_context;
161 void returnDataCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { in returnDataCallback()
166 v8::Local<v8::Context> context, v8::Local<v8::Object> console, in createBoundFunctionProperty()
167 v8::Local<v8::Value> data, const char* name, v8::FunctionCallback callback, in createBoundFunctionProperty()
169 v8::SideEffectType side_effect_type = v8::SideEffectType::kHasSideEffect) { in createBoundFunctionProperty()
170 v8::Local<v8::String> funcName = in createBoundFunctionProperty()
172 v8::Local<v8::Function> func; in createBoundFunctionProperty()
173 if (!v8::Function::New(context, callback, data, 0, in createBoundFunctionProperty()
174 v8::ConstructorBehavior::kThrow, side_effect_type) in createBoundFunctionProperty()
179 v8::Local<v8::String> returnValue = in createBoundFunctionProperty()
181 v8::Local<v8::Function> toStringFunction; in createBoundFunctionProperty()
182 if (v8::Function::New(context, returnDataCallback, returnValue, 0, in createBoundFunctionProperty()
183 v8::ConstructorBehavior::kThrow, in createBoundFunctionProperty()
184 v8::SideEffectType::kHasNoSideEffect) in createBoundFunctionProperty()
199 void V8Console::Debug(const v8::debug::ConsoleCallArguments& info, in Debug()
200 const v8::debug::ConsoleContext& consoleContext) { in Debug()
205 void V8Console::Error(const v8::debug::ConsoleCallArguments& info, in Error()
206 const v8::debug::ConsoleContext& consoleContext) { in Error()
211 void V8Console::Info(const v8::debug::ConsoleCallArguments& info, in Info()
212 const v8::debug::ConsoleContext& consoleContext) { in Info()
217 void V8Console::Log(const v8::debug::ConsoleCallArguments& info, in Log()
218 const v8::debug::ConsoleContext& consoleContext) { in Log()
223 void V8Console::Warn(const v8::debug::ConsoleCallArguments& info, in Warn()
224 const v8::debug::ConsoleContext& consoleContext) { in Warn()
229 void V8Console::Dir(const v8::debug::ConsoleCallArguments& info, in Dir()
230 const v8::debug::ConsoleContext& consoleContext) { in Dir()
235 void V8Console::DirXml(const v8::debug::ConsoleCallArguments& info, in DirXml()
236 const v8::debug::ConsoleContext& consoleContext) { in DirXml()
241 void V8Console::Table(const v8::debug::ConsoleCallArguments& info, in Table()
242 const v8::debug::ConsoleContext& consoleContext) { in Table()
247 void V8Console::Trace(const v8::debug::ConsoleCallArguments& info, in Trace()
248 const v8::debug::ConsoleContext& consoleContext) { in Trace()
254 void V8Console::Group(const v8::debug::ConsoleCallArguments& info, in Group()
255 const v8::debug::ConsoleContext& consoleContext) { in Group()
262 const v8::debug::ConsoleCallArguments& info, in GroupCollapsed()
263 const v8::debug::ConsoleContext& consoleContext) { in GroupCollapsed()
269 void V8Console::GroupEnd(const v8::debug::ConsoleCallArguments& info, in GroupEnd()
270 const v8::debug::ConsoleContext& consoleContext) { in GroupEnd()
276 void V8Console::Clear(const v8::debug::ConsoleCallArguments& info, in Clear()
277 const v8::debug::ConsoleContext& consoleContext) { in Clear()
287 const v8::debug::ConsoleContext& consoleContext, in identifierFromTitleOrStackTrace()
306 void V8Console::Count(const v8::debug::ConsoleCallArguments& info, in Count()
307 const v8::debug::ConsoleContext& consoleContext) { in Count()
321 void V8Console::CountReset(const v8::debug::ConsoleCallArguments& info, in CountReset()
322 const v8::debug::ConsoleContext& consoleContext) { in CountReset()
335 void V8Console::Assert(const v8::debug::ConsoleCallArguments& info, in Assert()
336 const v8::debug::ConsoleContext& consoleContext) { in Assert()
340 std::vector<v8::Local<v8::Value>> arguments; in Assert()
349 void V8Console::Profile(const v8::debug::ConsoleCallArguments& info, in Profile()
350 const v8::debug::ConsoleContext& consoleContext) { in Profile()
358 void V8Console::ProfileEnd(const v8::debug::ConsoleCallArguments& info, in ProfileEnd()
359 const v8::debug::ConsoleContext& consoleContext) { in ProfileEnd()
367 static void timeFunction(const v8::debug::ConsoleCallArguments& info, in timeFunction()
368 const v8::debug::ConsoleContext& consoleContext, in timeFunction()
386 static void timeEndFunction(const v8::debug::ConsoleCallArguments& info, in timeEndFunction()
387 const v8::debug::ConsoleContext& consoleContext, in timeEndFunction()
411 void V8Console::Time(const v8::debug::ConsoleCallArguments& info, in Time()
412 const v8::debug::ConsoleContext& consoleContext) { in Time()
416 void V8Console::TimeEnd(const v8::debug::ConsoleCallArguments& info, in TimeEnd()
417 const v8::debug::ConsoleContext& consoleContext) { in TimeEnd()
421 void V8Console::TimeStamp(const v8::debug::ConsoleCallArguments& info, in TimeStamp()
422 const v8::debug::ConsoleContext& consoleContext) { in TimeStamp()
429 const v8::FunctionCallbackInfo<v8::Value>& info) { in memoryGetterCallback()
430 v8::Local<v8::Value> memoryValue; in memoryGetterCallback()
440 const v8::FunctionCallbackInfo<v8::Value>& info) { in memorySetterCallback()
446 void V8Console::keysCallback(const v8::FunctionCallbackInfo<v8::Value>& info, in keysCallback()
448 v8::Isolate* isolate = info.GetIsolate(); in keysCallback()
449 info.GetReturnValue().Set(v8::Array::New(isolate)); in keysCallback()
451 v8::debug::ConsoleCallArguments args(info); in keysCallback()
452 ConsoleHelper helper(args, v8::debug::ConsoleContext(), m_inspector); in keysCallback()
453 v8::Local<v8::Object> obj; in keysCallback()
455 v8::Local<v8::Array> names; in keysCallback()
461 void V8Console::valuesCallback(const v8::FunctionCallbackInfo<v8::Value>& info, in valuesCallback()
463 v8::Isolate* isolate = info.GetIsolate(); in valuesCallback()
464 info.GetReturnValue().Set(v8::Array::New(isolate)); in valuesCallback()
466 v8::debug::ConsoleCallArguments args(info); in valuesCallback()
467 ConsoleHelper helper(args, v8::debug::ConsoleContext(), m_inspector); in valuesCallback()
468 v8::Local<v8::Object> obj; in valuesCallback()
470 v8::Local<v8::Array> names; in valuesCallback()
471 v8::Local<v8::Context> context = isolate->GetCurrentContext(); in valuesCallback()
473 v8::Local<v8::Array> values = v8::Array::New(isolate, names->Length()); in valuesCallback()
475 v8::Local<v8::Value> key; in valuesCallback()
477 v8::Local<v8::Value> value; in valuesCallback()
485 v8::Local<v8::Function> function, in setFunctionBreakpoint()
487 v8::Local<v8::String> condition, in setFunctionBreakpoint()
500 const v8::FunctionCallbackInfo<v8::Value>& info, int sessionId) { in debugFunctionCallback()
501 v8::debug::ConsoleCallArguments args(info); in debugFunctionCallback()
502 ConsoleHelper helper(args, v8::debug::ConsoleContext(), m_inspector); in debugFunctionCallback()
503 v8::Local<v8::Function> function; in debugFunctionCallback()
504 v8::Local<v8::String> condition; in debugFunctionCallback()
507 condition = args[1].As<v8::String>(); in debugFunctionCallback()
515 const v8::FunctionCallbackInfo<v8::Value>& info, int sessionId) { in undebugFunctionCallback()
516 v8::debug::ConsoleCallArguments args(info); in undebugFunctionCallback()
517 ConsoleHelper helper(args, v8::debug::ConsoleContext(), m_inspector); in undebugFunctionCallback()
518 v8::Local<v8::Function> function; in undebugFunctionCallback()
522 v8::Local<v8::String>(), false); in undebugFunctionCallback()
526 const v8::FunctionCallbackInfo<v8::Value>& info, int sessionId) { in monitorFunctionCallback()
527 v8::debug::ConsoleCallArguments args(info); in monitorFunctionCallback()
528 ConsoleHelper helper(args, v8::debug::ConsoleContext(), m_inspector); in monitorFunctionCallback()
529 v8::Local<v8::Function> function; in monitorFunctionCallback()
531 v8::Local<v8::Value> name = function->GetName(); in monitorFunctionCallback()
532 if (!name->IsString() || !v8::Local<v8::String>::Cast(name)->Length()) in monitorFunctionCallback()
552 const v8::FunctionCallbackInfo<v8::Value>& info, int sessionId) { in unmonitorFunctionCallback()
553 v8::debug::ConsoleCallArguments args(info); in unmonitorFunctionCallback()
554 ConsoleHelper helper(args, v8::debug::ConsoleContext(), m_inspector); in unmonitorFunctionCallback()
555 v8::Local<v8::Function> function; in unmonitorFunctionCallback()
559 v8::Local<v8::String>(), false); in unmonitorFunctionCallback()
563 const v8::FunctionCallbackInfo<v8::Value>& info, int sessionId) { in lastEvaluationResultCallback()
564 v8::debug::ConsoleCallArguments args(info); in lastEvaluationResultCallback()
565 ConsoleHelper helper(args, v8::debug::ConsoleContext(), m_inspector); in lastEvaluationResultCallback()
571 static void inspectImpl(const v8::FunctionCallbackInfo<v8::Value>& info, in inspectImpl()
572 v8::Local<v8::Value> value, int sessionId, in inspectImpl()
576 v8::debug::ConsoleCallArguments args(info); in inspectImpl()
577 ConsoleHelper helper(args, v8::debug::ConsoleContext(), inspector); in inspectImpl()
599 void V8Console::inspectCallback(const v8::FunctionCallbackInfo<v8::Value>& info, in inspectCallback()
605 void V8Console::copyCallback(const v8::FunctionCallbackInfo<v8::Value>& info, in copyCallback()
612 const v8::FunctionCallbackInfo<v8::Value>& info, int sessionId) { in queryObjectsCallback()
614 v8::Local<v8::Value> arg = info[0]; in queryObjectsCallback()
616 v8::Isolate* isolate = info.GetIsolate(); in queryObjectsCallback()
617 v8::TryCatch tryCatch(isolate); in queryObjectsCallback()
618 v8::Local<v8::Value> prototype; in queryObjectsCallback()
619 if (arg.As<v8::Function>() in queryObjectsCallback()
634 void V8Console::inspectedObject(const v8::FunctionCallbackInfo<v8::Value>& info, in inspectedObject()
637 v8::debug::ConsoleCallArguments args(info); in inspectedObject()
638 ConsoleHelper helper(args, v8::debug::ConsoleContext(), m_inspector); in inspectedObject()
641 v8::Isolate* isolate = info.GetIsolate(); in inspectedObject()
645 info.GetReturnValue().Set(v8::Undefined(isolate)); in inspectedObject()
649 void V8Console::installMemoryGetter(v8::Local<v8::Context> context, in installMemoryGetter()
650 v8::Local<v8::Object> console) { in installMemoryGetter()
651 v8::Isolate* isolate = context->GetIsolate(); in installMemoryGetter()
652 v8::Local<v8::External> data = v8::External::New(isolate, this); in installMemoryGetter()
655 v8::Function::New( in installMemoryGetter()
657 v8::ConstructorBehavior::kThrow, v8::SideEffectType::kHasNoSideEffect) in installMemoryGetter()
659 v8::Function::New(context, in installMemoryGetter()
661 data, 0, v8::ConstructorBehavior::kThrow) in installMemoryGetter()
663 static_cast<v8::PropertyAttribute>(v8::None), v8::DEFAULT); in installMemoryGetter()
666 v8::Local<v8::Object> V8Console::createCommandLineAPI( in createCommandLineAPI()
667 v8::Local<v8::Context> context, int sessionId) { in createCommandLineAPI()
668 v8::Isolate* isolate = context->GetIsolate(); in createCommandLineAPI()
669 v8::MicrotasksScope microtasksScope(isolate, in createCommandLineAPI()
670 v8::MicrotasksScope::kDoNotRunMicrotasks); in createCommandLineAPI()
672 v8::Local<v8::Object> commandLineAPI = v8::Object::New(isolate); in createCommandLineAPI()
674 commandLineAPI->SetPrototype(context, v8::Null(isolate)).FromMaybe(false); in createCommandLineAPI()
678 v8::Local<v8::ArrayBuffer> data = in createCommandLineAPI()
679 v8::ArrayBuffer::New(isolate, sizeof(CommandLineAPIData)); in createCommandLineAPI()
706 v8::SideEffectType::kHasNoSideEffect); in createCommandLineAPI()
710 v8::SideEffectType::kHasNoSideEffect); in createCommandLineAPI()
741 v8::SideEffectType::kHasNoSideEffect); in createCommandLineAPI()
744 nullptr, v8::SideEffectType::kHasNoSideEffect); in createCommandLineAPI()
747 nullptr, v8::SideEffectType::kHasNoSideEffect); in createCommandLineAPI()
750 nullptr, v8::SideEffectType::kHasNoSideEffect); in createCommandLineAPI()
753 nullptr, v8::SideEffectType::kHasNoSideEffect); in createCommandLineAPI()
756 nullptr, v8::SideEffectType::kHasNoSideEffect); in createCommandLineAPI()
771 v8::Local<v8::Name> name, const v8::PropertyCallbackInfo<v8::Value>& info) { in accessorGetterCallback()
773 info.Data().As<v8::External>()->Value()); in accessorGetterCallback()
776 v8::Local<v8::Context> context = info.GetIsolate()->GetCurrentContext(); in accessorGetterCallback()
783 v8::Local<v8::Object> commandLineAPI = scope->m_commandLineAPI; in accessorGetterCallback()
785 v8::Local<v8::Value> value; in accessorGetterCallback()
790 v8::MicrotasksScope microtasks(info.GetIsolate(), in accessorGetterCallback()
791 v8::MicrotasksScope::kDoNotRunMicrotasks); in accessorGetterCallback()
792 if (value.As<v8::Function>() in accessorGetterCallback()
802 v8::Local<v8::Name> name, v8::Local<v8::Value> value, in accessorSetterCallback()
803 const v8::PropertyCallbackInfo<void>& info) { in accessorSetterCallback()
805 info.Data().As<v8::External>()->Value()); in accessorSetterCallback()
806 v8::Local<v8::Context> context = info.GetIsolate()->GetCurrentContext(); in accessorSetterCallback()
817 v8::Local<v8::Context> context, v8::Local<v8::Object> commandLineAPI, in CommandLineAPIScope()
818 v8::Local<v8::Object> global) in CommandLineAPIScope()
822 m_installedMethods(v8::Set::New(context->GetIsolate())), in CommandLineAPIScope()
824 v8::MicrotasksScope microtasksScope(context->GetIsolate(), in CommandLineAPIScope()
825 v8::MicrotasksScope::kDoNotRunMicrotasks); in CommandLineAPIScope()
826 v8::Local<v8::Array> names; in CommandLineAPIScope()
828 v8::Local<v8::External> externalThis = in CommandLineAPIScope()
829 v8::External::New(context->GetIsolate(), this); in CommandLineAPIScope()
831 v8::Local<v8::Value> name; in CommandLineAPIScope()
837 ->SetAccessor(context, v8::Local<v8::Name>::Cast(name), in CommandLineAPIScope()
840 externalThis, v8::DEFAULT, v8::DontEnum, in CommandLineAPIScope()
841 v8::SideEffectType::kHasNoSideEffect) in CommandLineAPIScope()
852 v8::MicrotasksScope microtasksScope(m_context->GetIsolate(), in ~CommandLineAPIScope()
853 v8::MicrotasksScope::kDoNotRunMicrotasks); in ~CommandLineAPIScope()
855 v8::Local<v8::Array> names = m_installedMethods->AsArray(); in ~CommandLineAPIScope()
857 v8::Local<v8::Value> name; in ~CommandLineAPIScope()
860 v8::Local<v8::Value> descriptor; in ~CommandLineAPIScope()
863 m_context, v8::Local<v8::String>::Cast(name)) in ~CommandLineAPIScope()