16#include "src/inspector/protocol/Protocol.h"
32static const size_t kMaxAsyncTaskStacks = 8 * 1024;
33static const size_t kMaxExternalParents = 1 * 1024;
34static const int kNoBreakpointId = 0;
36template <
typename Map>
37void cleanupExpiredWeakPointers(Map& map) {
38 for (
auto it = map.begin(); it != map.end();) {
39 if (it->second.expired()) {
51class MatchPrototypePredicate : public
v8::QueryObjectPredicate {
53 MatchPrototypePredicate(V8InspectorImpl* inspector,
59 if (object->IsModuleNamespaceObject())
return false;
64 if (objectContext !=
m_context)
return false;
68 prototype->IsObject();
69 prototype = prototype.As<
v8::Object>()->GetPrototype()) {
91 m_ignoreScriptParsedEventsCounter(0),
92 m_continueToLocationBreakpointId(kNoBreakpointId),
93 m_maxAsyncCallStacks(kMaxAsyncTaskStacks),
94 m_maxAsyncCallStackDepth(0),
95 m_maxCallStackSizeToCapture(
97 m_pauseOnExceptionsState(
v8::debug::NoBreakOnException) {}
119#if V8_ENABLE_WEBASSEMBLY
120 v8::debug::EnterDebuggingForIsolate(
m_isolate);
127 bool hasAgentAcceptsPause =
false;
136 hasAgentAcceptsPause =
true;
139 if (!hasAgentAcceptsPause)
150#if V8_ENABLE_WEBASSEMBLY
151 v8::debug::LeaveDebuggingForIsolate(
m_isolate);
167 std::vector<std::unique_ptr<V8DebuggerScript>>
result;
169 std::vector<v8::Global<v8::debug::Script>> scripts;
171 for (
size_t i = 0;
i < scripts.size(); ++
i) {
173 if (!script->WasCompiled())
continue;
174 if (!script->IsEmbedded()) {
176 if (!script->ContextId().To(&contextId))
continue;
213 DCHECK(targetContextGroupId);
245 DCHECK(targetContextGroupId);
253 DCHECK(targetContextGroupId);
269 bool allAgentsFinishedInstrumentation =
true;
274 allAgentsFinishedInstrumentation =
false;
277 if (allAgentsFinishedInstrumentation) {
283 bool terminateOnResume) {
288 }
else if (terminateOnResume) {
294 targetContextGroupId);
310 DCHECK(targetContextGroupId);
317 bool breakOnAsyncCall) {
319 DCHECK(targetContextGroupId);
328 DCHECK(targetContextGroupId);
336 DCHECK(targetContextGroupId);
344 std::unique_ptr<TerminateExecutionCallback>
callback) {
347 callback->sendFailure(Response::ServerError(
348 "There is current termination request in progress"));
362 if (!context.IsEmpty()) {
420 std::unique_ptr<protocol::Debugger::Location> location,
423 DCHECK(targetContextGroupId);
426 location->getColumnNumber(0));
427 if (script->setBreakpoint(
String16(), &v8Location,
431 protocol::Debugger::ContinueToLocation::TargetCallFramesEnum::Any) {
438 return Response::Success();
440 return Response::ServerError(
"Cannot continue to specified location");
446 DCHECK(targetContextGroupId);
458 protocol::Debugger::ContinueToLocation::TargetCallFramesEnum::Any) {
464 protocol::Debugger::ContinueToLocation::TargetCallFramesEnum::Current) {
481 const std::vector<v8::debug::BreakpointId>& breakpointIds,
510 DCHECK(scheduledOOMBreak ==
512 bool hasAgents =
false;
520 if (!hasAgents)
return;
522 if (breakpointIds.size() == 1 &&
534 [&pausedContext, &exception, &breakpointIds, &exceptionType, &isUncaught,
539 breakpointIds, exceptionType, isUncaught, breakReasons);
569size_t HeapLimitForDebugging(
size_t initial_heap_limit) {
570 const size_t kDebugHeapSizeFactor = 4;
571 size_t max_limit = std::numeric_limits<size_t>::max() / 4;
572 return std::min(max_limit, initial_heap_limit * kDebugHeapSizeFactor);
578 size_t initial_heap_limit) {
596 return HeapLimitForDebugging(initial_heap_limit);
600 bool is_live_edited,
bool has_compile_error) {
604 if (!script->ContextId().To(&contextId))
return;
611 [isolate, &script, has_compile_error, is_live_edited,
613 auto agent = session->debuggerAgent();
614 if (!agent->enabled()) return;
615 agent->didParseSource(
616 V8DebuggerScript::Create(isolate, script, is_live_edited, agent,
629 bool hasAgents =
false;
650 bool requestedPauseAfterInstrumentation =
667 }
else if (requestedPauseAfterInstrumentation) {
676 const std::vector<v8::debug::BreakpointId>& break_points_hit,
686 std::vector<v8::debug::BreakpointId> break_points_hit;
688 pausedContext, exception, break_points_hit,
690 exceptionType, isUncaught);
697 if (!script->ContextId().To(&contextId))
return false;
698 bool hasAgents =
false;
699 bool allBlackboxed =
true;
703 [&hasAgents, &allBlackboxed, &scriptId, &
start,
705 V8DebuggerAgentImpl* agent = session->debuggerAgent();
706 if (!agent->enabled()) return;
708 allBlackboxed &= agent->isFunctionBlackboxed(scriptId, start, end);
710 return hasAgents && allBlackboxed;
716 if (!script->ContextId().To(&contextId))
return false;
718 bool hasAgents =
false;
719 bool allShouldBeSkipped =
true;
723 [&hasAgents, &allShouldBeSkipped, &scriptId, line,
725 V8DebuggerAgentImpl* agent = session->debuggerAgent();
726 if (!agent->enabled()) return;
728 const bool skip = agent->shouldBeSkipped(scriptId, line, column);
729 allShouldBeSkipped &= skip;
731 return hasAgents && allShouldBeSkipped;
737 if (!exception_thrown || exception.IsEmpty())
return;
751 context, messageText, exception, detailedMessage,
toStringView(url),
752 message->GetLineNumber(context).FromMaybe(0),
758 int id,
bool isBlackboxed) {
761 void* task =
reinterpret_cast<void*
>(
id * 2 + 1);
804 std::unique_ptr<v8::debug::ScopeIterator> iterator;
825 for (; !iterator->Done(); iterator->Advance()) {
830 m_isolate, iterator->GetFunctionDebugName());
832 if (nameSuffix.
length()) nameSuffix =
" (" + nameSuffix +
")";
833 switch (iterator->GetType()) {
835 description =
"Global" + nameSuffix;
838 description =
"Local" + nameSuffix;
841 description =
"With Block" + nameSuffix;
844 description =
"Closure" + nameSuffix;
847 description =
"Catch" + nameSuffix;
850 description =
"Block" + nameSuffix;
853 description =
"Script" + nameSuffix;
856 description =
"Eval" + nameSuffix;
859 description =
"Module" + nameSuffix;
862 description =
"Wasm Expression Stack" + nameSuffix;
892 bool isKeyValue =
false;
893 if (!collection->IsObject() || !collection.
As<
v8::Object>()
900 CHECK(!isKeyValue || wrappedEntries->Length() % 2 == 0);
901 if (!wrappedEntries->SetPrototypeV2(context,
v8::Null(isolate))
904 for (uint32_t
i = 0;
i <
entries->Length();
i += isKeyValue ? 2 : 1) {
906 if (!
entries->Get(context,
i).ToLocal(&item))
continue;
908 if (isKeyValue && !
entries->Get(context,
i + 1).ToLocal(&value))
continue;
910 if (!wrapper->SetPrototypeV2(context,
v8::Null(isolate)).FromMaybe(
false))
924 return wrappedEntries;
944 if (!
result->SetPrototypeV2(context,
v8::Null(isolate)).FromMaybe(
false))
946 for (uint32_t
i = 0;
i < names.
size();
i++) {
949 DCHECK(value->IsFunction());
951 if (!wrapper->SetPrototypeV2(context,
v8::Null(isolate)).FromMaybe(
false))
981 if (value->IsGeneratorObject()) {
989 if (value->IsFunction()) {
1011 std::vector<v8::Global<v8::Object>> v8_objects;
1012 MatchPrototypePredicate predicate(
m_inspector, context, prototype);
1013 isolate->GetHeapProfiler()->QueryObjects(context, &predicate, &v8_objects);
1019 for (
size_t i = 0;
i < v8_objects.size(); ++
i) {
1021 v8_objects[
i].Get(isolate));
1038 int maxAsyncCallStackDepth = 0;
1040 if (pair.second > maxAsyncCallStackDepth)
1041 maxAsyncCallStackDepth = pair.second;
1051 maxAsyncCallStackDepth ?
this :
nullptr);
1093 std::shared_ptr<AsyncStackTrace>* asyncParent,
1097 *asyncParent = it->second.lock();
1098 if (*asyncParent && (*asyncParent)->isEmpty()) {
1099 *asyncParent = (*asyncParent)->parent().lock();
1102 auto externalIt = std::find_if(
1104 [stackTraceId](
const auto& p) { return p.first == stackTraceId; });
1106 *externalParent = externalIt->second;
1115 if (
debuggerIdFor(contextGroupId).pair() !=
id.debugger_id)
return nullptr;
1118 return it->second.lock();
1129 std::shared_ptr<AsyncStackTrace> asyncStack =
1148 std::shared_ptr<AsyncStackTrace> asyncStack) {
1163 if (didHaveBreak)
return;
1202#ifdef V8_USE_PERFETTO
1205 perfetto::TracedValue context) {
1207 auto dict = std::move(context).WriteDictionary();
1208 v8::CpuProfiler::CpuProfiler::CollectSample(isolate, trace_id);
1209 dict.Add(
"sampleTraceId", trace_id);
1215 void* task,
bool recurring,
1216 bool skipTopFrame) {
1217#ifdef V8_USE_PERFETTO
1219 "v8::Debugger::AsyncTaskScheduled",
"taskName",
1221 perfetto::Flow::ProcessScoped(
reinterpret_cast<uintptr_t
>(task)),
1222 "data", [isolate =
m_isolate](perfetto::TracedValue context) {
1223 AddTraceDataWithSample(isolate, std::move(context));
1228 std::shared_ptr<AsyncStackTrace> asyncStack =
1239#ifdef V8_USE_PERFETTO
1241 "v8::Debugger::AsyncTaskCanceled",
1242 perfetto::Flow::ProcessScoped(
reinterpret_cast<uintptr_t
>(task)),
1243 "data", [isolate =
m_isolate](perfetto::TracedValue context) {
1244 AddTraceDataWithSample(isolate, std::move(context));
1253#ifdef V8_USE_PERFETTO
1256 perfetto::Flow::ProcessScoped(
reinterpret_cast<uintptr_t
>(task)),
"data",
1257 [isolate =
m_isolate](perfetto::TracedValue context) {
1258 AddTraceDataWithSample(isolate, std::move(context));
1273 std::shared_ptr<AsyncStackTrace>
stack(stackIt->second);
1282#ifdef V8_USE_PERFETTO
1284 "v8::Debugger::AsyncTaskRun");
1315 if (didHaveBreak)
return;
1338 if (!externalParent.IsInvalid()) {
1367 if (!contextGroupId)
return nullptr;
1390 size_t halfOfLimitRoundedUp =
1416 int scriptId = v8Frame->GetScriptId();
1417 auto location = v8Frame->GetLocation();
1418 int lineNumber = location.GetLineNumber();
1419 int columnNumber = location.GetColumnNumber();
1423 std::shared_ptr<StackFrame> stackFrame;
1425 if (stackFrame->functionName() == functionName) {
1427 stackFrame->sourceURL(),
1434 auto hasSourceURLComment =
1435 v8Frame->GetScriptName() != v8Frame->GetScriptNameOrSourceURL();
1436 stackFrame = std::make_shared<StackFrame>(std::move(functionName), scriptId,
1437 std::move(sourceURL), lineNumber,
1438 columnNumber, hasSourceURLComment);
1455 it, std::make_pair(contextGroupId, debuggerId));
1472 fprintf(stdout,
"\n");
union v8::internal::@341::BuiltinMetadata::KindSpecificData data
static Local< Array > New(Isolate *isolate, int length=0)
MicrotaskQueue * GetMicrotaskQueue()
void SetCaptureStackTraceForUncaughtExceptions(bool capture, int frame_limit=10, StackTrace::StackTraceOptions options=StackTrace::kOverview)
void RemoveNearHeapLimitCallback(NearHeapLimitCallback callback, size_t heap_limit)
void RemoveCallCompletedCallback(CallCompletedCallback callback)
void CancelTerminateExecution()
void AddCallCompletedCallback(CallCompletedCallback callback)
void RequestInterrupt(InterruptCallback callback, void *data)
Local< Context > GetEnteredOrMicrotaskContext()
void RestoreOriginalHeapLimit()
void TerminateExecution()
void AddNearHeapLimitCallback(NearHeapLimitCallback callback, void *data)
Local< Context > GetCurrentContext()
V8_INLINE Local< S > As() const
virtual void AddMicrotasksCompletedCallback(MicrotasksCompletedCallbackWithData callback, void *data=nullptr)=0
virtual void RemoveMicrotasksCompletedCallback(MicrotasksCompletedCallbackWithData callback, void *data=nullptr)=0
static Local< Object > New(Isolate *isolate)
MaybeLocal< Array > PreviewEntries(bool *is_key_value)
V8_INLINE Local< T > Get(Isolate *isolate) const
V8_INLINE void SetWeak(P *parameter, typename WeakCallbackInfo< P >::Callback callback, WeakCallbackType type)
V8_INLINE int ScriptId() const
V8_INLINE Local< Value > ResourceName() const
V8_INLINE bool IsString() const
V8_INLINE bool IsEmpty() const
constexpr void Add(E element)
constexpr bool contains(E element) const
ActionAfterInstrumentation
static v8::Local< debug::GeneratorObject > Cast(v8::Local< v8::Value > value)
static std::unique_ptr< ScopeIterator > CreateForFunction(v8::Isolate *isolate, v8::Local< v8::Function > func)
static std::unique_ptr< ScopeIterator > CreateForGeneratorObject(v8::Isolate *isolate, v8::Local< v8::Object > generator)
@ ScopeTypeWasmExpressionStack
static std::shared_ptr< AsyncStackTrace > capture(V8Debugger *, const String16 &description, bool skipTopFrame=false)
static uintptr_t store(V8Debugger *debugger, std::shared_ptr< AsyncStackTrace > stack)
bool addInternalObject(v8::Local< v8::Object > object, V8InternalValueType type)
static String16 fromInteger(int)
void didPauseOnInstrumentation(v8::debug::BreakpointId instrumentationId)
bool instrumentationFinished()
void didPause(int contextId, v8::Local< v8::Value > exception, const std::vector< v8::debug::BreakpointId > &hitBreakpoints, v8::debug::ExceptionType exceptionType, bool isUncaught, v8::debug::BreakReasons breakReasons)
bool acceptsPause(bool isOOMBreak) const
static std::unique_ptr< V8DebuggerScript > Create(v8::Isolate *isolate, v8::Local< v8::debug::Script > script, bool isLiveEdit, V8DebuggerAgentImpl *agent, V8InspectorClient *client)
bool m_terminateExecutionReported
void terminateExecution(v8::Local< v8::Context > context, std::unique_ptr< TerminateExecutionCallback > callback)
static void terminateExecutionCompletedCallbackIgnoringData(v8::Isolate *isolate, void *)
std::unique_ptr< V8StackTraceImpl > createStackTrace(v8::Local< v8::StackTrace >)
bool m_requestedPauseAfterInstrumentation
v8::debug::ExceptionBreakState getPauseOnExceptionsState()
std::shared_ptr< StackFrame > symbolize(v8::Local< v8::StackFrame > v8Frame)
std::shared_ptr< AsyncStackTrace > stackTraceFor(int contextGroupId, const V8StackTraceId &id)
v8::MaybeLocal< v8::Value > generatorScopes(v8::Local< v8::Context >, v8::Local< v8::Value >)
void asyncTaskCanceledForStack(void *task)
bool isPausedInContextGroup(int contextGroupId) const
void quitMessageLoopIfAgentsFinishedInstrumentation()
std::unordered_map< CachedStackFrameKey, std::weak_ptr< StackFrame >, CachedStackFrameKey::Hash, CachedStackFrameKey::Equal > m_cachedStackFrames
void asyncTaskCanceled(void *task)
ActionAfterInstrumentation BreakOnInstrumentation(v8::Local< v8::Context > paused_context, v8::debug::BreakpointId) override
void externalAsyncTaskStarted(const V8StackTraceId &parent)
void removeBreakpoint(v8::debug::BreakpointId id)
size_t m_maxAsyncCallStacks
bool m_externalAsyncTaskPauseRequested
void setPauseOnNextCall(bool, int targetContextGroupId)
bool m_taskWithScheduledBreakPauseRequested
void asyncTaskStarted(void *task)
v8::Local< v8::Array > queryObjects(v8::Local< v8::Context > context, v8::Local< v8::Object > prototype)
bool IsFunctionBlackboxed(v8::Local< v8::debug::Script > script, const v8::debug::Location &start, const v8::debug::Location &end) override
internal::V8DebuggerId debuggerIdFor(int contextGroupId)
std::unordered_map< V8DebuggerAgentImpl *, int > m_maxAsyncCallStackDepthMap
int m_ignoreScriptParsedEventsCounter
v8::debug::ExceptionBreakState m_pauseOnExceptionsState
std::unique_ptr< V8StackTraceImpl > captureStackTrace(bool fullStack)
v8::MaybeLocal< v8::Array > internalProperties(v8::Local< v8::Context >, v8::Local< v8::Value >)
void stepOutOfFunction(int targetContextGroupId)
int maxCallStackSizeToCapture() const
std::vector< std::unique_ptr< V8DebuggerScript > > getCompiledScripts(int contextGroupId, V8DebuggerAgentImpl *agent)
v8::MaybeLocal< v8::Value > getTargetScopes(v8::Local< v8::Context >, v8::Local< v8::Value >, ScopeTargetKind)
void AsyncEventOccurred(v8::debug::DebugAsyncActionType type, int id, bool isBlackboxed) override
int m_targetContextGroupId
void interruptAndBreak(int targetContextGroupId)
v8::MaybeLocal< v8::Array > privateMethods(v8::Local< v8::Context > context, v8::Local< v8::Value > value)
void installTerminateExecutionCallbacks(v8::Local< v8::Context > context)
void unmuteScriptParsedEvents()
void continueProgram(int targetContextGroupId, bool terminateOnResume=false)
void asyncTaskScheduledForStack(const StringView &taskName, void *task, bool recurring, bool skipTopFrame=false)
std::list< std::shared_ptr< AsyncStackTrace > > m_allAsyncStacks
V8StackTraceId storeCurrentStackTrace(const StringView &description)
std::unique_ptr< TerminateExecutionCallback > m_terminateExecutionCallback
void dumpAsyncTaskStacksStateForTest()
void setMaxCallStackSizeToCapture(V8RuntimeAgentImpl *, int)
V8Debugger(v8::Isolate *, V8InspectorImpl *)
void asyncTaskFinishedForStack(void *task)
void * m_taskWithScheduledBreak
void handleProgramBreak(v8::Local< v8::Context > pausedContext, v8::Local< v8::Value > exception, const std::vector< v8::debug::BreakpointId > &hitBreakpoints, v8::debug::BreakReasons break_reasons, v8::debug::ExceptionType exception_type=v8::debug::kException, bool isUncaught=false)
std::unordered_map< V8RuntimeAgentImpl *, int > m_maxCallStackSizeToCaptureMap
v8::Global< v8::Context > m_terminateExecutionCallbackContext
bool isInInstrumentationPause() const
void asyncTaskFinishedForStepping(void *task)
void allAsyncTasksCanceled()
StackTraceToExternalParent m_externalParents
void BreakpointConditionEvaluated(v8::Local< v8::Context > context, v8::debug::BreakpointId breakpoint_id, bool exception_thrown, v8::Local< v8::Value > exception) override
std::unordered_set< void * > m_recurringTasks
bool addInternalObject(v8::Local< v8::Context > context, v8::Local< v8::Object > object, V8InternalValueType type)
void externalAsyncTaskFinished(const V8StackTraceId &parent)
bool hasScheduledBreakOnNextFunctionCall() const
int currentContextGroupId()
V8InspectorImpl * m_inspector
uintptr_t storeStackTrace(std::shared_ptr< AsyncStackTrace > stack)
void ExceptionThrown(v8::Local< v8::Context > paused_context, v8::Local< v8::Value > exception, v8::Local< v8::Value > promise, bool is_uncaught, v8::debug::ExceptionType exception_type) override
StoredStackTraces m_storedStackTraces
void clearContinueToLocation()
bool m_instrumentationPause
void setBreakpointsActive(bool)
v8::MaybeLocal< v8::Array > collectionsEntries(v8::Local< v8::Context > context, v8::Local< v8::Value > value)
int m_continueToLocationBreakpointId
void requestPauseAfterInstrumentation()
StackTraceToAsyncParent m_asyncParents
int m_pausedContextGroupId
bool ShouldBeSkipped(v8::Local< v8::debug::Script > script, int line, int column) override
void ScriptCompiled(v8::Local< v8::debug::Script > script, bool is_live_edited, bool has_compile_error) override
std::shared_ptr< AsyncStackTrace > currentAsyncParent()
std::vector< V8StackTraceId > m_currentExternalParent
void asyncTaskCandidateForStepping(void *task)
void setAsyncCallStackDepth(V8DebuggerAgentImpl *, int)
String16 m_continueToLocationTargetCallFrames
int m_maxAsyncCallStackDepth
size_t m_originalHeapLimit
bool m_pauseOnNextCallRequested
void asyncTaskStartedForStepping(void *task)
void breakProgram(int targetContextGroupId)
int m_maxCallStackSizeToCapture
std::unique_ptr< V8StackTraceImpl > m_continueToLocationStack
uintptr_t m_lastStackTraceId
void asyncTaskCanceledForStepping(void *task)
AsyncTaskToStackTrace m_asyncTaskStacks
static size_t nearHeapLimitCallback(void *data, size_t current_heap_limit, size_t initial_heap_limit)
V8StackTraceId currentExternalParent()
v8::MaybeLocal< v8::Value > functionScopes(v8::Local< v8::Context >, v8::Local< v8::Function >)
V8InspectorImpl * inspector()
std::vector< void * > m_currentTasks
void stepIntoStatement(int targetContextGroupId, bool breakOnAsyncCall)
void asyncStackTraceCaptured(int id)
void asyncTaskScheduled(const StringView &taskName, void *task, bool recurring)
v8::Isolate * isolate() const
void BreakProgramRequested(v8::Local< v8::Context > paused_context, const std::vector< v8::debug::BreakpointId > &break_points_hit, v8::debug::BreakReasons break_reasons) override
void asyncTaskFinished(void *task)
void muteScriptParsedEvents()
void collectOldAsyncStacksIfNeeded()
std::unordered_map< int, internal::V8DebuggerId > m_contextGroupIdToDebuggerId
std::vector< std::shared_ptr< AsyncStackTrace > > m_currentAsyncParent
int m_breakpointsActiveCount
void stepOverStatement(int targetContextGroupId)
bool shouldContinueToCurrentLocation()
void setPauseOnExceptionsState(v8::debug::ExceptionBreakState)
void asyncParentFor(int stackTraceId, std::shared_ptr< AsyncStackTrace > *asyncParent, V8StackTraceId *externalParent) const
bool restartFrame(int targetContextGroupId, int callFrameOrdinal)
void breakProgramOnAssert(int targetContextGroupId)
void setMaxAsyncTaskStacksForTest(int limit)
Response continueToLocation(int targetContextGroupId, V8DebuggerScript *script, std::unique_ptr< protocol::Debugger::Location >, const String16 &targetCallFramess)
void asyncTaskStartedForStack(void *task)
static void terminateExecutionCompletedCallback(v8::Isolate *isolate)
void takePendingHeapSnapshots()
virtual bool isInspectableHeapObject(v8::Local< v8::Object >)
virtual v8::Local< v8::Context > ensureDefaultContextInGroup(int contextGroupId)
virtual void runMessageLoopOnPause(int contextGroupId)
virtual void runMessageLoopOnInstrumentationPause(int contextGroupId)
virtual void quitMessageLoopOnPause()
virtual void maxAsyncCallStackDepthChanged(int depth)
v8::Isolate * isolate() const
InspectedContext * getContext(int groupId, int contextId) const
V8InspectorClient * client()
void forEachSession(int contextGroupId, const std::function< void(V8InspectorSessionImpl *)> &callback)
int contextGroupId(v8::Local< v8::Context >) const
unsigned exceptionThrown(v8::Local< v8::Context >, StringView message, v8::Local< v8::Value > exception, StringView detailedMessage, StringView url, unsigned lineNumber, unsigned columnNumber, std::unique_ptr< V8StackTrace >, int scriptId) override
V8DebuggerAgentImpl * debuggerAgent()
V8HeapProfilerAgentImpl * heapProfilerAgent()
V8RuntimeAgentImpl * runtimeAgent()
static std::unique_ptr< V8StackTraceImpl > capture(V8Debugger *, int maxStackSize)
static std::unique_ptr< V8StackTraceImpl > create(V8Debugger *, v8::Local< v8::StackTrace >, int maxStackSize)
static constexpr int kDefaultMaxCallStackSizeToCapture
static V8DebuggerId generate(V8InspectorImpl *)
MicrotaskQueue * microtask_queue
refactor address components for immediate indexing make OptimizeMaglevOnNextCall optimize to turbofan instead of maglev filter for tracing turbofan compilation nullptr
ZoneVector< RpoNumber > & result
ZoneStack< RpoNumber > & stack
ZoneVector< Entry > entries
void SetBreakPointsActive(Isolate *v8_isolate, bool is_active)
bool PrepareRestartFrame(Isolate *v8_isolate, int callFrameOrdinal)
@ kDebugStackTraceCaptured
void BreakRightNow(Isolate *v8_isolate, base::EnumSet< debug::BreakReason > break_reasons)
void SetBreakOnNextFunctionCall(Isolate *isolate)
bool CanBreakProgram(Isolate *v8_isolate)
bool GetPrivateMembers(Local< Context > context, Local< Object > object, int filter, LocalVector< Value > *names_out, LocalVector< Value > *values_out)
void ChangeBreakOnException(Isolate *isolate, ExceptionBreakState type)
MaybeLocal< Array > GetInternalProperties(Isolate *v8_isolate, Local< Value > value)
void SetTerminateOnResume(Isolate *v8_isolate)
void PrepareStep(Isolate *v8_isolate, StepAction action)
void ClearStepping(Isolate *v8_isolate)
void RemoveBreakpoint(Isolate *v8_isolate, BreakpointId id)
void GetLoadedScripts(Isolate *v8_isolate, std::vector< v8::Global< Script > > &scripts)
void SetAsyncEventDelegate(Isolate *v8_isolate, AsyncEventDelegate *delegate)
void ClearBreakOnNextFunctionCall(Isolate *isolate)
v8_inspector::V8Inspector * GetInspector(Isolate *isolate)
v8::Local< v8::Message > CreateMessageFromException(Isolate *v8_isolate, v8::Local< v8::Value > v8_error)
void SetDebugDelegate(Isolate *v8_isolate, DebugDelegate *delegate)
MaybeLocal< Context > GetCreationContext(Local< Object > value)
V8_INLINE uint64_t TraceId()
String16 toProtocolString(v8::Isolate *isolate, v8::Local< v8::String > value)
StringView toStringView(const String16 &string)
v8::Local< v8::String > toV8String(v8::Isolate *isolate, const String16 &string)
v8::Maybe< bool > createDataProperty(v8::Local< v8::Context > context, v8::Local< v8::Object > object, v8::Local< v8::Name > key, v8::Local< v8::Value > value)
String16 toProtocolStringWithTypeCheck(v8::Isolate *isolate, v8::Local< v8::Value > value)
String16 toString16(const StringView &string)
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)
#define DCHECK_IMPLIES(v1, v2)
#define DCHECK_GE(v1, v2)
#define DCHECK(condition)
#define DCHECK_EQ(v1, v2)
#define TRACE_EVENT_END0(category_group, name)
#define TRACE_DISABLED_BY_DEFAULT(name)
#define TRACE_STR_COPY(str)
v8::Local< v8::Context > m_context
V8InspectorImpl * m_inspector
v8::Local< v8::Value > m_prototype
#define END_ALLOW_USE_DEPRECATED()
#define START_ALLOW_USE_DEPRECATED()
std::unique_ptr< ValueMirror > value
std::unique_ptr< ValueMirror > key