|
v8
9.0.257(node16.0.0)
V8 is Google's open source JavaScript engine
|
Go to the documentation of this file.
5 #ifndef V8_V8_INSPECTOR_H_
6 #define V8_V8_INSPECTOR_H_
12 #include <unordered_map>
40 StringView() : m_is8Bit(
true), m_length(0), m_characters8(
nullptr) {}
43 : m_is8Bit(
true), m_length(length), m_characters8(characters) {}
46 : m_is8Bit(
false), m_length(length), m_characters16(characters) {}
48 bool is8Bit()
const {
return m_is8Bit; }
49 size_t
length()
const {
return m_length; }
60 const uint8_t* m_characters8;
61 const uint16_t* m_characters16;
96 void*
operator new(size_t,
void*) =
delete;
104 virtual bool isEmpty()
const = 0;
138 virtual std::vector<uint8_t>
state() = 0;
149 virtual void resume(
bool setTerminateOnResume =
false) = 0;
158 bool generatePreview) = 0;
195 int contextGroupId) {
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,
291 unsigned lineNumber,
unsigned columnNumber,
321 return m_countersMap;
325 static int* getCounterPtr(
const char* name);
328 std::unordered_map<std::string,
int> m_countersMap;
V8StackTraceId(uintptr_t id, const std::pair< int64_t, int64_t > debugger_id)
virtual StringView topFunctionName() const =0
virtual void triggerPreciseCoverageDeltaUpdate(StringView occassion)=0
virtual std::unique_ptr< V8InspectorSession > connect(int contextGroupId, Channel *, StringView state)=0
V8StackTraceId(uintptr_t id, const std::pair< int64_t, int64_t > debugger_id, bool should_pause)
virtual bool isInspectableHeapObject(v8::Local< v8::Object >)
virtual ~V8Inspector()=default
virtual std::unique_ptr< V8StackTrace > captureStackTrace(bool fullStack)=0
virtual void unmuteMetrics(int contextGroupId)
~V8StackTraceId()=default
virtual ~V8StackTrace()=default
virtual void endEnsureAllContextsInGroup(int contextGroupId)
StringView humanReadableName
virtual void asyncTaskFinished(void *task)=0
virtual std::unique_ptr< protocol::Runtime::API::RemoteObject > wrapObject(v8::Local< v8::Context >, v8::Local< v8::Value >, StringView groupName, bool generatePreview)=0
virtual void addInspectedObject(std::unique_ptr< Inspectable >)=0
virtual void cancelPauseOnNextStatement()=0
std::pair< int64_t, int64_t > debugger_id
virtual int topScriptIdAsInteger() const =0
static bool canDispatchMethod(StringView method)
virtual void endUserGesture()
virtual void consoleClear(int contextGroupId)
StringView(const uint16_t *characters, size_t length)
virtual StringView topSourceURL() const =0
virtual std::unique_ptr< protocol::Runtime::API::StackTrace > buildInspectorObject() const =0
void(* TimerCallback)(void *)
virtual StringView topScriptId() const =0
virtual void breakProgram(StringView breakReason, StringView breakDetails)=0
const std::unordered_map< std::string, int > & getCountersMap() const
v8::Local< v8::Context > context
virtual void consoleAPIMessage(int contextGroupId, v8::Isolate::MessageErrorLevel level, const StringView &message, const StringView &url, unsigned lineNumber, unsigned columnNumber, V8StackTrace *)
virtual int topColumnNumber() const =0
virtual void consoleTimeEnd(const StringView &title)
virtual ~Inspectable()=default
static int executionContextId(v8::Local< v8::Context > context)
virtual std::unique_ptr< protocol::Runtime::API::StackTrace > buildInspectorObject(int maxAsyncDepth) const =0
std::unique_ptr< StringBuffer > ToString()
virtual void resume(bool setTerminateOnResume=false)=0
virtual int topLineNumber() const =0
virtual std::vector< std::unique_ptr< protocol::Schema::API::Domain > > supportedDomains()=0
virtual void asyncTaskCanceled(void *task)=0
virtual void beginEnsureAllContextsInGroup(int contextGroupId)
virtual void runMessageLoopOnPause(int contextGroupId)
virtual ~Channel()=default
V8ContextInfo(const V8ContextInfo &)=delete
virtual std::vector< std::unique_ptr< protocol::Debugger::API::SearchMatch > > searchInTextByLines(StringView text, StringView query, bool caseSensitive, bool isRegex)=0
virtual void schedulePauseOnNextStatement(StringView breakReason, StringView breakDetails)=0
virtual void startRepeatingTimer(double, TimerCallback, void *data)
virtual ~V8InspectorClient()=default
virtual void muteMetrics(int contextGroupId)
virtual void exceptionRevoked(v8::Local< v8::Context >, unsigned exceptionId, StringView message)=0
virtual void runIfWaitingForDebugger(int contextGroupId)
virtual V8StackTraceId storeCurrentStackTrace(StringView description)=0
virtual StringView firstNonEmptySourceURL() const =0
virtual void idleFinished()=0
virtual std::unique_ptr< V8StackTrace > clone()=0
virtual int64_t generateUniqueId()
void * operator new(size_t)=delete
virtual std::unique_ptr< V8StackTrace > createStackTrace(v8::Local< v8::StackTrace >)=0
V8StackTraceId & operator=(V8StackTraceId &&) noexcept=default
virtual void idleStarted()=0
V8StackTraceId(const V8StackTraceId &)=default
V8ContextInfo & operator=(const V8ContextInfo &)=delete
virtual void beginUserGesture()
virtual v8::Local< v8::Context > ensureDefaultContextInGroup(int contextGroupId)
virtual void asyncTaskScheduled(StringView taskName, void *task, bool recurring)=0
virtual void releaseObjectGroup(StringView)=0
void * operator new(size_t, NotNullTagEnum, void *)=delete
virtual void installAdditionalCommandLineAPI(v8::Local< v8::Context >, v8::Local< v8::Object >)
virtual void sendNotification(std::unique_ptr< StringBuffer > message)=0
StringView(const uint8_t *characters, size_t length)
virtual ~V8InspectorSession()=default
virtual v8::MaybeLocal< v8::Value > memoryInfo(v8::Isolate *, v8::Local< v8::Context >)
virtual void externalAsyncTaskStarted(const V8StackTraceId &parent)=0
virtual void asyncTaskStarted(void *task)=0
virtual std::unique_ptr< StringBuffer > valueSubtype(v8::Local< v8::Value >)
virtual void contextDestroyed(v8::Local< v8::Context >)=0
virtual void quitMessageLoopOnPause()
virtual void contextCreated(const V8ContextInfo &)=0
Counters(v8::Isolate *isolate)
virtual v8::MaybeLocal< v8::Context > contextById(int contextId)=0
virtual void setSkipAllPauses(bool)=0
virtual void externalAsyncTaskFinished(const V8StackTraceId &parent)=0
virtual std::unique_ptr< StringBuffer > toString() const =0
const uint8_t * characters8() const
virtual void stepOver()=0
virtual v8::Local< v8::Value > get(v8::Local< v8::Context >)=0
virtual void cancelTimer(void *data)
virtual void flushProtocolNotifications()=0
virtual void allAsyncTasksCanceled()=0
virtual void consoleTime(const StringView &title)
V8ContextInfo(v8::Local< v8::Context > context, int contextGroupId, StringView humanReadableName)
V8StackTraceId & operator=(const V8StackTraceId &)=default
void * operator new(size_t, void *)=delete
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
static std::unique_ptr< V8Inspector > create(v8::Isolate *, V8InspectorClient *)
virtual void dispatchProtocolMessage(StringView message)=0
virtual void sendResponse(int callId, std::unique_ptr< StringBuffer > message)=0
virtual std::vector< uint8_t > state()=0
virtual void resetContextGroup(int contextGroupId)=0
virtual ~StringBuffer()=default
virtual StringView string() const =0
virtual std::shared_ptr< Counters > enableCounters()=0
const uint16_t * characters16() const
virtual bool unwrapObject(std::unique_ptr< StringBuffer > *error, StringView objectId, v8::Local< v8::Value > *, v8::Local< v8::Context > *, std::unique_ptr< StringBuffer > *objectGroup)=0
V8StackTraceId(StringView)
virtual bool isEmpty() const =0
virtual bool canExecuteScripts(int contextGroupId)
virtual std::unique_ptr< StringBuffer > descriptionForValueSubtype(v8::Local< v8::Context >, v8::Local< v8::Value >)
virtual std::unique_ptr< StringBuffer > resourceNameToUrl(const StringView &resourceName)
static std::unique_ptr< StringBuffer > create(StringView)
virtual bool formatAccessorsAsProperties(v8::Local< v8::Value >)
virtual void consoleTimeStamp(const StringView &title)
virtual double currentTimeMS()
virtual void maxAsyncCallStackDepthChanged(int depth)