35String16 consoleContextToString(
37 if (consoleContext.
id() == 0)
return String16();
46 V8InspectorImpl* inspector)
51 ConsoleHelper(
const ConsoleHelper&) =
delete;
52 ConsoleHelper& operator=(
const ConsoleHelper&) =
delete;
56 return isolate()->GetCurrentContext();
59 int groupId()
const {
return m_inspector->contextGroupId(contextId()); }
61 InjectedScript* injectedScript(
int sessionId) {
62 InspectedContext* context =
m_inspector->getContext(groupId(), contextId());
63 if (!context)
return nullptr;
64 return context->getInjectedScript(sessionId);
67 V8InspectorSessionImpl* session(
int sessionId) {
68 return m_inspector->sessionById(groupId(), sessionId);
71 V8ConsoleMessageStorage* consoleMessageStorage() {
72 return m_inspector->ensureConsoleMessageStorage(groupId());
76 if (!
m_info.Length())
return;
78 arguments.reserve(
m_info.Length());
79 for (
int i = 0;
i <
m_info.Length(); ++
i) arguments.push_back(m_info[
i]);
80 reportCall(type, {arguments.begin(), arguments.end()});
84 const String16& message) {
86 arguments.reserve(
m_info.Length());
87 for (
int i = 0;
i <
m_info.Length(); ++
i) arguments.push_back(m_info[
i]);
89 reportCall(type, {arguments.begin(), arguments.end()});
93 const String16& message) {
96 for (
int i = 1;
i <
m_info.Length(); ++
i) arguments.push_back(m_info[
i]);
97 reportCall(type, {arguments.begin(), arguments.end()});
100 void reportCallWithArgument(
ConsoleAPIType type,
const String16& message) {
103 reportCall(type, arguments);
108 if (!groupId())
return;
111 std::unique_ptr<V8StackTraceImpl> stackTrace;
117 stackTrace =
m_inspector->debugger()->captureStackTrace(
true);
136 stackTrace =
m_inspector->debugger()->captureStackTrace(
false);
139 std::unique_ptr<V8ConsoleMessage> message =
141 context(), contextId(), groupId(), m_inspector,
142 m_inspector->client()->currentTimeMS(), type, arguments,
143 consoleContextToString(
isolate(), m_consoleContext),
144 std::move(stackTrace));
145 consoleMessageStorage()->addMessage(std::move(message));
148 void reportDeprecatedCall(
const char*
id,
const String16& message) {
149 if (!consoleMessageStorage()->shouldReportDeprecationMessage(contextId(),
158 bool firstArgToBoolean(
bool defaultValue) {
159 if (
m_info.Length() < 1)
return defaultValue;
171 if (!arg->IsUndefined() && arg->ToString(context()).
ToLocal(&
label)) {
179 if (
m_info.Length() < 1 || !m_info[0]->IsObject())
185 if (
m_info.Length() < 1 || !m_info[0]->IsFunction())
188 while (func->GetBoundFunction()->IsFunction())
193 void forEachSession(std::function<
void(V8InspectorSessionImpl*)>
callback) {
203void createBoundFunctionProperty(
214 func->SetName(funcName);
218enum InspectRequest {
kRegular, kCopyToClipboard, kQueryObjects };
300 "V8Console::GroupCollapsed");
303 String16(
"console.groupCollapsed"));
309 "V8Console::GroupEnd");
318 ConsoleHelper helper(info, consoleContext,
m_inspector);
319 if (!helper.groupId())
return;
329 ConsoleHelper helper(info, consoleContext,
m_inspector);
332 int count = helper.consoleMessageStorage()->count(helper.contextId(),
337 "V8Console::Count",
"label",
344 "V8Console::CountReset");
345 ConsoleHelper helper(info, consoleContext,
m_inspector);
348 if (!helper.consoleMessageStorage()->countReset(helper.contextId(),
351 "Count for '" +
label +
"' does not exist");
354 "V8Console::CountReset",
"label",
361 ConsoleHelper helper(info, consoleContext,
m_inspector);
362 DCHECK(!helper.firstArgToBoolean(
false));
366 for (
int i = 1;
i < info.Length(); ++
i) arguments.push_back(info[
i]);
367 if (info.Length() < 2)
370 {arguments.begin(), arguments.end()});
377 "V8Console::Profile");
378 ConsoleHelper helper(info, consoleContext,
m_inspector);
385 "V8Console::Profile",
"title",
392 "V8Console::ProfileEnd");
393 ConsoleHelper helper(info, consoleContext,
m_inspector);
400 "V8Console::ProfileEnd",
"title",
407 ConsoleHelper helper(info, consoleContext,
m_inspector);
410 if (!helper.consoleMessageStorage()->time(
411 helper.contextId(), consoleContext.
id(), protocolLabel)) {
412 helper.reportCallWithArgument(
414 "Timer '" + protocolLabel +
"' already exists");
423 ConsoleHelper helper(info, consoleContext,
m_inspector);
426 std::optional<double> elapsed = helper.consoleMessageStorage()->timeLog(
427 helper.contextId(), consoleContext.
id(), protocolLabel);
428 if (!elapsed.has_value()) {
429 helper.reportCallWithArgument(
431 "Timer '" + protocolLabel +
"' does not exist");
442 ConsoleHelper helper(info, consoleContext,
m_inspector);
445 std::optional<double> elapsed = helper.consoleMessageStorage()->timeEnd(
446 helper.contextId(), consoleContext.
id(), protocolLabel);
447 if (!elapsed.has_value()) {
448 helper.reportCallWithArgument(
450 "Timer '" + protocolLabel +
"' does not exist");
462 "V8Console::TimeStamp");
463 ConsoleHelper helper(info, consoleContext,
m_inspector);
468 args.reserve(info.Length());
469 for (
int i = 0;
i < info.Length();
i++) {
470 args.push_back(info[
i]);
481 info.GetIsolate()->GetCurrentContext())
484 info.GetReturnValue().Set(memoryValue);
499 if (info.Length() < 1 || !info[0]->IsString() ||
501 isolate->ThrowError(
"First argument must be a non-empty string.");
506 ->NewInstance(isolate->GetCurrentContext())
509 auto taskInfo = std::make_unique<TaskInfo>(isolate,
this, task);
510 void* taskId = taskInfo->Id();
511 auto [iter, inserted] =
m_tasks.emplace(taskId, std::move(taskInfo));
519 info.GetReturnValue().Set(task);
524 if (info.Length() < 1 || !info[0]->IsFunction()) {
525 isolate->ThrowError(
"First argument must be a function.");
532 if (!task->GetPrivate(isolate->GetCurrentContext(),
taskInfoKey())
533 .ToLocal(&maybeTaskExternal)) {
538 if (!maybeTaskExternal->IsExternal()) {
539 isolate->ThrowError(
"'run' called with illegal receiver.");
548#ifdef V8_USE_PERFETTO
550 "data", ([&](perfetto::TracedValue context) {
552 auto dict = std::move(context).WriteDictionary();
553 v8::CpuProfiler::CpuProfiler::CollectSample(isolate,
555 dict.Add(
"sampleTraceId", trace_id);
561 ->Call(isolate->GetCurrentContext(),
v8::Undefined(isolate), 0, {})
563 info.GetReturnValue().Set(
result);
601 TaskInfo* task = info.GetParameter();
610 : m_task(isolate, task), m_console(console) {
611 task->SetPrivate(isolate->GetCurrentContext(), console->taskInfoKey(),
625 if (!helper.firstArgAsObject().ToLocal(&obj))
return;
627 if (!obj->GetOwnPropertyNames(isolate->GetCurrentContext()).ToLocal(&names))
629 info.GetReturnValue().Set(names);
640 if (!helper.firstArgAsObject().ToLocal(&obj))
return;
643 if (!obj->GetOwnPropertyNames(context).ToLocal(&names))
return;
645 for (uint32_t
i = 0;
i < names->Length(); ++
i) {
647 if (!names->Get(context,
i).ToLocal(&
key))
continue;
649 if (!obj->Get(context,
key).ToLocal(&value))
continue;
652 info.GetReturnValue().Set(values);
661 if (session ==
nullptr)
return;
676 if (!helper.firstArgAsFunction().ToLocal(&function))
return;
677 if (
args.Length() > 1 &&
args[1]->IsString()) {
690 if (!helper.firstArgAsFunction().ToLocal(&function))
return;
701 if (!helper.firstArgAsFunction().ToLocal(&function))
return;
704 name = function->GetInferredName();
708 builder.
append(
"console.log(\"function ");
710 builder.
append(
"(anonymous function)");
712 builder.
append(functionName);
714 " called\" + (typeof arguments !== \"undefined\" && arguments.length > 0 "
715 "? \" with arguments: \" + Array.prototype.join.call(arguments, \", \") "
716 ": \"\")) && false");
728 if (!helper.firstArgAsFunction().ToLocal(&function))
return;
738 InjectedScript* injectedScript = helper.injectedScript(sessionId);
739 if (!injectedScript)
return;
746 if (request == kRegular) info.GetReturnValue().Set(value);
750 InjectedScript* injectedScript = helper.injectedScript(sessionId);
751 if (!injectedScript)
return;
752 std::unique_ptr<protocol::Runtime::RemoteObject> wrappedObject;
753 protocol::Response response = injectedScript->
wrapObject(
755 if (!response.IsSuccess())
return;
757 std::unique_ptr<protocol::DictionaryValue> hints =
758 protocol::DictionaryValue::create();
759 if (request == kCopyToClipboard) {
760 hints->setBoolean(
"copyToClipboard",
true);
761 }
else if (request == kQueryObjects) {
762 hints->setBoolean(
"queryObjects",
true);
765 session->runtimeAgent()->inspect(std::move(wrappedObject), std::move(hints),
772 if (info.Length() < 1)
return;
778 if (info.Length() < 1)
return;
784 if (info.Length() < 1)
return;
786 if (arg->IsFunction()) {
791 ->
Get(isolate->GetCurrentContext(),
793 .ToLocal(&prototype) &&
794 prototype->IsObject()) {
806 int sessionId,
unsigned num) {
814 info.GetReturnValue().Set(object->get(isolate->GetCurrentContext()));
824 console->SetAccessorProperty(
845 createBoundFunctionProperty(context, console, data,
"createTask",
856 bool success = commandLineAPI->SetPrototypeV2(context,
v8::Null(isolate))
865 createBoundFunctionProperty(context, commandLineAPI, data,
"dir",
867 createBoundFunctionProperty(context, commandLineAPI, data,
"dirxml",
869 createBoundFunctionProperty(context, commandLineAPI, data,
"profile",
871 createBoundFunctionProperty(context, commandLineAPI, data,
"profileEnd",
873 createBoundFunctionProperty(context, commandLineAPI, data,
"clear",
875 createBoundFunctionProperty(context, commandLineAPI, data,
"table",
878 createBoundFunctionProperty(context, commandLineAPI, data,
"keys",
881 createBoundFunctionProperty(context, commandLineAPI, data,
"values",
884 createBoundFunctionProperty(
885 context, commandLineAPI, data,
"debug",
887 createBoundFunctionProperty(
888 context, commandLineAPI, data,
"undebug",
890 createBoundFunctionProperty(
891 context, commandLineAPI, data,
"monitor",
893 createBoundFunctionProperty(
894 context, commandLineAPI, data,
"unmonitor",
896 createBoundFunctionProperty(context, commandLineAPI, data,
"inspect",
898 createBoundFunctionProperty(context, commandLineAPI, data,
"copy",
900 createBoundFunctionProperty(
901 context, commandLineAPI, data,
"queryObjects",
903 createBoundFunctionProperty(
904 context, commandLineAPI, data,
"$_",
907 createBoundFunctionProperty(context, commandLineAPI, data,
"$0",
910 createBoundFunctionProperty(context, commandLineAPI, data,
"$1",
913 createBoundFunctionProperty(context, commandLineAPI, data,
"$2",
916 createBoundFunctionProperty(context, commandLineAPI, data,
"$3",
919 createBoundFunctionProperty(context, commandLineAPI, data,
"$4",
925 return commandLineAPI;
929 if (name.length() != 2)
return false;
931 return name[0] ==
'$' &&
932 ((name[1] >=
'0' && name[1] <=
'4') || name[1] ==
'_');
938 info.Data().As<v8::ArrayBuffer>()->GetBackingStore()->Data());
940 if (scope ==
nullptr) {
941 USE(info.HolderV2()->Delete(context, name).FromMaybe(
false));
949 DCHECK(value->IsFunction());
955 info.GetReturnValue().Set(value);
957 info.GetReturnValue().Set(value);
965 info.Data().As<v8::ArrayBuffer>()->GetBackingStore()->Data());
966 if (scope ==
nullptr)
return;
968 if (!info.HolderV2()->Delete(context, name).FromMaybe(
false))
return;
970 ->CreateDataProperty(context, name, value)
975 for (
int i = 0;
i < methods->Length(); ++
i) {
977 if (methodName.
IsEmpty() || !methodName->IsName())
continue;
978 if (!name->StrictEquals(methodName))
continue;
990 UnsafeCommandLineAPIFns,
991 std::initializer_list<std::string_view>{
992 "debug",
"undebug",
"monitor",
"unmonitor",
993 "inspect",
"copy",
"queryObjects"})
997 return UnsafeCommandLineAPIFns()->count(nameStr) > 0;
1007 m_commandLineAPI(
m_isolate, commandLineAPI),
1022 for (uint32_t
i = 0;
i < names->Length(); ++
i) {
1024 if (!names->Get(context,
i).ToLocal(&name) || !name->IsName())
continue;
1025 if (
global->
Has(context, name).FromMaybe(
true))
continue;
1028 IsUnsafeCommandLineAPIFn(name, context->GetIsolate())
1032 ->SetNativeDataProperty(
1037 .FromMaybe(
false)) {
1049 thisReference()->GetBackingStore()->Data()) =
nullptr;
1051 for (
int i = 0;
i < names->Length(); ++
i) {
1053 if (name.IsEmpty() || !name->IsName())
continue;
1054 if (name->IsString()) {
1059 .ToLocal(&descriptor);
static Local< ArrayBuffer > New(Isolate *isolate, size_t byte_length, BackingStoreInitializationMode initialization_mode=BackingStoreInitializationMode::kZeroInitialized)
static Local< Array > New(Isolate *isolate, int length=0)
static Local< External > New(Isolate *isolate, void *value)
static Local< FunctionTemplate > New(Isolate *isolate, FunctionCallback callback=nullptr, Local< Value > data=Local< Value >(), Local< Signature > signature=Local< Signature >(), int length=0, ConstructorBehavior behavior=ConstructorBehavior::kAllow, SideEffectType side_effect_type=SideEffectType::kHasSideEffect, const CFunction *c_function=nullptr, uint16_t instance_type=0, uint16_t allowed_receiver_instance_type_range_start=0, uint16_t allowed_receiver_instance_type_range_end=0)
static MaybeLocal< Function > New(Local< Context > context, FunctionCallback callback, Local< Value > data=Local< Value >(), int length=0, ConstructorBehavior behavior=ConstructorBehavior::kAllow, SideEffectType side_effect_type=SideEffectType::kHasSideEffect)
V8_WARN_UNUSED_RESULT MaybeLocal< Value > Call(v8::Isolate *isolate, Local< Context > context, Local< Value > recv, int argc, Local< Value > argv[])
bool IsExecutionTerminating()
V8_INLINE Local< S > As() const
V8_WARN_UNUSED_RESULT V8_INLINE bool ToLocal(Local< S > *out) const
static Local< ObjectTemplate > New(Isolate *isolate, Local< FunctionTemplate > constructor=Local< FunctionTemplate >())
static Local< Object > New(Isolate *isolate)
V8_WARN_UNUSED_RESULT Maybe< bool > Has(Local< Context > context, Local< Value > key)
V8_WARN_UNUSED_RESULT MaybeLocal< Array > GetOwnPropertyNames(Local< Context > context)
V8_WARN_UNUSED_RESULT MaybeLocal< Value > Get(Local< Context > context, Local< Value > key)
V8_INLINE Local< T > Get(Isolate *isolate) const
V8_INLINE void SetWeak(P *parameter, typename WeakCallbackInfo< P >::Callback callback, WeakCallbackType type)
static Local< PrimitiveArray > New(Isolate *isolate, int length)
static Local< Private > New(Isolate *isolate, Local< String > name=Local< String >())
V8_INLINE bool IsEmpty() const
v8::Local< v8::String > name() const
v8::Local< v8::Value > lastEvaluationResult() const
Response wrapObject(v8::Local< v8::Value >, const String16 &groupName, const WrapOptions &wrapOptions, std::unique_ptr< protocol::Runtime::RemoteObject > *result)
void append(const String16 &)
static String16 fromInteger(int)
static String16 fromDouble(double)
V8_EXPORT std::string utf8() const
const uint16_t * characters16() const
TaskInfo(v8::Isolate *isolate, V8Console *console, v8::Local< v8::Object > task)
v8::Global< v8::Object > m_task
static std::unique_ptr< V8ConsoleMessage > createForConsoleAPI(v8::Local< v8::Context > v8Context, int contextId, int groupId, V8InspectorImpl *inspector, double timestamp, ConsoleAPIType, v8::MemorySpan< const v8::Local< v8::Value > > arguments, const String16 &consoleContext, std::unique_ptr< V8StackTraceImpl >)
v8::Global< v8::ArrayBuffer > m_thisReference
v8::Local< v8::ArrayBuffer > thisReference() const
v8::Local< v8::Object > global() const
static void accessorGetterCallback(v8::Local< v8::Name >, const v8::PropertyCallbackInfo< v8::Value > &)
static void accessorSetterCallback(v8::Local< v8::Name >, v8::Local< v8::Value >, const v8::PropertyCallbackInfo< void > &)
v8::Global< v8::PrimitiveArray > m_installedMethods
v8::Local< v8::PrimitiveArray > installedMethods() const
CommandLineAPIScope(v8::Local< v8::Context >, v8::Local< v8::Object > commandLineAPI, v8::Local< v8::Object > global)
v8::Local< v8::Object > commandLineAPI() const
void memoryGetterCallback(const v8::FunctionCallbackInfo< v8::Value > &)
void ProfileEnd(const v8::debug::ConsoleCallArguments &, const v8::debug::ConsoleContext &consoleContext) override
v8::Global< v8::ObjectTemplate > m_taskTemplate
void keysCallback(const v8::FunctionCallbackInfo< v8::Value > &, int sessionId)
void Group(const v8::debug::ConsoleCallArguments &, const v8::debug::ConsoleContext &consoleContext) override
void debugFunctionCallback(const v8::FunctionCallbackInfo< v8::Value > &, int sessionId)
void monitorFunctionCallback(const v8::FunctionCallbackInfo< v8::Value > &, int sessionId)
void Error(const v8::debug::ConsoleCallArguments &, const v8::debug::ConsoleContext &consoleContext) override
std::pair< V8Console *, int > CommandLineAPIData
v8::Local< v8::ObjectTemplate > taskTemplate()
void Dir(const v8::debug::ConsoleCallArguments &, const v8::debug::ConsoleContext &consoleContext) override
void inspectedObject(const v8::FunctionCallbackInfo< v8::Value > &, int sessionId, unsigned num)
void Assert(const v8::debug::ConsoleCallArguments &, const v8::debug::ConsoleContext &consoleContext) override
void Log(const v8::debug::ConsoleCallArguments &, const v8::debug::ConsoleContext &consoleContext) override
v8::Local< v8::Object > createCommandLineAPI(v8::Local< v8::Context > context, int sessionId)
void GroupEnd(const v8::debug::ConsoleCallArguments &, const v8::debug::ConsoleContext &consoleContext) override
void installMemoryGetter(v8::Local< v8::Context > context, v8::Local< v8::Object > console)
void CountReset(const v8::debug::ConsoleCallArguments &, const v8::debug::ConsoleContext &consoleContext) override
V8InspectorImpl * m_inspector
void runTask(const v8::FunctionCallbackInfo< v8::Value > &)
void Clear(const v8::debug::ConsoleCallArguments &, const v8::debug::ConsoleContext &consoleContext) override
std::map< void *, std::unique_ptr< TaskInfo > > m_tasks
void undebugFunctionCallback(const v8::FunctionCallbackInfo< v8::Value > &, int sessionId)
void lastEvaluationResultCallback(const v8::FunctionCallbackInfo< v8::Value > &, int sessionId)
void queryObjectsCallback(const v8::FunctionCallbackInfo< v8::Value > &info, int sessionId)
v8::Local< v8::Private > taskInfoKey()
void Table(const v8::debug::ConsoleCallArguments &, const v8::debug::ConsoleContext &consoleContext) override
void Warn(const v8::debug::ConsoleCallArguments &, const v8::debug::ConsoleContext &consoleContext) override
void Count(const v8::debug::ConsoleCallArguments &, const v8::debug::ConsoleContext &consoleContext) override
void Profile(const v8::debug::ConsoleCallArguments &, const v8::debug::ConsoleContext &consoleContext) override
void installAsyncStackTaggingAPI(v8::Local< v8::Context > context, v8::Local< v8::Object > console)
void Time(const v8::debug::ConsoleCallArguments &, const v8::debug::ConsoleContext &consoleContext) override
void TimeStamp(const v8::debug::ConsoleCallArguments &, const v8::debug::ConsoleContext &consoleContext) override
void createTask(const v8::FunctionCallbackInfo< v8::Value > &)
void inspectCallback(const v8::FunctionCallbackInfo< v8::Value > &, int sessionId)
void TimeEnd(const v8::debug::ConsoleCallArguments &, const v8::debug::ConsoleContext &consoleContext) override
V8Console(V8InspectorImpl *inspector)
void cancelConsoleTask(TaskInfo *taskInfo)
void Info(const v8::debug::ConsoleCallArguments &, const v8::debug::ConsoleContext &consoleContext) override
void memorySetterCallback(const v8::FunctionCallbackInfo< v8::Value > &)
void valuesCallback(const v8::FunctionCallbackInfo< v8::Value > &, int sessionId)
v8::Global< v8::Private > m_taskInfoKey
void unmonitorFunctionCallback(const v8::FunctionCallbackInfo< v8::Value > &, int sessionId)
void TimeLog(const v8::debug::ConsoleCallArguments &, const v8::debug::ConsoleContext &consoleContext) override
void Trace(const v8::debug::ConsoleCallArguments &, const v8::debug::ConsoleContext &consoleContext) override
void DirXml(const v8::debug::ConsoleCallArguments &, const v8::debug::ConsoleContext &consoleContext) override
static void call(const v8::FunctionCallbackInfo< v8::Value > &info)
void copyCallback(const v8::FunctionCallbackInfo< v8::Value > &, int sessionId)
void Debug(const v8::debug::ConsoleCallArguments &, const v8::debug::ConsoleContext &consoleContext) override
void GroupCollapsed(const v8::debug::ConsoleCallArguments &, const v8::debug::ConsoleContext &consoleContext) override
void removeBreakpointFor(v8::Local< v8::Function > function, BreakpointSource source)
@ MonitorCommandBreakpointSource
@ DebugCommandBreakpointSource
void setBreakpointFor(v8::Local< v8::Function > function, v8::Local< v8::String > condition, BreakpointSource source)
void breakProgramOnAssert(int targetContextGroupId)
virtual void consoleClear(int contextGroupId)
virtual void consoleTime(v8::Isolate *isolate, v8::Local< v8::String > label)
virtual void consoleTimeEnd(v8::Isolate *isolate, v8::Local< v8::String > label)
virtual v8::MaybeLocal< v8::Value > memoryInfo(v8::Isolate *, v8::Local< v8::Context >)
virtual void installAdditionalCommandLineAPI(v8::Local< v8::Context >, v8::Local< v8::Object >)
virtual void consoleTimeStampWithArgs(v8::Isolate *isolate, v8::Local< v8::String > label, const v8::LocalVector< v8::Value > &args)
void asyncTaskStarted(void *task) override
v8::Isolate * isolate() const
void asyncTaskScheduled(StringView taskName, void *task, bool recurring) override
V8InspectorClient * client()
void asyncTaskFinished(void *task) override
void asyncTaskCanceled(void *task) override
V8ProfilerAgentImpl * profilerAgent()
V8DebuggerAgentImpl * debuggerAgent()
static const unsigned kInspectedObjectBufferSize
void consoleProfile(const String16 &title)
void consoleProfileEnd(const String16 &title)
static std::unique_ptr< V8StackTraceImpl > capture(V8Debugger *, int maxStackSize)
base::Vector< const DirectHandle< Object > > args
ZoneVector< RpoNumber > & result
#define DEFINE_LAZY_LEAKY_OBJECT_GETTER(T, FunctionName,...)
void RecordAsyncStackTaggingCreateTaskCall(v8::Isolate *v8_isolate)
V8_INLINE uint64_t TraceId()
static bool isCommandLineAPIGetter(const String16 &name)
String16 toProtocolString(v8::Isolate *isolate, v8::Local< v8::String > value)
v8::Local< v8::String > toV8String(v8::Isolate *isolate, const String16 &string)
static void setFunctionBreakpoint(ConsoleHelper &helper, int sessionId, v8::Local< v8::Function > function, V8DebuggerAgentImpl::BreakpointSource source, v8::Local< v8::String > condition, bool enable)
v8::Maybe< bool > createDataProperty(v8::Local< v8::Context > context, v8::Local< v8::Object > object, v8::Local< v8::Name > key, v8::Local< v8::Value > value)
static void inspectImpl(const v8::FunctionCallbackInfo< v8::Value > &info, v8::Local< v8::Value > value, int sessionId, InspectRequest request, V8InspectorImpl *inspector)
String16 toProtocolStringWithTypeCheck(v8::Isolate *isolate, v8::Local< v8::Value > value)
v8::Local< v8::String > toV8StringInternalized(v8::Isolate *isolate, const String16 &string)
V8_INLINE Local< Primitive > Null(Isolate *isolate)
bool ToLocal(v8::internal::MaybeDirectHandle< v8::internal::Object > maybe, Local< T > *local)
V8_INLINE Local< Primitive > Undefined(Isolate *isolate)
constexpr std::array< std::remove_cv_t< T >, N > to_array(T(&a)[N])
void(*)(const FunctionCallbackInfo< Value > &info) FunctionCallback
#define DCHECK(condition)
#define DCHECK_GT(v1, v2)
#define TRACE_EVENT_END2(category_group, name, arg1_name, arg1_val, arg2_name, arg2_val)
#define TRACE_EVENT0(category_group, name)
#define TRACE_EVENT_END1(category_group, name, arg1_name, arg1_val)
#define TRACE_DISABLED_BY_DEFAULT(name)
#define TRACE_EVENT_BEGIN0(category_group, name)
#define TRACE_STR_COPY(str)
v8::Local< v8::Context > m_context
V8InspectorImpl * m_inspector
const v8::debug::ConsoleContext & m_consoleContext
const v8::debug::ConsoleCallArguments & m_info
#define V8_LIKELY(condition)
std::unique_ptr< ValueMirror > value
std::unique_ptr< ValueMirror > key