v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8_inspector::V8InspectorImpl Class Reference

#include <v8-inspector-impl.h>

Inheritance diagram for v8_inspector::V8InspectorImpl:
Collaboration diagram for v8_inspector::V8InspectorImpl:

Classes

class  EvaluateScope
 

Public Member Functions

V8_EXPORT_PRIVATE V8InspectorImpl (v8::Isolate *, V8InspectorClient *)
 
 ~V8InspectorImpl () override
 
 V8InspectorImpl (const V8InspectorImpl &)=delete
 
V8InspectorImploperator= (const V8InspectorImpl &)=delete
 
v8::Isolateisolate () const
 
V8InspectorClientclient ()
 
V8Debuggerdebugger ()
 
PromiseHandlerTrackerpromiseHandlerTracker ()
 
int contextGroupId (v8::Local< v8::Context >) const
 
int contextGroupId (int contextId) const
 
int resolveUniqueContextId (internal::V8DebuggerId uniqueId) const
 
v8::MaybeLocal< v8::ValuecompileAndRunInternalScript (v8::Local< v8::Context >, v8::Local< v8::String >)
 
v8::MaybeLocal< v8::ScriptcompileScript (v8::Local< v8::Context >, const String16 &code, const String16 &fileName)
 
v8::MaybeLocal< v8::ContextregexContext ()
 
v8::MaybeLocal< v8::ContextexceptionMetaDataContext ()
 
std::unique_ptr< V8InspectorSessionconnect (int contextGroupId, V8Inspector::Channel *, StringView state, ClientTrustLevel, SessionPauseState) override
 
void contextCreated (const V8ContextInfo &) override
 
void contextDestroyed (v8::Local< v8::Context >) override
 
v8::MaybeLocal< v8::ContextcontextById (int contextId) override
 
V8DebuggerId uniqueDebuggerId (int contextId) override
 
uint64_t isolateId () override
 
void contextCollected (int contextGroupId, int contextId)
 
void resetContextGroup (int contextGroupId) override
 
void idleStarted () override
 
void idleFinished () override
 
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
 
void exceptionRevoked (v8::Local< v8::Context >, unsigned exceptionId, StringView message) override
 
std::unique_ptr< V8StackTracecreateStackTrace (v8::Local< v8::StackTrace >) override
 
std::unique_ptr< V8StackTracecaptureStackTrace (bool fullStack) override
 
void asyncTaskScheduled (StringView taskName, void *task, bool recurring) override
 
void asyncTaskCanceled (void *task) override
 
void asyncTaskStarted (void *task) override
 
void asyncTaskFinished (void *task) override
 
void allAsyncTasksCanceled () override
 
V8StackTraceId storeCurrentStackTrace (StringView description) override
 
void externalAsyncTaskStarted (const V8StackTraceId &parent) override
 
void externalAsyncTaskFinished (const V8StackTraceId &parent) override
 
V8_EXPORT_PRIVATE bool associateExceptionData (v8::Local< v8::Context >, v8::Local< v8::Value > exception, v8::Local< v8::Name > key, v8::Local< v8::Value > value) override
 
unsigned nextExceptionId ()
 
void muteExceptions (int contextGroupId)
 
void unmuteExceptions (int contextGroupId)
 
V8ConsoleMessageStorageensureConsoleMessageStorage (int contextGroupId)
 
bool hasConsoleMessageStorage (int contextGroupId)
 
void discardInspectedContext (int contextGroupId, int contextId)
 
void disconnect (V8InspectorSessionImpl *)
 
V8InspectorSessionImplsessionById (int contextGroupId, int sessionId)
 
InspectedContextgetContext (int groupId, int contextId) const
 
InspectedContextgetContext (int contextId) const
 
V8_EXPORT_PRIVATE V8Consoleconsole ()
 
void forEachContext (int contextGroupId, const std::function< void(InspectedContext *)> &callback)
 
void forEachSession (int contextGroupId, const std::function< void(V8InspectorSessionImpl *)> &callback)
 
int64_t generateUniqueId ()
 
V8_EXPORT_PRIVATE v8::MaybeLocal< v8::ObjectgetAssociatedExceptionData (v8::Local< v8::Value > exception)
 
std::unique_ptr< protocol::DictionaryValue > getAssociatedExceptionDataForProtocol (v8::Local< v8::Value > exception)
 
- Public Member Functions inherited from v8_inspector::V8Inspector
virtual ~V8Inspector ()=default
 

Private Types

using MuteExceptionsMap = std::unordered_map<int, int>
 
using ContextByIdMap
 
using ContextsByGroupMap
 
using ConsoleStorageMap
 

Private Attributes

v8::Isolatem_isolate
 
V8InspectorClientm_client
 
std::unique_ptr< V8Debuggerm_debugger
 
v8::Global< v8::Contextm_regexContext
 
v8::Global< v8::Contextm_exceptionMetaDataContext
 
v8::Global< v8::debug::EphemeronTablem_exceptionMetaData
 
unsigned m_lastExceptionId
 
int m_lastContextId
 
int m_lastSessionId = 0
 
MuteExceptionsMap m_muteExceptionsMap
 
ContextsByGroupMap m_contexts
 
std::unordered_map< int, std::map< int, V8InspectorSessionImpl * > > m_sessions
 
std::unordered_map< int, std::weak_ptr< V8DebuggerBarrier > > m_debuggerBarriers
 
ConsoleStorageMap m_consoleStorageMap
 
std::unordered_map< int, int > m_contextIdToGroupIdMap
 
std::map< std::pair< int64_t, int64_t >, int > m_uniqueIdToContextId
 
std::unique_ptr< V8Consolem_console
 
PromiseHandlerTracker m_promiseHandlerTracker
 

Additional Inherited Members

- Public Types inherited from v8_inspector::V8Inspector
enum  ClientTrustLevel { kUntrusted , kFullyTrusted }
 
enum  SessionPauseState { kWaitingForDebugger , kNotWaitingForDebugger }
 
- Static Public Member Functions inherited from v8_inspector::V8Inspector
static std::unique_ptr< V8Inspectorcreate (v8::Isolate *, V8InspectorClient *)
 

Detailed Description

Definition at line 57 of file v8-inspector-impl.h.

Member Typedef Documentation

◆ ConsoleStorageMap

Initial value:
std::unordered_map<int, std::unique_ptr<V8ConsoleMessageStorage>>

Definition at line 186 of file v8-inspector-impl.h.

◆ ContextByIdMap

Initial value:
std::unordered_map<int, std::unique_ptr<InspectedContext>>

Definition at line 175 of file v8-inspector-impl.h.

◆ ContextsByGroupMap

Initial value:
std::unordered_map<int, std::unique_ptr<ContextByIdMap>>

Definition at line 177 of file v8-inspector-impl.h.

◆ MuteExceptionsMap

using v8_inspector::V8InspectorImpl::MuteExceptionsMap = std::unordered_map<int, int>
private

Definition at line 172 of file v8-inspector-impl.h.

Constructor & Destructor Documentation

◆ V8InspectorImpl() [1/2]

v8_inspector::V8InspectorImpl::V8InspectorImpl ( v8::Isolate * isolate,
V8InspectorClient * client )

Definition at line 63 of file v8-inspector-impl.cc.

Here is the call graph for this function:

◆ ~V8InspectorImpl()

v8_inspector::V8InspectorImpl::~V8InspectorImpl ( )
override

Definition at line 75 of file v8-inspector-impl.cc.

Here is the call graph for this function:

◆ V8InspectorImpl() [2/2]

v8_inspector::V8InspectorImpl::V8InspectorImpl ( const V8InspectorImpl & )
delete

Member Function Documentation

◆ allAsyncTasksCanceled()

void v8_inspector::V8InspectorImpl::allAsyncTasksCanceled ( )
overridevirtual

Implements v8_inspector::V8Inspector.

Definition at line 354 of file v8-inspector-impl.cc.

◆ associateExceptionData()

bool v8_inspector::V8InspectorImpl::associateExceptionData ( v8::Local< v8::Context > ,
v8::Local< v8::Value > exception,
v8::Local< v8::Name > key,
v8::Local< v8::Value > value )
overridevirtual

Implements v8_inspector::V8Inspector.

Definition at line 494 of file v8-inspector-impl.cc.

Here is the call graph for this function:

◆ asyncTaskCanceled()

void v8_inspector::V8InspectorImpl::asyncTaskCanceled ( void * task)
overridevirtual

Implements v8_inspector::V8Inspector.

Definition at line 339 of file v8-inspector-impl.cc.

Here is the caller graph for this function:

◆ asyncTaskFinished()

void v8_inspector::V8InspectorImpl::asyncTaskFinished ( void * task)
overridevirtual

Implements v8_inspector::V8Inspector.

Definition at line 349 of file v8-inspector-impl.cc.

Here is the caller graph for this function:

◆ asyncTaskScheduled()

void v8_inspector::V8InspectorImpl::asyncTaskScheduled ( StringView taskName,
void * task,
bool recurring )
overridevirtual

Implements v8_inspector::V8Inspector.

Definition at line 333 of file v8-inspector-impl.cc.

Here is the caller graph for this function:

◆ asyncTaskStarted()

void v8_inspector::V8InspectorImpl::asyncTaskStarted ( void * task)
overridevirtual

Implements v8_inspector::V8Inspector.

Definition at line 344 of file v8-inspector-impl.cc.

Here is the caller graph for this function:

◆ captureStackTrace()

std::unique_ptr< V8StackTrace > v8_inspector::V8InspectorImpl::captureStackTrace ( bool fullStack)
overridevirtual

Implements v8_inspector::V8Inspector.

Definition at line 316 of file v8-inspector-impl.cc.

◆ client()

V8InspectorClient * v8_inspector::V8InspectorImpl::client ( )
inline

Definition at line 65 of file v8-inspector-impl.h.

Here is the caller graph for this function:

◆ compileAndRunInternalScript()

v8::MaybeLocal< v8::Value > v8_inspector::V8InspectorImpl::compileAndRunInternalScript ( v8::Local< v8::Context > context,
v8::Local< v8::String > source )

Definition at line 95 of file v8-inspector-impl.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ compileScript()

v8::MaybeLocal< v8::Script > v8_inspector::V8InspectorImpl::compileScript ( v8::Local< v8::Context > context,
const String16 & code,
const String16 & fileName )

Definition at line 107 of file v8-inspector-impl.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ connect()

std::unique_ptr< V8InspectorSession > v8_inspector::V8InspectorImpl::connect ( int contextGroupId,
V8Inspector::Channel * channel,
StringView state,
ClientTrustLevel client_trust_level,
SessionPauseState pause_state )
overridevirtual

Reimplemented from v8_inspector::V8Inspector.

Definition at line 147 of file v8-inspector-impl.cc.

Here is the call graph for this function:

◆ console()

V8Console * v8_inspector::V8InspectorImpl::console ( )

Definition at line 397 of file v8-inspector-impl.cc.

Here is the caller graph for this function:

◆ contextById()

v8::MaybeLocal< v8::Context > v8_inspector::V8InspectorImpl::contextById ( int contextId)
overridevirtual

Implements v8_inspector::V8Inspector.

Definition at line 199 of file v8-inspector-impl.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ contextCollected()

void v8_inspector::V8InspectorImpl::contextCollected ( int contextGroupId,
int contextId )

Definition at line 250 of file v8-inspector-impl.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ contextCreated()

void v8_inspector::V8InspectorImpl::contextCreated ( const V8ContextInfo & info)
overridevirtual

Implements v8_inspector::V8Inspector.

Definition at line 216 of file v8-inspector-impl.cc.

Here is the call graph for this function:

◆ contextDestroyed()

void v8_inspector::V8InspectorImpl::contextDestroyed ( v8::Local< v8::Context > context)
overridevirtual

Implements v8_inspector::V8Inspector.

Definition at line 244 of file v8-inspector-impl.cc.

Here is the call graph for this function:

◆ contextGroupId() [1/2]

int v8_inspector::V8InspectorImpl::contextGroupId ( int contextId) const

Definition at line 84 of file v8-inspector-impl.cc.

◆ contextGroupId() [2/2]

int v8_inspector::V8InspectorImpl::contextGroupId ( v8::Local< v8::Context > context) const

Definition at line 80 of file v8-inspector-impl.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createStackTrace()

std::unique_ptr< V8StackTrace > v8_inspector::V8InspectorImpl::createStackTrace ( v8::Local< v8::StackTrace > stackTrace)
overridevirtual

Implements v8_inspector::V8Inspector.

Definition at line 142 of file v8-inspector-impl.cc.

◆ debugger()

V8Debugger * v8_inspector::V8InspectorImpl::debugger ( )
inline

Definition at line 66 of file v8-inspector-impl.h.

Here is the caller graph for this function:

◆ discardInspectedContext()

void v8_inspector::V8InspectorImpl::discardInspectedContext ( int contextGroupId,
int contextId )

Definition at line 380 of file v8-inspector-impl.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ disconnect()

void v8_inspector::V8InspectorImpl::disconnect ( V8InspectorSessionImpl * session)

Definition at line 173 of file v8-inspector-impl.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ensureConsoleMessageStorage()

V8ConsoleMessageStorage * v8_inspector::V8InspectorImpl::ensureConsoleMessageStorage ( int contextGroupId)

Definition at line 124 of file v8-inspector-impl.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ exceptionMetaDataContext()

v8::MaybeLocal< v8::Context > v8_inspector::V8InspectorImpl::exceptionMetaDataContext ( )

Definition at line 369 of file v8-inspector-impl.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ exceptionRevoked()

void v8_inspector::V8InspectorImpl::exceptionRevoked ( v8::Local< v8::Context > context,
unsigned exceptionId,
StringView message )
overridevirtual

Implements v8_inspector::V8Inspector.

Definition at line 304 of file v8-inspector-impl.cc.

Here is the call graph for this function:

◆ exceptionThrown()

unsigned v8_inspector::V8InspectorImpl::exceptionThrown ( v8::Local< v8::Context > context,
StringView message,
v8::Local< v8::Value > exception,
StringView detailedMessage,
StringView url,
unsigned lineNumber,
unsigned columnNumber,
std::unique_ptr< V8StackTrace > stackTrace,
int scriptId )
overridevirtual

Implements v8_inspector::V8Inspector.

Definition at line 284 of file v8-inspector-impl.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ externalAsyncTaskFinished()

void v8_inspector::V8InspectorImpl::externalAsyncTaskFinished ( const V8StackTraceId & parent)
overridevirtual

Implements v8_inspector::V8Inspector.

Definition at line 329 of file v8-inspector-impl.cc.

◆ externalAsyncTaskStarted()

void v8_inspector::V8InspectorImpl::externalAsyncTaskStarted ( const V8StackTraceId & parent)
overridevirtual

Implements v8_inspector::V8Inspector.

Definition at line 325 of file v8-inspector-impl.cc.

◆ forEachContext()

void v8_inspector::V8InspectorImpl::forEachContext ( int contextGroupId,
const std::function< void(InspectedContext *)> & callback )

Definition at line 402 of file v8-inspector-impl.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ forEachSession()

void v8_inspector::V8InspectorImpl::forEachSession ( int contextGroupId,
const std::function< void(V8InspectorSessionImpl *)> & callback )

Definition at line 420 of file v8-inspector-impl.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ generateUniqueId()

int64_t v8_inspector::V8InspectorImpl::generateUniqueId ( )

Definition at line 438 of file v8-inspector-impl.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAssociatedExceptionData()

v8::MaybeLocal< v8::Object > v8_inspector::V8InspectorImpl::getAssociatedExceptionData ( v8::Local< v8::Value > exception)

Definition at line 526 of file v8-inspector-impl.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAssociatedExceptionDataForProtocol()

std::unique_ptr< protocol::DictionaryValue > v8_inspector::V8InspectorImpl::getAssociatedExceptionDataForProtocol ( v8::Local< v8::Value > exception)

Definition at line 546 of file v8-inspector-impl.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getContext() [1/2]

InspectedContext * v8_inspector::V8InspectorImpl::getContext ( int contextId) const

Definition at line 195 of file v8-inspector-impl.cc.

Here is the call graph for this function:

◆ getContext() [2/2]

InspectedContext * v8_inspector::V8InspectorImpl::getContext ( int groupId,
int contextId ) const

Definition at line 182 of file v8-inspector-impl.cc.

Here is the caller graph for this function:

◆ hasConsoleMessageStorage()

bool v8_inspector::V8InspectorImpl::hasConsoleMessageStorage ( int contextGroupId)

Definition at line 137 of file v8-inspector-impl.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ idleFinished()

void v8_inspector::V8InspectorImpl::idleFinished ( )
overridevirtual

Implements v8_inspector::V8Inspector.

Definition at line 282 of file v8-inspector-impl.cc.

Here is the call graph for this function:

◆ idleStarted()

void v8_inspector::V8InspectorImpl::idleStarted ( )
overridevirtual

Implements v8_inspector::V8Inspector.

Definition at line 280 of file v8-inspector-impl.cc.

Here is the call graph for this function:

◆ isolate()

v8::Isolate * v8_inspector::V8InspectorImpl::isolate ( ) const
inline

Definition at line 64 of file v8-inspector-impl.h.

Here is the caller graph for this function:

◆ isolateId()

uint64_t v8_inspector::V8InspectorImpl::isolateId ( )
overridevirtual

Implements v8_inspector::V8Inspector.

Definition at line 212 of file v8-inspector-impl.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ muteExceptions()

void v8_inspector::V8InspectorImpl::muteExceptions ( int contextGroupId)

Definition at line 116 of file v8-inspector-impl.cc.

Here is the call graph for this function:

◆ nextExceptionId()

unsigned v8_inspector::V8InspectorImpl::nextExceptionId ( )
inline

Definition at line 123 of file v8-inspector-impl.h.

Here is the caller graph for this function:

◆ operator=()

V8InspectorImpl & v8_inspector::V8InspectorImpl::operator= ( const V8InspectorImpl & )
delete

◆ promiseHandlerTracker()

PromiseHandlerTracker & v8_inspector::V8InspectorImpl::promiseHandlerTracker ( )
inline

Definition at line 67 of file v8-inspector-impl.h.

Here is the caller graph for this function:

◆ regexContext()

v8::MaybeLocal< v8::Context > v8_inspector::V8InspectorImpl::regexContext ( )

Definition at line 358 of file v8-inspector-impl.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resetContextGroup()

void v8_inspector::V8InspectorImpl::resetContextGroup ( int contextGroupId)
overridevirtual

Implements v8_inspector::V8Inspector.

Definition at line 266 of file v8-inspector-impl.cc.

Here is the call graph for this function:

◆ resolveUniqueContextId()

int v8_inspector::V8InspectorImpl::resolveUniqueContextId ( internal::V8DebuggerId uniqueId) const

Definition at line 89 of file v8-inspector-impl.cc.

Here is the call graph for this function:

◆ sessionById()

V8InspectorSessionImpl * v8_inspector::V8InspectorImpl::sessionById ( int contextGroupId,
int sessionId )

Definition at line 389 of file v8-inspector-impl.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ storeCurrentStackTrace()

V8StackTraceId v8_inspector::V8InspectorImpl::storeCurrentStackTrace ( StringView description)
overridevirtual

Implements v8_inspector::V8Inspector.

Definition at line 321 of file v8-inspector-impl.cc.

◆ uniqueDebuggerId()

V8DebuggerId v8_inspector::V8InspectorImpl::uniqueDebuggerId ( int contextId)
overridevirtual

Implements v8_inspector::V8Inspector.

Definition at line 204 of file v8-inspector-impl.cc.

Here is the call graph for this function:

◆ unmuteExceptions()

void v8_inspector::V8InspectorImpl::unmuteExceptions ( int contextGroupId)

Definition at line 120 of file v8-inspector-impl.cc.

Here is the call graph for this function:

Member Data Documentation

◆ m_client

V8InspectorClient* v8_inspector::V8InspectorImpl::m_client
private

Definition at line 163 of file v8-inspector-impl.h.

◆ m_console

std::unique_ptr<V8Console> v8_inspector::V8InspectorImpl::m_console
private

Definition at line 193 of file v8-inspector-impl.h.

◆ m_consoleStorageMap

ConsoleStorageMap v8_inspector::V8InspectorImpl::m_consoleStorageMap
private

Definition at line 188 of file v8-inspector-impl.h.

◆ m_contextIdToGroupIdMap

std::unordered_map<int, int> v8_inspector::V8InspectorImpl::m_contextIdToGroupIdMap
private

Definition at line 190 of file v8-inspector-impl.h.

◆ m_contexts

ContextsByGroupMap v8_inspector::V8InspectorImpl::m_contexts
private

Definition at line 179 of file v8-inspector-impl.h.

◆ m_debugger

std::unique_ptr<V8Debugger> v8_inspector::V8InspectorImpl::m_debugger
private

Definition at line 164 of file v8-inspector-impl.h.

◆ m_debuggerBarriers

std::unordered_map<int, std::weak_ptr<V8DebuggerBarrier> > v8_inspector::V8InspectorImpl::m_debuggerBarriers
private

Definition at line 184 of file v8-inspector-impl.h.

◆ m_exceptionMetaData

v8::Global<v8::debug::EphemeronTable> v8_inspector::V8InspectorImpl::m_exceptionMetaData
private

Definition at line 167 of file v8-inspector-impl.h.

◆ m_exceptionMetaDataContext

v8::Global<v8::Context> v8_inspector::V8InspectorImpl::m_exceptionMetaDataContext
private

Definition at line 166 of file v8-inspector-impl.h.

◆ m_isolate

v8::Isolate* v8_inspector::V8InspectorImpl::m_isolate
private

Definition at line 162 of file v8-inspector-impl.h.

◆ m_lastContextId

int v8_inspector::V8InspectorImpl::m_lastContextId
private

Definition at line 169 of file v8-inspector-impl.h.

◆ m_lastExceptionId

unsigned v8_inspector::V8InspectorImpl::m_lastExceptionId
private

Definition at line 168 of file v8-inspector-impl.h.

◆ m_lastSessionId

int v8_inspector::V8InspectorImpl::m_lastSessionId = 0
private

Definition at line 170 of file v8-inspector-impl.h.

◆ m_muteExceptionsMap

MuteExceptionsMap v8_inspector::V8InspectorImpl::m_muteExceptionsMap
private

Definition at line 173 of file v8-inspector-impl.h.

◆ m_promiseHandlerTracker

PromiseHandlerTracker v8_inspector::V8InspectorImpl::m_promiseHandlerTracker
private

Definition at line 194 of file v8-inspector-impl.h.

◆ m_regexContext

v8::Global<v8::Context> v8_inspector::V8InspectorImpl::m_regexContext
private

Definition at line 165 of file v8-inspector-impl.h.

◆ m_sessions

std::unordered_map<int, std::map<int, V8InspectorSessionImpl*> > v8_inspector::V8InspectorImpl::m_sessions
private

Definition at line 182 of file v8-inspector-impl.h.

◆ m_uniqueIdToContextId

std::map<std::pair<int64_t, int64_t>, int> v8_inspector::V8InspectorImpl::m_uniqueIdToContextId
private

Definition at line 191 of file v8-inspector-impl.h.


The documentation for this class was generated from the following files: