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;
137 virtual std::vector<uint8_t>
state() = 0;
148 virtual void resume() = 0;
152 bool caseSensitive,
bool isRegex) = 0;
157 bool generatePreview) = 0;
191 int contextGroupId) {
240 V8StackTraceId(uintptr_t id,
const std::pair<int64_t, int64_t> debugger_id);
241 V8StackTraceId(uintptr_t id,
const std::pair<int64_t, int64_t> debugger_id,
284 const StringView& url,
unsigned lineNumber,
unsigned columnNumber,
312 return m_countersMap;
316 static int* getCounterPtr(
const char* name);
319 std::unordered_map<std::string,
int> m_countersMap;
virtual std::unique_ptr< V8StackTrace > captureStackTrace(bool fullStack)=0
virtual void idleFinished()=0
virtual void releaseObjectGroup(const StringView &)=0
virtual bool unwrapObject(std::unique_ptr< StringBuffer > *error, const StringView &objectId, v8::Local< v8::Value > *, v8::Local< v8::Context > *, std::unique_ptr< StringBuffer > *objectGroup)=0
virtual void setSkipAllPauses(bool)=0
virtual unsigned exceptionThrown(v8::Local< v8::Context >, const StringView &message, v8::Local< v8::Value > exception, const StringView &detailedMessage, const StringView &url, unsigned lineNumber, unsigned columnNumber, std::unique_ptr< V8StackTrace >, int scriptId)=0
static bool canDispatchMethod(const StringView &method)
virtual ~V8StackTrace()=default
virtual const StringView & string()=0
virtual ~V8InspectorSession()=default
void * operator new(size_t)=delete
virtual void externalAsyncTaskFinished(const V8StackTraceId &parent)=0
virtual ~Inspectable()=default
virtual std::shared_ptr< Counters > enableCounters()=0
virtual StringView topFunctionName() const =0
virtual v8::Local< v8::Context > ensureDefaultContextInGroup(int contextGroupId)
virtual void cancelTimer(void *data)
virtual void runMessageLoopOnPause(int contextGroupId)
virtual std::unique_ptr< V8StackTrace > createStackTrace(v8::Local< v8::StackTrace >)=0
virtual void cancelPauseOnNextStatement()=0
virtual void triggerPreciseCoverageDeltaUpdate(const StringView &occassion)=0
virtual std::unique_ptr< protocol::Runtime::API::StackTrace > buildInspectorObject(int maxAsyncDepth) const =0
virtual void contextCreated(const V8ContextInfo &)=0
StringView(const uint16_t *characters, size_t length)
V8StackTraceId(uintptr_t id, const std::pair< int64_t, int64_t > debugger_id)
virtual std::unique_ptr< V8InspectorSession > connect(int contextGroupId, Channel *, const StringView &state)=0
virtual ~Channel()=default
std::pair< int64_t, int64_t > debugger_id
V8StackTraceId & operator=(const V8StackTraceId &)=default
virtual StringView topSourceURL() const =0
virtual void schedulePauseOnNextStatement(const StringView &breakReason, const StringView &breakDetails)=0
virtual void maxAsyncCallStackDepthChanged(int depth)
virtual ~V8InspectorClient()=default
virtual bool canExecuteScripts(int contextGroupId)
virtual void asyncTaskFinished(void *task)=0
V8StackTraceId(const StringView &)
const std::unordered_map< std::string, int > & getCountersMap() const
virtual int topColumnNumber() const =0
virtual void runIfWaitingForDebugger(int contextGroupId)
virtual std::unique_ptr< StringBuffer > resourceNameToUrl(const StringView &resourceName)
virtual ~StringBuffer()=default
virtual std::vector< std::unique_ptr< protocol::Debugger::API::SearchMatch > > searchInTextByLines(const StringView &text, const StringView &query, bool caseSensitive, bool isRegex)=0
v8::Local< v8::Context > context
virtual void installAdditionalCommandLineAPI(v8::Local< v8::Context >, v8::Local< v8::Object >)
virtual void exceptionRevoked(v8::Local< v8::Context >, unsigned exceptionId, const StringView &message)=0
virtual void consoleTime(const StringView &title)
virtual void idleStarted()=0
void(* TimerCallback)(void *)
virtual std::unique_ptr< V8StackTrace > clone()=0
virtual void allAsyncTasksCanceled()=0
static std::unique_ptr< V8Inspector > create(v8::Isolate *, V8InspectorClient *)
virtual void stepOver()=0
virtual void dispatchProtocolMessage(const StringView &message)=0
virtual bool isInspectableHeapObject(v8::Local< v8::Object >)
V8ContextInfo(v8::Local< v8::Context > context, int contextGroupId, const StringView &humanReadableName)
virtual void contextDestroyed(v8::Local< v8::Context >)=0
virtual ~V8Inspector()=default
std::unique_ptr< StringBuffer > ToString()
virtual int topLineNumber() const =0
virtual void resetContextGroup(int contextGroupId)=0
virtual std::unique_ptr< protocol::Runtime::API::RemoteObject > wrapObject(v8::Local< v8::Context >, v8::Local< v8::Value >, const StringView &groupName, bool generatePreview)=0
virtual void externalAsyncTaskStarted(const V8StackTraceId &parent)=0
virtual v8::Local< v8::Value > get(v8::Local< v8::Context >)=0
virtual void sendNotification(std::unique_ptr< StringBuffer > message)=0
virtual std::vector< uint8_t > state()=0
StringView(const uint8_t *characters, size_t length)
virtual void asyncTaskScheduled(const StringView &taskName, void *task, bool recurring)=0
virtual StringView firstNonEmptySourceURL() const =0
V8ContextInfo & operator=(const V8ContextInfo &)=delete
virtual v8::MaybeLocal< v8::Context > contextById(int contextId)=0
virtual bool formatAccessorsAsProperties(v8::Local< v8::Value >)
Counters(v8::Isolate *isolate)
virtual v8::MaybeLocal< v8::Value > memoryInfo(v8::Isolate *, v8::Local< v8::Context >)
virtual V8StackTraceId storeCurrentStackTrace(const StringView &description)=0
virtual void endEnsureAllContextsInGroup(int contextGroupId)
virtual std::unique_ptr< StringBuffer > valueSubtype(v8::Local< v8::Value >)
static int executionContextId(v8::Local< v8::Context > context)
virtual void unmuteMetrics(int contextGroupId)
StringView humanReadableName
virtual std::vector< std::unique_ptr< protocol::Schema::API::Domain > > supportedDomains()=0
virtual std::unique_ptr< StringBuffer > toString() const =0
virtual void beginEnsureAllContextsInGroup(int contextGroupId)
V8ContextInfo(const V8ContextInfo &)=delete
virtual void breakProgram(const StringView &breakReason, const StringView &breakDetails)=0
virtual void flushProtocolNotifications()=0
V8StackTraceId(uintptr_t id, const std::pair< int64_t, int64_t > debugger_id, bool should_pause)
virtual double currentTimeMS()
~V8StackTraceId()=default
virtual void sendResponse(int callId, std::unique_ptr< StringBuffer > message)=0
const uint8_t * characters8() const
V8StackTraceId(const V8StackTraceId &)=default
virtual void consoleAPIMessage(int contextGroupId, v8::Isolate::MessageErrorLevel level, const StringView &message, const StringView &url, unsigned lineNumber, unsigned columnNumber, V8StackTrace *)
const uint16_t * characters16() const
virtual std::unique_ptr< protocol::Runtime::API::StackTrace > buildInspectorObject() const =0
virtual bool isEmpty() const =0
virtual void consoleTimeEnd(const StringView &title)
virtual void asyncTaskCanceled(void *task)=0
static std::unique_ptr< StringBuffer > create(const StringView &)
void * operator new(size_t, void *)=delete
virtual void asyncTaskStarted(void *task)=0
virtual void quitMessageLoopOnPause()
V8StackTraceId & operator=(V8StackTraceId &&) noexcept=default
virtual void muteMetrics(int contextGroupId)
virtual void beginUserGesture()
virtual void consoleTimeStamp(const StringView &title)
virtual StringView topScriptId() const =0
virtual void startRepeatingTimer(double, TimerCallback, void *data)
virtual void consoleClear(int contextGroupId)
void * operator new(size_t, NotNullTagEnum, void *)=delete
virtual void addInspectedObject(std::unique_ptr< Inspectable >)=0
virtual void endUserGesture()