v8  9.0.257(node16.0.0)
V8 is Google's open source JavaScript engine
v8-inspector.h
Go to the documentation of this file.
1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef V8_V8_INSPECTOR_H_
6 #define V8_V8_INSPECTOR_H_
7 
8 #include <stdint.h>
9 #include <cctype>
10 
11 #include <memory>
12 #include <unordered_map>
13 
14 #include "v8.h" // NOLINT(build/include_directory)
15 
16 namespace v8_inspector {
17 
18 namespace protocol {
19 namespace Debugger {
20 namespace API {
21 class SearchMatch;
22 }
23 }
24 namespace Runtime {
25 namespace API {
26 class RemoteObject;
27 class StackTrace;
28 class StackTraceId;
29 }
30 }
31 namespace Schema {
32 namespace API {
33 class Domain;
34 }
35 }
36 } // namespace protocol
37 
39  public:
40  StringView() : m_is8Bit(true), m_length(0), m_characters8(nullptr) {}
41 
42  StringView(const uint8_t* characters, size_t length)
43  : m_is8Bit(true), m_length(length), m_characters8(characters) {}
44 
45  StringView(const uint16_t* characters, size_t length)
46  : m_is8Bit(false), m_length(length), m_characters16(characters) {}
47 
48  bool is8Bit() const { return m_is8Bit; }
49  size_t length() const { return m_length; }
50 
51  // TODO(dgozman): add DCHECK(m_is8Bit) to accessors once platform can be used
52  // here.
53  const uint8_t* characters8() const { return m_characters8; }
54  const uint16_t* characters16() const { return m_characters16; }
55 
56  private:
57  bool m_is8Bit;
58  size_t m_length;
59  union {
60  const uint8_t* m_characters8;
61  const uint16_t* m_characters16;
62  };
63 };
64 
66  public:
67  virtual ~StringBuffer() = default;
68  virtual StringView string() const = 0;
69  // This method copies contents.
70  static std::unique_ptr<StringBuffer> create(StringView);
71 };
72 
74  public:
75  V8ContextInfo(v8::Local<v8::Context> context, int contextGroupId,
76  StringView humanReadableName)
77  : context(context),
78  contextGroupId(contextGroupId),
79  humanReadableName(humanReadableName),
80  hasMemoryOnConsole(false) {}
81 
83  // Each v8::Context is a part of a group. The group id must be non-zero.
89 
90  static int executionContextId(v8::Local<v8::Context> context);
91 
92  // Disallow copying and allocating this one.
94  void* operator new(size_t) = delete;
95  void* operator new(size_t, NotNullTagEnum, void*) = delete;
96  void* operator new(size_t, void*) = delete;
97  V8ContextInfo(const V8ContextInfo&) = delete;
98  V8ContextInfo& operator=(const V8ContextInfo&) = delete;
99 };
100 
102  public:
103  virtual StringView firstNonEmptySourceURL() const = 0;
104  virtual bool isEmpty() const = 0;
105  virtual StringView topSourceURL() const = 0;
106  virtual int topLineNumber() const = 0;
107  virtual int topColumnNumber() const = 0;
108  virtual StringView topScriptId() const = 0;
109  virtual int topScriptIdAsInteger() const = 0;
110  virtual StringView topFunctionName() const = 0;
111 
112  virtual ~V8StackTrace() = default;
113  virtual std::unique_ptr<protocol::Runtime::API::StackTrace>
114  buildInspectorObject() const = 0;
115  virtual std::unique_ptr<protocol::Runtime::API::StackTrace>
116  buildInspectorObject(int maxAsyncDepth) const = 0;
117  virtual std::unique_ptr<StringBuffer> toString() const = 0;
118 
119  // Safe to pass between threads, drops async chain.
120  virtual std::unique_ptr<V8StackTrace> clone() = 0;
121 };
122 
124  public:
125  virtual ~V8InspectorSession() = default;
126 
127  // Cross-context inspectable values (DOM nodes in different worlds, etc.).
129  public:
130  virtual v8::Local<v8::Value> get(v8::Local<v8::Context>) = 0;
131  virtual ~Inspectable() = default;
132  };
133  virtual void addInspectedObject(std::unique_ptr<Inspectable>) = 0;
134 
135  // Dispatching protocol messages.
136  static bool canDispatchMethod(StringView method);
137  virtual void dispatchProtocolMessage(StringView message) = 0;
138  virtual std::vector<uint8_t> state() = 0;
139  virtual std::vector<std::unique_ptr<protocol::Schema::API::Domain>>
140  supportedDomains() = 0;
141 
142  // Debugger actions.
143  virtual void schedulePauseOnNextStatement(StringView breakReason,
144  StringView breakDetails) = 0;
145  virtual void cancelPauseOnNextStatement() = 0;
146  virtual void breakProgram(StringView breakReason,
147  StringView breakDetails) = 0;
148  virtual void setSkipAllPauses(bool) = 0;
149  virtual void resume(bool setTerminateOnResume = false) = 0;
150  virtual void stepOver() = 0;
151  virtual std::vector<std::unique_ptr<protocol::Debugger::API::SearchMatch>>
152  searchInTextByLines(StringView text, StringView query, bool caseSensitive,
153  bool isRegex) = 0;
154 
155  // Remote objects.
156  virtual std::unique_ptr<protocol::Runtime::API::RemoteObject> wrapObject(
157  v8::Local<v8::Context>, v8::Local<v8::Value>, StringView groupName,
158  bool generatePreview) = 0;
159 
160  virtual bool unwrapObject(std::unique_ptr<StringBuffer>* error,
161  StringView objectId, v8::Local<v8::Value>*,
162  v8::Local<v8::Context>*,
163  std::unique_ptr<StringBuffer>* objectGroup) = 0;
164  virtual void releaseObjectGroup(StringView) = 0;
165  virtual void triggerPreciseCoverageDeltaUpdate(StringView occassion) = 0;
166 };
167 
169  public:
170  virtual ~V8InspectorClient() = default;
171 
172  virtual void runMessageLoopOnPause(int contextGroupId) {}
173  virtual void quitMessageLoopOnPause() {}
174  virtual void runIfWaitingForDebugger(int contextGroupId) {}
175 
176  virtual void muteMetrics(int contextGroupId) {}
177  virtual void unmuteMetrics(int contextGroupId) {}
178 
179  virtual void beginUserGesture() {}
180  virtual void endUserGesture() {}
181 
182  virtual std::unique_ptr<StringBuffer> valueSubtype(v8::Local<v8::Value>) {
183  return nullptr;
184  }
185  virtual std::unique_ptr<StringBuffer> descriptionForValueSubtype(
186  v8::Local<v8::Context>, v8::Local<v8::Value>) {
187  return nullptr;
188  }
190  return false;
191  }
192  virtual bool isInspectableHeapObject(v8::Local<v8::Object>) { return true; }
193 
195  int contextGroupId) {
197  }
198  virtual void beginEnsureAllContextsInGroup(int contextGroupId) {}
199  virtual void endEnsureAllContextsInGroup(int contextGroupId) {}
200 
202  v8::Local<v8::Object>) {}
203  virtual void consoleAPIMessage(int contextGroupId,
204  v8::Isolate::MessageErrorLevel level,
205  const StringView& message,
206  const StringView& url, unsigned lineNumber,
207  unsigned columnNumber, V8StackTrace*) {}
209  v8::Local<v8::Context>) {
211  }
212 
213  virtual void consoleTime(const StringView& title) {}
214  virtual void consoleTimeEnd(const StringView& title) {}
215  virtual void consoleTimeStamp(const StringView& title) {}
216  virtual void consoleClear(int contextGroupId) {}
217  virtual double currentTimeMS() { return 0; }
218  typedef void (*TimerCallback)(void*);
219  virtual void startRepeatingTimer(double, TimerCallback, void* data) {}
220  virtual void cancelTimer(void* data) {}
221 
222  // TODO(dgozman): this was added to support service worker shadow page. We
223  // should not connect at all.
224  virtual bool canExecuteScripts(int contextGroupId) { return true; }
225 
226  virtual void maxAsyncCallStackDepthChanged(int depth) {}
227 
228  virtual std::unique_ptr<StringBuffer> resourceNameToUrl(
229  const StringView& resourceName) {
230  return nullptr;
231  }
232 
233  // The caller would defer to generating a random 64 bit integer if
234  // this method returns 0.
235  virtual int64_t generateUniqueId() { return 0; }
236 };
237 
238 // These stack trace ids are intended to be passed between debuggers and be
239 // resolved later. This allows to track cross-debugger calls and step between
240 // them if a single client connects to multiple debuggers.
242  uintptr_t id;
243  std::pair<int64_t, int64_t> debugger_id;
244  bool should_pause = false;
245 
246  V8StackTraceId();
247  V8StackTraceId(const V8StackTraceId&) = default;
248  V8StackTraceId(uintptr_t id, const std::pair<int64_t, int64_t> debugger_id);
249  V8StackTraceId(uintptr_t id, const std::pair<int64_t, int64_t> debugger_id,
250  bool should_pause);
251  explicit V8StackTraceId(StringView);
252  V8StackTraceId& operator=(const V8StackTraceId&) = default;
253  V8StackTraceId& operator=(V8StackTraceId&&) noexcept = default;
254  ~V8StackTraceId() = default;
255 
256  bool IsInvalid() const;
257  std::unique_ptr<StringBuffer> ToString();
258 };
259 
261  public:
262  static std::unique_ptr<V8Inspector> create(v8::Isolate*, V8InspectorClient*);
263  virtual ~V8Inspector() = default;
264 
265  // Contexts instrumentation.
266  virtual void contextCreated(const V8ContextInfo&) = 0;
267  virtual void contextDestroyed(v8::Local<v8::Context>) = 0;
268  virtual void resetContextGroup(int contextGroupId) = 0;
269  virtual v8::MaybeLocal<v8::Context> contextById(int contextId) = 0;
270 
271  // Various instrumentation.
272  virtual void idleStarted() = 0;
273  virtual void idleFinished() = 0;
274 
275  // Async stack traces instrumentation.
276  virtual void asyncTaskScheduled(StringView taskName, void* task,
277  bool recurring) = 0;
278  virtual void asyncTaskCanceled(void* task) = 0;
279  virtual void asyncTaskStarted(void* task) = 0;
280  virtual void asyncTaskFinished(void* task) = 0;
281  virtual void allAsyncTasksCanceled() = 0;
282 
283  virtual V8StackTraceId storeCurrentStackTrace(StringView description) = 0;
284  virtual void externalAsyncTaskStarted(const V8StackTraceId& parent) = 0;
285  virtual void externalAsyncTaskFinished(const V8StackTraceId& parent) = 0;
286 
287  // Exceptions instrumentation.
288  virtual unsigned exceptionThrown(v8::Local<v8::Context>, StringView message,
289  v8::Local<v8::Value> exception,
290  StringView detailedMessage, StringView url,
291  unsigned lineNumber, unsigned columnNumber,
292  std::unique_ptr<V8StackTrace>,
293  int scriptId) = 0;
294  virtual void exceptionRevoked(v8::Local<v8::Context>, unsigned exceptionId,
295  StringView message) = 0;
296 
297  // Connection.
299  public:
300  virtual ~Channel() = default;
301  virtual void sendResponse(int callId,
302  std::unique_ptr<StringBuffer> message) = 0;
303  virtual void sendNotification(std::unique_ptr<StringBuffer> message) = 0;
304  virtual void flushProtocolNotifications() = 0;
305  };
306  virtual std::unique_ptr<V8InspectorSession> connect(int contextGroupId,
307  Channel*,
308  StringView state) = 0;
309 
310  // API methods.
311  virtual std::unique_ptr<V8StackTrace> createStackTrace(
312  v8::Local<v8::StackTrace>) = 0;
313  virtual std::unique_ptr<V8StackTrace> captureStackTrace(bool fullStack) = 0;
314 
315  // Performance counters.
316  class V8_EXPORT Counters : public std::enable_shared_from_this<Counters> {
317  public:
318  explicit Counters(v8::Isolate* isolate);
319  ~Counters();
320  const std::unordered_map<std::string, int>& getCountersMap() const {
321  return m_countersMap;
322  }
323 
324  private:
325  static int* getCounterPtr(const char* name);
326 
327  v8::Isolate* m_isolate;
328  std::unordered_map<std::string, int> m_countersMap;
329  };
330 
331  virtual std::shared_ptr<Counters> enableCounters() = 0;
332 };
333 
334 } // namespace v8_inspector
335 
336 #endif // V8_V8_INSPECTOR_H_
v8_inspector::V8StackTraceId::V8StackTraceId
V8StackTraceId(uintptr_t id, const std::pair< int64_t, int64_t > debugger_id)
v8_inspector::V8StackTrace::topFunctionName
virtual StringView topFunctionName() const =0
v8_inspector::V8InspectorSession::triggerPreciseCoverageDeltaUpdate
virtual void triggerPreciseCoverageDeltaUpdate(StringView occassion)=0
v8_inspector::V8Inspector::connect
virtual std::unique_ptr< V8InspectorSession > connect(int contextGroupId, Channel *, StringView state)=0
v8_inspector::V8StackTraceId::V8StackTraceId
V8StackTraceId(uintptr_t id, const std::pair< int64_t, int64_t > debugger_id, bool should_pause)
v8_inspector::V8StackTraceId::id
uintptr_t id
Definition: v8-inspector.h:242
v8_inspector::V8InspectorClient::isInspectableHeapObject
virtual bool isInspectableHeapObject(v8::Local< v8::Object >)
Definition: v8-inspector.h:192
v8_inspector::V8Inspector::~V8Inspector
virtual ~V8Inspector()=default
v8_inspector::V8Inspector::captureStackTrace
virtual std::unique_ptr< V8StackTrace > captureStackTrace(bool fullStack)=0
v8_inspector::V8InspectorClient::unmuteMetrics
virtual void unmuteMetrics(int contextGroupId)
Definition: v8-inspector.h:177
v8_inspector::V8StackTraceId::~V8StackTraceId
~V8StackTraceId()=default
v8_inspector::V8StackTrace::~V8StackTrace
virtual ~V8StackTrace()=default
v8_inspector::V8InspectorClient::endEnsureAllContextsInGroup
virtual void endEnsureAllContextsInGroup(int contextGroupId)
Definition: v8-inspector.h:199
v8_inspector::V8ContextInfo::humanReadableName
StringView humanReadableName
Definition: v8-inspector.h:85
v8_inspector::V8Inspector::asyncTaskFinished
virtual void asyncTaskFinished(void *task)=0
v8_inspector::V8InspectorSession::wrapObject
virtual std::unique_ptr< protocol::Runtime::API::RemoteObject > wrapObject(v8::Local< v8::Context >, v8::Local< v8::Value >, StringView groupName, bool generatePreview)=0
v8_inspector::V8InspectorSession::addInspectedObject
virtual void addInspectedObject(std::unique_ptr< Inspectable >)=0
v8_inspector::V8ContextInfo::contextGroupId
int contextGroupId
Definition: v8-inspector.h:84
v8_inspector::V8InspectorSession::cancelPauseOnNextStatement
virtual void cancelPauseOnNextStatement()=0
v8_inspector::V8Inspector::Counters
Definition: v8-inspector.h:316
v8_inspector::V8StackTraceId::debugger_id
std::pair< int64_t, int64_t > debugger_id
Definition: v8-inspector.h:243
v8_inspector::V8StackTrace::topScriptIdAsInteger
virtual int topScriptIdAsInteger() const =0
v8_inspector::V8InspectorSession::canDispatchMethod
static bool canDispatchMethod(StringView method)
v8_inspector::protocol::Debugger
Definition: v8-inspector.h:19
v8_inspector::V8InspectorClient::endUserGesture
virtual void endUserGesture()
Definition: v8-inspector.h:180
v8_inspector::V8InspectorClient::consoleClear
virtual void consoleClear(int contextGroupId)
Definition: v8-inspector.h:216
v8_inspector::StringView::StringView
StringView(const uint16_t *characters, size_t length)
Definition: v8-inspector.h:45
v8::Local::Local
V8_INLINE Local()
Definition: v8.h:201
v8_inspector::V8StackTrace::topSourceURL
virtual StringView topSourceURL() const =0
v8_inspector::V8StackTrace::buildInspectorObject
virtual std::unique_ptr< protocol::Runtime::API::StackTrace > buildInspectorObject() const =0
v8_inspector::V8InspectorClient::TimerCallback
void(* TimerCallback)(void *)
Definition: v8-inspector.h:218
v8_inspector::V8StackTrace::topScriptId
virtual StringView topScriptId() const =0
v8_inspector::V8InspectorSession::breakProgram
virtual void breakProgram(StringView breakReason, StringView breakDetails)=0
v8_inspector::V8Inspector::Counters::getCountersMap
const std::unordered_map< std::string, int > & getCountersMap() const
Definition: v8-inspector.h:320
v8_inspector::V8ContextInfo::context
v8::Local< v8::Context > context
Definition: v8-inspector.h:82
v8_inspector::V8InspectorClient::consoleAPIMessage
virtual void consoleAPIMessage(int contextGroupId, v8::Isolate::MessageErrorLevel level, const StringView &message, const StringView &url, unsigned lineNumber, unsigned columnNumber, V8StackTrace *)
Definition: v8-inspector.h:203
v8_inspector::V8StackTrace::topColumnNumber
virtual int topColumnNumber() const =0
v8::Object
Definition: v8.h:3914
v8_inspector::V8InspectorClient::consoleTimeEnd
virtual void consoleTimeEnd(const StringView &title)
Definition: v8-inspector.h:214
v8::StackTrace
Definition: v8.h:2256
v8_inspector::V8InspectorSession::Inspectable::~Inspectable
virtual ~Inspectable()=default
v8_inspector::V8ContextInfo::executionContextId
static int executionContextId(v8::Local< v8::Context > context)
v8_inspector::V8StackTrace::buildInspectorObject
virtual std::unique_ptr< protocol::Runtime::API::StackTrace > buildInspectorObject(int maxAsyncDepth) const =0
v8_inspector::V8StackTraceId::ToString
std::unique_ptr< StringBuffer > ToString()
v8_inspector::V8InspectorSession::resume
virtual void resume(bool setTerminateOnResume=false)=0
v8_inspector::V8StackTrace::topLineNumber
virtual int topLineNumber() const =0
v8_inspector::V8InspectorSession::supportedDomains
virtual std::vector< std::unique_ptr< protocol::Schema::API::Domain > > supportedDomains()=0
v8_inspector::V8Inspector::asyncTaskCanceled
virtual void asyncTaskCanceled(void *task)=0
v8_inspector::V8InspectorClient::beginEnsureAllContextsInGroup
virtual void beginEnsureAllContextsInGroup(int contextGroupId)
Definition: v8-inspector.h:198
v8_inspector::V8StackTraceId::IsInvalid
bool IsInvalid() const
v8_inspector::protocol::Runtime::API
Definition: v8-inspector.h:25
v8_inspector::V8InspectorClient::runMessageLoopOnPause
virtual void runMessageLoopOnPause(int contextGroupId)
Definition: v8-inspector.h:172
v8::MaybeLocal::MaybeLocal
V8_INLINE MaybeLocal()
Definition: v8.h:373
v8_inspector::V8Inspector::Channel::~Channel
virtual ~Channel()=default
v8_inspector::V8ContextInfo::V8ContextInfo
V8ContextInfo(const V8ContextInfo &)=delete
v8_inspector::V8InspectorSession::searchInTextByLines
virtual std::vector< std::unique_ptr< protocol::Debugger::API::SearchMatch > > searchInTextByLines(StringView text, StringView query, bool caseSensitive, bool isRegex)=0
v8_inspector::StringView
Definition: v8-inspector.h:38
v8_inspector::V8InspectorSession::schedulePauseOnNextStatement
virtual void schedulePauseOnNextStatement(StringView breakReason, StringView breakDetails)=0
v8_inspector::V8InspectorClient::startRepeatingTimer
virtual void startRepeatingTimer(double, TimerCallback, void *data)
Definition: v8-inspector.h:219
v8_inspector::V8StackTraceId::V8StackTraceId
V8StackTraceId()
v8_inspector::V8InspectorClient
Definition: v8-inspector.h:168
v8_inspector::V8InspectorClient::~V8InspectorClient
virtual ~V8InspectorClient()=default
v8_inspector::V8InspectorClient::muteMetrics
virtual void muteMetrics(int contextGroupId)
Definition: v8-inspector.h:176
v8_inspector::V8Inspector::exceptionRevoked
virtual void exceptionRevoked(v8::Local< v8::Context >, unsigned exceptionId, StringView message)=0
v8_inspector::V8InspectorClient::runIfWaitingForDebugger
virtual void runIfWaitingForDebugger(int contextGroupId)
Definition: v8-inspector.h:174
v8_inspector::V8Inspector::storeCurrentStackTrace
virtual V8StackTraceId storeCurrentStackTrace(StringView description)=0
v8_inspector::V8StackTrace::firstNonEmptySourceURL
virtual StringView firstNonEmptySourceURL() const =0
v8::V8::MaybeLocal
friend class MaybeLocal
Definition: v8.h:10136
v8_inspector::V8ContextInfo::origin
StringView origin
Definition: v8-inspector.h:86
v8_inspector::V8InspectorSession
Definition: v8-inspector.h:123
v8_inspector::V8Inspector::idleFinished
virtual void idleFinished()=0
v8_inspector::V8StackTrace::clone
virtual std::unique_ptr< V8StackTrace > clone()=0
v8_inspector::V8InspectorClient::generateUniqueId
virtual int64_t generateUniqueId()
Definition: v8-inspector.h:235
V8_EXPORT
#define V8_EXPORT
Definition: v8config.h:512
v8_inspector::protocol::Debugger::API
Definition: v8-inspector.h:20
v8_inspector::protocol::Runtime
Definition: v8-inspector.h:24
v8_inspector::V8ContextInfo::operator new
void * operator new(size_t)=delete
v8_inspector::V8Inspector::createStackTrace
virtual std::unique_ptr< V8StackTrace > createStackTrace(v8::Local< v8::StackTrace >)=0
v8_inspector
Definition: v8-inspector.h:16
v8_inspector::V8StackTraceId::operator=
V8StackTraceId & operator=(V8StackTraceId &&) noexcept=default
v8_inspector::protocol::Schema
Definition: v8-inspector.h:31
v8_inspector::V8Inspector::idleStarted
virtual void idleStarted()=0
v8_inspector::V8StackTraceId::V8StackTraceId
V8StackTraceId(const V8StackTraceId &)=default
v8_inspector::V8ContextInfo::operator=
V8ContextInfo & operator=(const V8ContextInfo &)=delete
v8_inspector::V8InspectorClient::beginUserGesture
virtual void beginUserGesture()
Definition: v8-inspector.h:179
v8::Context
Definition: v8.h:10561
v8_inspector::V8StackTraceId::should_pause
bool should_pause
Definition: v8-inspector.h:244
v8::Isolate
Definition: v8.h:8450
v8_inspector::StringView::is8Bit
bool is8Bit() const
Definition: v8-inspector.h:48
v8_inspector::V8InspectorClient::ensureDefaultContextInGroup
virtual v8::Local< v8::Context > ensureDefaultContextInGroup(int contextGroupId)
Definition: v8-inspector.h:194
v8_inspector::V8Inspector::asyncTaskScheduled
virtual void asyncTaskScheduled(StringView taskName, void *task, bool recurring)=0
v8_inspector::V8InspectorSession::releaseObjectGroup
virtual void releaseObjectGroup(StringView)=0
v8_inspector::V8ContextInfo::operator new
void * operator new(size_t, NotNullTagEnum, void *)=delete
v8_inspector::V8InspectorClient::installAdditionalCommandLineAPI
virtual void installAdditionalCommandLineAPI(v8::Local< v8::Context >, v8::Local< v8::Object >)
Definition: v8-inspector.h:201
v8_inspector::protocol
Definition: v8-inspector.h:18
v8_inspector::V8Inspector::Channel::sendNotification
virtual void sendNotification(std::unique_ptr< StringBuffer > message)=0
v8
Definition: libplatform.h:15
v8_inspector::protocol::Schema::API
Definition: v8-inspector.h:32
v8_inspector::StringView::StringView
StringView(const uint8_t *characters, size_t length)
Definition: v8-inspector.h:42
v8_inspector::V8InspectorSession::~V8InspectorSession
virtual ~V8InspectorSession()=default
v8_inspector::V8InspectorClient::memoryInfo
virtual v8::MaybeLocal< v8::Value > memoryInfo(v8::Isolate *, v8::Local< v8::Context >)
Definition: v8-inspector.h:208
v8_inspector::V8Inspector::externalAsyncTaskStarted
virtual void externalAsyncTaskStarted(const V8StackTraceId &parent)=0
v8_inspector::V8Inspector::asyncTaskStarted
virtual void asyncTaskStarted(void *task)=0
v8_inspector::V8Inspector
Definition: v8-inspector.h:260
v8_inspector::V8InspectorClient::valueSubtype
virtual std::unique_ptr< StringBuffer > valueSubtype(v8::Local< v8::Value >)
Definition: v8-inspector.h:182
v8_inspector::V8Inspector::contextDestroyed
virtual void contextDestroyed(v8::Local< v8::Context >)=0
v8_inspector::V8Inspector::Counters::~Counters
~Counters()
v8_inspector::V8InspectorClient::quitMessageLoopOnPause
virtual void quitMessageLoopOnPause()
Definition: v8-inspector.h:173
v8_inspector::V8Inspector::contextCreated
virtual void contextCreated(const V8ContextInfo &)=0
v8_inspector::V8ContextInfo
Definition: v8-inspector.h:73
v8_inspector::V8Inspector::Counters::Counters
Counters(v8::Isolate *isolate)
v8_inspector::V8Inspector::contextById
virtual v8::MaybeLocal< v8::Context > contextById(int contextId)=0
v8::Isolate::MessageErrorLevel
MessageErrorLevel
Definition: v8.h:8777
v8_inspector::V8Inspector::Channel
Definition: v8-inspector.h:298
v8_inspector::V8StackTrace
Definition: v8-inspector.h:101
v8_inspector::V8InspectorSession::setSkipAllPauses
virtual void setSkipAllPauses(bool)=0
v8::V8::Local
friend class Local
Definition: v8.h:10134
v8_inspector::V8Inspector::externalAsyncTaskFinished
virtual void externalAsyncTaskFinished(const V8StackTraceId &parent)=0
v8_inspector::V8StackTrace::toString
virtual std::unique_ptr< StringBuffer > toString() const =0
v8_inspector::StringView::characters8
const uint8_t * characters8() const
Definition: v8-inspector.h:53
v8_inspector::V8InspectorSession::stepOver
virtual void stepOver()=0
v8_inspector::V8InspectorSession::Inspectable::get
virtual v8::Local< v8::Value > get(v8::Local< v8::Context >)=0
v8_inspector::V8InspectorClient::cancelTimer
virtual void cancelTimer(void *data)
Definition: v8-inspector.h:220
v8_inspector::V8Inspector::Channel::flushProtocolNotifications
virtual void flushProtocolNotifications()=0
v8_inspector::V8Inspector::allAsyncTasksCanceled
virtual void allAsyncTasksCanceled()=0
v8_inspector::V8InspectorClient::consoleTime
virtual void consoleTime(const StringView &title)
Definition: v8-inspector.h:213
v8_inspector::V8ContextInfo::V8ContextInfo
V8ContextInfo(v8::Local< v8::Context > context, int contextGroupId, StringView humanReadableName)
Definition: v8-inspector.h:75
v8_inspector::V8StackTraceId::operator=
V8StackTraceId & operator=(const V8StackTraceId &)=default
v8_inspector::V8ContextInfo::operator new
void * operator new(size_t, void *)=delete
v8_inspector::V8ContextInfo::NotNullTagEnum
NotNullTagEnum
Definition: v8-inspector.h:93
v8_inspector::V8Inspector::exceptionThrown
virtual 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)=0
v8_inspector::V8Inspector::create
static std::unique_ptr< V8Inspector > create(v8::Isolate *, V8InspectorClient *)
v8_inspector::V8StackTraceId
Definition: v8-inspector.h:241
v8_inspector::V8InspectorSession::dispatchProtocolMessage
virtual void dispatchProtocolMessage(StringView message)=0
v8_inspector::V8Inspector::Channel::sendResponse
virtual void sendResponse(int callId, std::unique_ptr< StringBuffer > message)=0
v8_inspector::V8InspectorSession::state
virtual std::vector< uint8_t > state()=0
v8_inspector::V8Inspector::resetContextGroup
virtual void resetContextGroup(int contextGroupId)=0
v8_inspector::StringBuffer::~StringBuffer
virtual ~StringBuffer()=default
v8_inspector::V8ContextInfo::NotNullLiteral
@ NotNullLiteral
Definition: v8-inspector.h:93
v8_inspector::V8ContextInfo::auxData
StringView auxData
Definition: v8-inspector.h:87
v8_inspector::StringBuffer::string
virtual StringView string() const =0
v8_inspector::V8Inspector::enableCounters
virtual std::shared_ptr< Counters > enableCounters()=0
v8_inspector::StringView::characters16
const uint16_t * characters16() const
Definition: v8-inspector.h:54
v8_inspector::V8InspectorSession::unwrapObject
virtual bool unwrapObject(std::unique_ptr< StringBuffer > *error, StringView objectId, v8::Local< v8::Value > *, v8::Local< v8::Context > *, std::unique_ptr< StringBuffer > *objectGroup)=0
v8_inspector::V8StackTraceId::V8StackTraceId
V8StackTraceId(StringView)
v8_inspector::V8StackTrace::isEmpty
virtual bool isEmpty() const =0
v8_inspector::V8InspectorClient::canExecuteScripts
virtual bool canExecuteScripts(int contextGroupId)
Definition: v8-inspector.h:224
v8_inspector::StringView::length
size_t length() const
Definition: v8-inspector.h:49
v8_inspector::V8InspectorClient::descriptionForValueSubtype
virtual std::unique_ptr< StringBuffer > descriptionForValueSubtype(v8::Local< v8::Context >, v8::Local< v8::Value >)
Definition: v8-inspector.h:185
v8_inspector::StringBuffer
Definition: v8-inspector.h:65
v8_inspector::StringView::StringView
StringView()
Definition: v8-inspector.h:40
v8::Value
Definition: v8.h:2683
v8_inspector::V8InspectorClient::resourceNameToUrl
virtual std::unique_ptr< StringBuffer > resourceNameToUrl(const StringView &resourceName)
Definition: v8-inspector.h:228
v8_inspector::V8ContextInfo::hasMemoryOnConsole
bool hasMemoryOnConsole
Definition: v8-inspector.h:88
v8_inspector::StringBuffer::create
static std::unique_ptr< StringBuffer > create(StringView)
v8_inspector::V8InspectorClient::formatAccessorsAsProperties
virtual bool formatAccessorsAsProperties(v8::Local< v8::Value >)
Definition: v8-inspector.h:189
v8_inspector::V8InspectorSession::Inspectable
Definition: v8-inspector.h:128
v8_inspector::V8InspectorClient::consoleTimeStamp
virtual void consoleTimeStamp(const StringView &title)
Definition: v8-inspector.h:215
v8_inspector::V8InspectorClient::currentTimeMS
virtual double currentTimeMS()
Definition: v8-inspector.h:217
v8_inspector::V8InspectorClient::maxAsyncCallStackDepthChanged
virtual void maxAsyncCallStackDepthChanged(int depth)
Definition: v8-inspector.h:226