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

#include <v8-runtime-agent-impl.h>

Inheritance diagram for v8_inspector::V8RuntimeAgentImpl:
Collaboration diagram for v8_inspector::V8RuntimeAgentImpl:

Public Member Functions

 V8RuntimeAgentImpl (V8InspectorSessionImpl *, protocol::FrontendChannel *, protocol::DictionaryValue *state, std::shared_ptr< V8DebuggerBarrier >)
 
 ~V8RuntimeAgentImpl () override
 
 V8RuntimeAgentImpl (const V8RuntimeAgentImpl &)=delete
 
V8RuntimeAgentImploperator= (const V8RuntimeAgentImpl &)=delete
 
void restore ()
 
Response enable () override
 
Response disable () override
 
void evaluate (const String16 &expression, std::optional< String16 > objectGroup, std::optional< bool > includeCommandLineAPI, std::optional< bool > silent, std::optional< int > executionContextId, std::optional< bool > returnByValue, std::optional< bool > generatePreview, std::optional< bool > userGesture, std::optional< bool > awaitPromise, std::optional< bool > throwOnSideEffect, std::optional< double > timeout, std::optional< bool > disableBreaks, std::optional< bool > replMode, std::optional< bool > allowUnsafeEvalBlockedByCSP, std::optional< String16 > uniqueContextId, std::unique_ptr< protocol::Runtime::SerializationOptions > serializationOptions, std::unique_ptr< EvaluateCallback >) override
 
void awaitPromise (const String16 &promiseObjectId, std::optional< bool > returnByValue, std::optional< bool > generatePreview, std::unique_ptr< AwaitPromiseCallback >) override
 
void callFunctionOn (const String16 &expression, std::optional< String16 > objectId, std::unique_ptr< protocol::Array< protocol::Runtime::CallArgument > > optionalArguments, std::optional< bool > silent, std::optional< bool > returnByValue, std::optional< bool > generatePreview, std::optional< bool > userGesture, std::optional< bool > awaitPromise, std::optional< int > executionContextId, std::optional< String16 > objectGroup, std::optional< bool > throwOnSideEffect, std::optional< String16 > uniqueContextId, std::unique_ptr< protocol::Runtime::SerializationOptions > serializationOptions, std::unique_ptr< CallFunctionOnCallback >) override
 
Response releaseObject (const String16 &objectId) override
 
Response getProperties (const String16 &objectId, std::optional< bool > ownProperties, std::optional< bool > accessorPropertiesOnly, std::optional< bool > generatePreview, std::optional< bool > nonIndexedPropertiesOnly, std::unique_ptr< protocol::Array< protocol::Runtime::PropertyDescriptor > > *result, std::unique_ptr< protocol::Array< protocol::Runtime::InternalPropertyDescriptor > > *internalProperties, std::unique_ptr< protocol::Array< protocol::Runtime::PrivatePropertyDescriptor > > *privateProperties, std::unique_ptr< protocol::Runtime::ExceptionDetails > *) override
 
Response releaseObjectGroup (const String16 &objectGroup) override
 
Response runIfWaitingForDebugger () override
 
Response setCustomObjectFormatterEnabled (bool) override
 
Response setMaxCallStackSizeToCapture (int) override
 
Response discardConsoleEntries () override
 
Response compileScript (const String16 &expression, const String16 &sourceURL, bool persistScript, std::optional< int > executionContextId, std::optional< String16 > *, std::unique_ptr< protocol::Runtime::ExceptionDetails > *) override
 
void runScript (const String16 &, std::optional< int > executionContextId, std::optional< String16 > objectGroup, std::optional< bool > silent, std::optional< bool > includeCommandLineAPI, std::optional< bool > returnByValue, std::optional< bool > generatePreview, std::optional< bool > awaitPromise, std::unique_ptr< RunScriptCallback >) override
 
Response queryObjects (const String16 &prototypeObjectId, std::optional< String16 > objectGroup, std::unique_ptr< protocol::Runtime::RemoteObject > *objects) override
 
Response globalLexicalScopeNames (std::optional< int > executionContextId, std::unique_ptr< protocol::Array< String16 > > *outNames) override
 
Response getIsolateId (String16 *outIsolateId) override
 
Response getHeapUsage (double *out_usedSize, double *out_totalSize, double *out_embedderHeapUsedSize, double *out_backingStorageSize) override
 
void terminateExecution (std::unique_ptr< TerminateExecutionCallback > callback) override
 
Response addBinding (const String16 &name, std::optional< int > executionContextId, std::optional< String16 > executionContextName) override
 
Response removeBinding (const String16 &name) override
 
void addBindings (InspectedContext *context)
 
Response getExceptionDetails (const String16 &errorObjectId, std::unique_ptr< protocol::Runtime::ExceptionDetails > *out_exceptionDetails) override
 
void reset ()
 
void reportExecutionContextCreated (InspectedContext *)
 
void reportExecutionContextDestroyed (InspectedContext *)
 
void inspect (std::unique_ptr< protocol::Runtime::RemoteObject > objectToInspect, std::unique_ptr< protocol::DictionaryValue > hints, int executionContextId)
 
void messageAdded (V8ConsoleMessage *)
 
bool enabled () const
 

Private Member Functions

bool reportMessage (V8ConsoleMessage *, bool generatePreview)
 
void bindingCalled (const String16 &name, const String16 &payload, int executionContextId)
 
void addBinding (InspectedContext *context, const String16 &name)
 

Static Private Member Functions

static void bindingCallback (const v8::FunctionCallbackInfo< v8::Value > &info)
 

Private Attributes

V8InspectorSessionImplm_session
 
protocol::DictionaryValue * m_state
 
protocol::Runtime::Frontend m_frontend
 
V8InspectorImplm_inspector
 
std::shared_ptr< V8DebuggerBarrierm_debuggerBarrier
 
bool m_enabled
 
std::unordered_map< String16, std::unique_ptr< v8::Global< v8::Script > > > m_compiledScripts
 
std::unordered_map< String16, std::unordered_set< int > > m_activeBindings
 

Detailed Description

Definition at line 58 of file v8-runtime-agent-impl.h.

Constructor & Destructor Documentation

◆ V8RuntimeAgentImpl() [1/2]

v8_inspector::V8RuntimeAgentImpl::V8RuntimeAgentImpl ( V8InspectorSessionImpl * session,
protocol::FrontendChannel * FrontendChannel,
protocol::DictionaryValue * state,
std::shared_ptr< V8DebuggerBarrier > debuggerBarrier )

Definition at line 341 of file v8-runtime-agent-impl.cc.

◆ ~V8RuntimeAgentImpl()

v8_inspector::V8RuntimeAgentImpl::~V8RuntimeAgentImpl ( )
overridedefault

◆ V8RuntimeAgentImpl() [2/2]

v8_inspector::V8RuntimeAgentImpl::V8RuntimeAgentImpl ( const V8RuntimeAgentImpl & )
delete

Member Function Documentation

◆ addBinding() [1/2]

Response v8_inspector::V8RuntimeAgentImpl::addBinding ( const String16 & name,
std::optional< int > executionContextId,
std::optional< String16 > executionContextName )
override

Definition at line 894 of file v8-runtime-agent-impl.cc.

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

◆ addBinding() [2/2]

void v8_inspector::V8RuntimeAgentImpl::addBinding ( InspectedContext * context,
const String16 & name )
private

Definition at line 964 of file v8-runtime-agent-impl.cc.

Here is the call graph for this function:

◆ addBindings()

void v8_inspector::V8RuntimeAgentImpl::addBindings ( InspectedContext * context)

Definition at line 1043 of file v8-runtime-agent-impl.cc.

Here is the call graph for this function:

◆ awaitPromise()

void v8_inspector::V8RuntimeAgentImpl::awaitPromise ( const String16 & promiseObjectId,
std::optional< bool > returnByValue,
std::optional< bool > generatePreview,
std::unique_ptr< AwaitPromiseCallback > callback )
override

Definition at line 453 of file v8-runtime-agent-impl.cc.

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

◆ bindingCallback()

void v8_inspector::V8RuntimeAgentImpl::bindingCallback ( const v8::FunctionCallbackInfo< v8::Value > & info)
staticprivate

Definition at line 941 of file v8-runtime-agent-impl.cc.

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

◆ bindingCalled()

void v8_inspector::V8RuntimeAgentImpl::bindingCalled ( const String16 & name,
const String16 & payload,
int executionContextId )
private

Definition at line 1035 of file v8-runtime-agent-impl.cc.

Here is the caller graph for this function:

◆ callFunctionOn()

void v8_inspector::V8RuntimeAgentImpl::callFunctionOn ( const String16 & expression,
std::optional< String16 > objectId,
std::unique_ptr< protocol::Array< protocol::Runtime::CallArgument > > optionalArguments,
std::optional< bool > silent,
std::optional< bool > returnByValue,
std::optional< bool > generatePreview,
std::optional< bool > userGesture,
std::optional< bool > awaitPromise,
std::optional< int > executionContextId,
std::optional< String16 > objectGroup,
std::optional< bool > throwOnSideEffect,
std::optional< String16 > uniqueContextId,
std::unique_ptr< protocol::Runtime::SerializationOptions > serializationOptions,
std::unique_ptr< CallFunctionOnCallback > callback )
override

Definition at line 485 of file v8-runtime-agent-impl.cc.

Here is the call graph for this function:

◆ compileScript()

Response v8_inspector::V8RuntimeAgentImpl::compileScript ( const String16 & expression,
const String16 & sourceURL,
bool persistScript,
std::optional< int > executionContextId,
std::optional< String16 > * scriptId,
std::unique_ptr< protocol::Runtime::ExceptionDetails > * exceptionDetails )
override

Definition at line 681 of file v8-runtime-agent-impl.cc.

Here is the call graph for this function:

◆ disable()

Response v8_inspector::V8RuntimeAgentImpl::disable ( )
override

Definition at line 1102 of file v8-runtime-agent-impl.cc.

Here is the call graph for this function:

◆ discardConsoleEntries()

Response v8_inspector::V8RuntimeAgentImpl::discardConsoleEntries ( )
override

Definition at line 674 of file v8-runtime-agent-impl.cc.

Here is the call graph for this function:

◆ enable()

Response v8_inspector::V8RuntimeAgentImpl::enable ( )
override

Definition at line 1082 of file v8-runtime-agent-impl.cc.

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

◆ enabled()

bool v8_inspector::V8RuntimeAgentImpl::enabled ( ) const
inline

Definition at line 163 of file v8-runtime-agent-impl.h.

Here is the caller graph for this function:

◆ evaluate()

void v8_inspector::V8RuntimeAgentImpl::evaluate ( const String16 & expression,
std::optional< String16 > objectGroup,
std::optional< bool > includeCommandLineAPI,
std::optional< bool > silent,
std::optional< int > executionContextId,
std::optional< bool > returnByValue,
std::optional< bool > generatePreview,
std::optional< bool > userGesture,
std::optional< bool > awaitPromise,
std::optional< bool > throwOnSideEffect,
std::optional< double > timeout,
std::optional< bool > disableBreaks,
std::optional< bool > replMode,
std::optional< bool > allowUnsafeEvalBlockedByCSP,
std::optional< String16 > uniqueContextId,
std::unique_ptr< protocol::Runtime::SerializationOptions > serializationOptions,
std::unique_ptr< EvaluateCallback > callback )
override

Definition at line 354 of file v8-runtime-agent-impl.cc.

Here is the call graph for this function:

◆ getExceptionDetails()

Response v8_inspector::V8RuntimeAgentImpl::getExceptionDetails ( const String16 & errorObjectId,
std::unique_ptr< protocol::Runtime::ExceptionDetails > * out_exceptionDetails )
override

Definition at line 998 of file v8-runtime-agent-impl.cc.

Here is the call graph for this function:

◆ getHeapUsage()

Response v8_inspector::V8RuntimeAgentImpl::getHeapUsage ( double * out_usedSize,
double * out_totalSize,
double * out_embedderHeapUsedSize,
double * out_backingStorageSize )
override

Definition at line 854 of file v8-runtime-agent-impl.cc.

Here is the call graph for this function:

◆ getIsolateId()

Response v8_inspector::V8RuntimeAgentImpl::getIsolateId ( String16 * outIsolateId)
override

Definition at line 847 of file v8-runtime-agent-impl.cc.

Here is the call graph for this function:

◆ getProperties()

Response v8_inspector::V8RuntimeAgentImpl::getProperties ( const String16 & objectId,
std::optional< bool > ownProperties,
std::optional< bool > accessorPropertiesOnly,
std::optional< bool > generatePreview,
std::optional< bool > nonIndexedPropertiesOnly,
std::unique_ptr< protocol::Array< protocol::Runtime::PropertyDescriptor > > * result,
std::unique_ptr< protocol::Array< protocol::Runtime::InternalPropertyDescriptor > > * internalProperties,
std::unique_ptr< protocol::Array< protocol::Runtime::PrivatePropertyDescriptor > > * privateProperties,
std::unique_ptr< protocol::Runtime::ExceptionDetails > * exceptionDetails )
override

Definition at line 569 of file v8-runtime-agent-impl.cc.

Here is the call graph for this function:

◆ globalLexicalScopeNames()

Response v8_inspector::V8RuntimeAgentImpl::globalLexicalScopeNames ( std::optional< int > executionContextId,
std::unique_ptr< protocol::Array< String16 > > * outNames )
override

Definition at line 824 of file v8-runtime-agent-impl.cc.

Here is the call graph for this function:

◆ inspect()

void v8_inspector::V8RuntimeAgentImpl::inspect ( std::unique_ptr< protocol::Runtime::RemoteObject > objectToInspect,
std::unique_ptr< protocol::DictionaryValue > hints,
int executionContextId )

Definition at line 1164 of file v8-runtime-agent-impl.cc.

◆ messageAdded()

void v8_inspector::V8RuntimeAgentImpl::messageAdded ( V8ConsoleMessage * message)

Definition at line 1172 of file v8-runtime-agent-impl.cc.

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

◆ operator=()

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

◆ queryObjects()

Response v8_inspector::V8RuntimeAgentImpl::queryObjects ( const String16 & prototypeObjectId,
std::optional< String16 > objectGroup,
std::unique_ptr< protocol::Runtime::RemoteObject > * objects )
override

Definition at line 808 of file v8-runtime-agent-impl.cc.

Here is the call graph for this function:

◆ releaseObject()

Response v8_inspector::V8RuntimeAgentImpl::releaseObject ( const String16 & objectId)
override

Definition at line 626 of file v8-runtime-agent-impl.cc.

Here is the call graph for this function:

◆ releaseObjectGroup()

Response v8_inspector::V8RuntimeAgentImpl::releaseObjectGroup ( const String16 & objectGroup)
override

Definition at line 634 of file v8-runtime-agent-impl.cc.

Here is the call graph for this function:

◆ removeBinding()

Response v8_inspector::V8RuntimeAgentImpl::removeBinding ( const String16 & name)
override

Definition at line 990 of file v8-runtime-agent-impl.cc.

◆ reportExecutionContextCreated()

void v8_inspector::V8RuntimeAgentImpl::reportExecutionContextCreated ( InspectedContext * context)

Definition at line 1133 of file v8-runtime-agent-impl.cc.

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

◆ reportExecutionContextDestroyed()

void v8_inspector::V8RuntimeAgentImpl::reportExecutionContextDestroyed ( InspectedContext * context)

Definition at line 1155 of file v8-runtime-agent-impl.cc.

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

◆ reportMessage()

bool v8_inspector::V8RuntimeAgentImpl::reportMessage ( V8ConsoleMessage * message,
bool generatePreview )
private

Definition at line 1176 of file v8-runtime-agent-impl.cc.

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

◆ reset()

void v8_inspector::V8RuntimeAgentImpl::reset ( )

Definition at line 1121 of file v8-runtime-agent-impl.cc.

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

◆ restore()

void v8_inspector::V8RuntimeAgentImpl::restore ( )

Definition at line 1063 of file v8-runtime-agent-impl.cc.

Here is the call graph for this function:

◆ runIfWaitingForDebugger()

Response v8_inspector::V8RuntimeAgentImpl::runIfWaitingForDebugger ( )
override

Definition at line 639 of file v8-runtime-agent-impl.cc.

Here is the call graph for this function:

◆ runScript()

void v8_inspector::V8RuntimeAgentImpl::runScript ( const String16 & scriptId,
std::optional< int > executionContextId,
std::optional< String16 > objectGroup,
std::optional< bool > silent,
std::optional< bool > includeCommandLineAPI,
std::optional< bool > returnByValue,
std::optional< bool > generatePreview,
std::optional< bool > awaitPromise,
std::unique_ptr< RunScriptCallback > callback )
override

Definition at line 723 of file v8-runtime-agent-impl.cc.

Here is the call graph for this function:

◆ setCustomObjectFormatterEnabled()

Response v8_inspector::V8RuntimeAgentImpl::setCustomObjectFormatterEnabled ( bool enabled)
override

Definition at line 651 of file v8-runtime-agent-impl.cc.

Here is the call graph for this function:

◆ setMaxCallStackSizeToCapture()

Response v8_inspector::V8RuntimeAgentImpl::setMaxCallStackSizeToCapture ( int size)
override

Definition at line 659 of file v8-runtime-agent-impl.cc.

Here is the call graph for this function:

◆ terminateExecution()

void v8_inspector::V8RuntimeAgentImpl::terminateExecution ( std::unique_ptr< TerminateExecutionCallback > callback)
override

Definition at line 873 of file v8-runtime-agent-impl.cc.

Here is the call graph for this function:

Member Data Documentation

◆ m_activeBindings

std::unordered_map<String16, std::unordered_set<int> > v8_inspector::V8RuntimeAgentImpl::m_activeBindings
private

Definition at line 182 of file v8-runtime-agent-impl.h.

◆ m_compiledScripts

std::unordered_map<String16, std::unique_ptr<v8::Global<v8::Script> > > v8_inspector::V8RuntimeAgentImpl::m_compiledScripts
private

Definition at line 180 of file v8-runtime-agent-impl.h.

◆ m_debuggerBarrier

std::shared_ptr<V8DebuggerBarrier> v8_inspector::V8RuntimeAgentImpl::m_debuggerBarrier
private

Definition at line 177 of file v8-runtime-agent-impl.h.

◆ m_enabled

bool v8_inspector::V8RuntimeAgentImpl::m_enabled
private

Definition at line 178 of file v8-runtime-agent-impl.h.

◆ m_frontend

protocol::Runtime::Frontend v8_inspector::V8RuntimeAgentImpl::m_frontend
private

Definition at line 175 of file v8-runtime-agent-impl.h.

◆ m_inspector

V8InspectorImpl* v8_inspector::V8RuntimeAgentImpl::m_inspector
private

Definition at line 176 of file v8-runtime-agent-impl.h.

◆ m_session

V8InspectorSessionImpl* v8_inspector::V8RuntimeAgentImpl::m_session
private

Definition at line 173 of file v8-runtime-agent-impl.h.

◆ m_state

protocol::DictionaryValue* v8_inspector::V8RuntimeAgentImpl::m_state
private

Definition at line 174 of file v8-runtime-agent-impl.h.


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