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

#include <injected-script.h>

Collaboration diagram for v8_inspector::InjectedScript:

Classes

class  CallFrameScope
 
class  ContextScope
 
class  ObjectScope
 
class  ProtocolPromiseHandler
 
class  Scope
 

Public Member Functions

 InjectedScript (InspectedContext *, int sessionId)
 
 ~InjectedScript ()
 
 InjectedScript (const InjectedScript &)=delete
 
InjectedScriptoperator= (const InjectedScript &)=delete
 
InspectedContextcontext () const
 
Response getProperties (v8::Local< v8::Object >, const String16 &groupName, bool ownProperties, bool accessorPropertiesOnly, bool nonIndexedPropertiesOnly, const WrapOptions &wrapOptions, std::unique_ptr< protocol::Array< protocol::Runtime::PropertyDescriptor > > *result, std::unique_ptr< protocol::Runtime::ExceptionDetails > *)
 
Response getInternalAndPrivateProperties (v8::Local< v8::Value >, const String16 &groupName, bool accessorPropertiesOnly, std::unique_ptr< protocol::Array< protocol::Runtime::InternalPropertyDescriptor > > *internalProperties, std::unique_ptr< protocol::Array< protocol::Runtime::PrivatePropertyDescriptor > > *privateProperties)
 
void releaseObject (const String16 &objectId)
 
Response wrapObject (v8::Local< v8::Value >, const String16 &groupName, const WrapOptions &wrapOptions, std::unique_ptr< protocol::Runtime::RemoteObject > *result)
 
Response wrapObject (v8::Local< v8::Value >, const String16 &groupName, const WrapOptions &wrapOptions, v8::MaybeLocal< v8::Value > customPreviewConfig, int maxCustomPreviewDepth, std::unique_ptr< protocol::Runtime::RemoteObject > *result)
 
Response wrapObjectMirror (const ValueMirror &mirror, const String16 &groupName, const WrapOptions &wrapOptions, v8::MaybeLocal< v8::Value > customPreviewConfig, int maxCustomPreviewDepth, std::unique_ptr< protocol::Runtime::RemoteObject > *result)
 
std::unique_ptr< protocol::Runtime::RemoteObject > wrapTable (v8::Local< v8::Object > table, v8::MaybeLocal< v8::Array > columns)
 
void addPromiseCallback (V8InspectorSessionImpl *session, v8::MaybeLocal< v8::Value > value, const String16 &objectGroup, std::unique_ptr< WrapOptions > wrapOptions, bool replMode, bool throwOnSideEffect, std::shared_ptr< EvaluateCallback > callback)
 
Response findObject (const RemoteObjectId &, v8::Local< v8::Value > *) const
 
String16 objectGroupName (const RemoteObjectId &) const
 
void releaseObjectGroup (const String16 &)
 
void setCustomObjectFormatterEnabled (bool)
 
Response resolveCallArgument (protocol::Runtime::CallArgument *, v8::Local< v8::Value > *result)
 
Response createExceptionDetails (const v8::TryCatch &, const String16 &groupName, std::unique_ptr< protocol::Runtime::ExceptionDetails > *result)
 
Response createExceptionDetails (v8::Local< v8::Message > message, v8::Local< v8::Value > exception, const String16 &groupName, std::unique_ptr< protocol::Runtime::ExceptionDetails > *result)
 
Response wrapEvaluateResult (v8::MaybeLocal< v8::Value > maybeResultValue, const v8::TryCatch &, const String16 &objectGroup, const WrapOptions &wrapOptions, bool throwOnSideEffect, std::unique_ptr< protocol::Runtime::RemoteObject > *result, std::unique_ptr< protocol::Runtime::ExceptionDetails > *)
 
v8::Local< v8::ValuelastEvaluationResult () const
 
void setLastEvaluationResult (v8::Local< v8::Value > result)
 
String16 bindObject (v8::Local< v8::Value >, const String16 &groupName)
 

Private Member Functions

v8::Local< v8::ObjectcommandLineAPI ()
 
void unbindObject (int id)
 
void discardEvaluateCallbacks ()
 
void deleteEvaluateCallback (std::shared_ptr< EvaluateCallback > callback)
 
Response addExceptionToDetails (v8::Local< v8::Value > exception, protocol::Runtime::ExceptionDetails *exceptionDetails, const String16 &objectGroup)
 

Static Private Member Functions

static Response bindRemoteObjectIfNeeded (int sessionId, v8::Local< v8::Context > context, v8::Local< v8::Value >, const String16 &groupName, protocol::Runtime::RemoteObject *remoteObject)
 

Private Attributes

InspectedContextm_context
 
int m_sessionId
 
v8::Global< v8::Valuem_lastEvaluationResult
 
v8::Global< v8::Objectm_commandLineAPI
 
int m_lastBoundObjectId = 1
 
std::unordered_map< int, v8::Global< v8::Value > > m_idToWrappedObject
 
std::unordered_map< int, String16m_idToObjectGroupName
 
std::unordered_map< String16, std::vector< int > > m_nameToObjectGroup
 
std::unordered_set< std::shared_ptr< EvaluateCallback > > m_evaluateCallbacks
 
bool m_customPreviewEnabled = false
 

Friends

class EvaluateCallback
 
class PromiseHandlerTracker
 

Detailed Description

Definition at line 77 of file injected-script.h.

Constructor & Destructor Documentation

◆ InjectedScript() [1/2]

v8_inspector::InjectedScript::InjectedScript ( InspectedContext * context,
int sessionId )

Definition at line 400 of file injected-script.cc.

◆ ~InjectedScript()

v8_inspector::InjectedScript::~InjectedScript ( )

Definition at line 403 of file injected-script.cc.

Here is the call graph for this function:

◆ InjectedScript() [2/2]

v8_inspector::InjectedScript::InjectedScript ( const InjectedScript & )
delete

Member Function Documentation

◆ addExceptionToDetails()

Response v8_inspector::InjectedScript::addExceptionToDetails ( v8::Local< v8::Value > exception,
protocol::Runtime::ExceptionDetails * exceptionDetails,
const String16 & objectGroup )
private

Definition at line 879 of file injected-script.cc.

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

◆ addPromiseCallback()

void v8_inspector::InjectedScript::addPromiseCallback ( V8InspectorSessionImpl * session,
v8::MaybeLocal< v8::Value > value,
const String16 & objectGroup,
std::unique_ptr< WrapOptions > wrapOptions,
bool replMode,
bool throwOnSideEffect,
std::shared_ptr< EvaluateCallback > callback )

Definition at line 746 of file injected-script.cc.

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

◆ bindObject()

String16 v8_inspector::InjectedScript::bindObject ( v8::Local< v8::Value > value,
const String16 & groupName )

Definition at line 1142 of file injected-script.cc.

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

◆ bindRemoteObjectIfNeeded()

Response v8_inspector::InjectedScript::bindRemoteObjectIfNeeded ( int sessionId,
v8::Local< v8::Context > context,
v8::Local< v8::Value > value,
const String16 & groupName,
protocol::Runtime::RemoteObject * remoteObject )
staticprivate

Definition at line 1157 of file injected-script.cc.

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

◆ commandLineAPI()

v8::Local< v8::Object > v8_inspector::InjectedScript::commandLineAPI ( )
private

Definition at line 990 of file injected-script.cc.

Here is the call graph for this function:

◆ context()

InspectedContext * v8_inspector::InjectedScript::context ( ) const
inline

Definition at line 84 of file injected-script.h.

Here is the caller graph for this function:

◆ createExceptionDetails() [1/2]

Response v8_inspector::InjectedScript::createExceptionDetails ( const v8::TryCatch & tryCatch,
const String16 & groupName,
std::unique_ptr< protocol::Runtime::ExceptionDetails > * result )

Definition at line 895 of file injected-script.cc.

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

◆ createExceptionDetails() [2/2]

Response v8_inspector::InjectedScript::createExceptionDetails ( v8::Local< v8::Message > message,
v8::Local< v8::Value > exception,
const String16 & groupName,
std::unique_ptr< protocol::Runtime::ExceptionDetails > * result )

Definition at line 904 of file injected-script.cc.

Here is the call graph for this function:

◆ deleteEvaluateCallback()

void v8_inspector::InjectedScript::deleteEvaluateCallback ( std::shared_ptr< EvaluateCallback > callback)
private

Definition at line 785 of file injected-script.cc.

Here is the caller graph for this function:

◆ discardEvaluateCallbacks()

void v8_inspector::InjectedScript::discardEvaluateCallbacks ( )
private

Definition at line 776 of file injected-script.cc.

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

◆ findObject()

Response v8_inspector::InjectedScript::findObject ( const RemoteObjectId & objectId,
v8::Local< v8::Value > * outObject ) const

Definition at line 792 of file injected-script.cc.

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

◆ getInternalAndPrivateProperties()

Response v8_inspector::InjectedScript::getInternalAndPrivateProperties ( v8::Local< v8::Value > ,
const String16 & groupName,
bool accessorPropertiesOnly,
std::unique_ptr< protocol::Array< protocol::Runtime::InternalPropertyDescriptor > > * internalProperties,
std::unique_ptr< protocol::Array< protocol::Runtime::PrivatePropertyDescriptor > > * privateProperties )

Definition at line 503 of file injected-script.cc.

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

◆ getProperties()

Response v8_inspector::InjectedScript::getProperties ( v8::Local< v8::Object > ,
const String16 & groupName,
bool ownProperties,
bool accessorPropertiesOnly,
bool nonIndexedPropertiesOnly,
const WrapOptions & wrapOptions,
std::unique_ptr< protocol::Array< protocol::Runtime::PropertyDescriptor > > * result,
std::unique_ptr< protocol::Runtime::ExceptionDetails > *  )

Definition at line 420 of file injected-script.cc.

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

◆ lastEvaluationResult()

v8::Local< v8::Value > v8_inspector::InjectedScript::lastEvaluationResult ( ) const

Definition at line 820 of file injected-script.cc.

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

◆ objectGroupName()

String16 v8_inspector::InjectedScript::objectGroupName ( const RemoteObjectId & objectId) const

Definition at line 801 of file injected-script.cc.

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

◆ operator=()

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

◆ releaseObject()

void v8_inspector::InjectedScript::releaseObject ( const String16 & objectId)

Definition at line 596 of file injected-script.cc.

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

◆ releaseObjectGroup()

void v8_inspector::InjectedScript::releaseObjectGroup ( const String16 & objectGroup)

Definition at line 807 of file injected-script.cc.

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

◆ resolveCallArgument()

Response v8_inspector::InjectedScript::resolveCallArgument ( protocol::Runtime::CallArgument * callArgument,
v8::Local< v8::Value > * result )

Definition at line 831 of file injected-script.cc.

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

◆ setCustomObjectFormatterEnabled()

void v8_inspector::InjectedScript::setCustomObjectFormatterEnabled ( bool enabled)

Definition at line 816 of file injected-script.cc.

Here is the caller graph for this function:

◆ setLastEvaluationResult()

void v8_inspector::InjectedScript::setLastEvaluationResult ( v8::Local< v8::Value > result)

Definition at line 826 of file injected-script.cc.

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

◆ unbindObject()

void v8_inspector::InjectedScript::unbindObject ( int id)
private

Definition at line 1180 of file injected-script.cc.

Here is the caller graph for this function:

◆ wrapEvaluateResult()

Response v8_inspector::InjectedScript::wrapEvaluateResult ( v8::MaybeLocal< v8::Value > maybeResultValue,
const v8::TryCatch & tryCatch,
const String16 & objectGroup,
const WrapOptions & wrapOptions,
bool throwOnSideEffect,
std::unique_ptr< protocol::Runtime::RemoteObject > * result,
std::unique_ptr< protocol::Runtime::ExceptionDetails > * exceptionDetails )

Definition at line 946 of file injected-script.cc.

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

◆ wrapObject() [1/2]

Response v8_inspector::InjectedScript::wrapObject ( v8::Local< v8::Value > value,
const String16 & groupName,
const WrapOptions & wrapOptions,
std::unique_ptr< protocol::Runtime::RemoteObject > * result )

Definition at line 602 of file injected-script.cc.

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

◆ wrapObject() [2/2]

Response v8_inspector::InjectedScript::wrapObject ( v8::Local< v8::Value > value,
const String16 & groupName,
const WrapOptions & wrapOptions,
v8::MaybeLocal< v8::Value > customPreviewConfig,
int maxCustomPreviewDepth,
std::unique_ptr< protocol::Runtime::RemoteObject > * result )

Definition at line 610 of file injected-script.cc.

Here is the call graph for this function:

◆ wrapObjectMirror()

Response v8_inspector::InjectedScript::wrapObjectMirror ( const ValueMirror & mirror,
const String16 & groupName,
const WrapOptions & wrapOptions,
v8::MaybeLocal< v8::Value > customPreviewConfig,
int maxCustomPreviewDepth,
std::unique_ptr< protocol::Runtime::RemoteObject > * result )

Definition at line 623 of file injected-script.cc.

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

◆ wrapTable()

std::unique_ptr< protocol::Runtime::RemoteObject > v8_inspector::InjectedScript::wrapTable ( v8::Local< v8::Object > table,
v8::MaybeLocal< v8::Array > columns )

Definition at line 683 of file injected-script.cc.

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

Friends And Related Symbol Documentation

◆ EvaluateCallback

friend class EvaluateCallback
friend

Definition at line 235 of file injected-script.h.

◆ PromiseHandlerTracker

friend class PromiseHandlerTracker
friend

Definition at line 236 of file injected-script.h.

Member Data Documentation

◆ m_commandLineAPI

v8::Global<v8::Object> v8_inspector::InjectedScript::m_commandLineAPI
private

Definition at line 256 of file injected-script.h.

◆ m_context

InspectedContext* v8_inspector::InjectedScript::m_context
private

Definition at line 253 of file injected-script.h.

◆ m_customPreviewEnabled

bool v8_inspector::InjectedScript::m_customPreviewEnabled = false
private

Definition at line 262 of file injected-script.h.

◆ m_evaluateCallbacks

std::unordered_set<std::shared_ptr<EvaluateCallback> > v8_inspector::InjectedScript::m_evaluateCallbacks
private

Definition at line 261 of file injected-script.h.

◆ m_idToObjectGroupName

std::unordered_map<int, String16> v8_inspector::InjectedScript::m_idToObjectGroupName
private

Definition at line 259 of file injected-script.h.

◆ m_idToWrappedObject

std::unordered_map<int, v8::Global<v8::Value> > v8_inspector::InjectedScript::m_idToWrappedObject
private

Definition at line 258 of file injected-script.h.

◆ m_lastBoundObjectId

int v8_inspector::InjectedScript::m_lastBoundObjectId = 1
private

Definition at line 257 of file injected-script.h.

◆ m_lastEvaluationResult

v8::Global<v8::Value> v8_inspector::InjectedScript::m_lastEvaluationResult
private

Definition at line 255 of file injected-script.h.

◆ m_nameToObjectGroup

std::unordered_map<String16, std::vector<int> > v8_inspector::InjectedScript::m_nameToObjectGroup
private

Definition at line 260 of file injected-script.h.

◆ m_sessionId

int v8_inspector::InjectedScript::m_sessionId
private

Definition at line 254 of file injected-script.h.


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