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

Namespaces

namespace  ConsoleAgentState
 
namespace  DebuggerAgentState
 
namespace  HeapProfilerAgentState
 
namespace  internal
 
namespace  ProfilerAgentState
 
namespace  protocol
 
namespace  V8RuntimeAgentImplState
 

Classes

class  AsyncStackTrace
 
struct  DeepSerializationResult
 
struct  DeepSerializedValue
 
struct  DisassemblyChunk
 
class  DisassemblyCollectorImpl
 
class  EvaluateCallback
 
class  InjectedScript
 
class  InspectedContext
 
struct  InternalPropertyMirror
 
struct  PrivatePropertyMirror
 
class  PromiseHandlerTracker
 
struct  PropertyMirror
 
class  RemoteCallFrameId
 
class  RemoteObjectId
 
class  RemoteObjectIdBase
 
class  StackFrame
 
class  String16
 
class  String16Builder
 
class  StringBuffer
 
class  StringView
 
class  TaskInfo
 
class  V8Console
 
class  V8ConsoleAgentImpl
 
class  V8ConsoleMessage
 
class  V8ConsoleMessageStorage
 
class  V8ContextInfo
 
class  V8Debugger
 
class  V8DebuggerAgentImpl
 
class  V8DebuggerBarrier
 
class  V8DebuggerId
 
class  V8DebuggerScript
 
class  V8DeepSerializer
 
class  V8HeapProfilerAgentImpl
 
class  V8Inspector
 
class  V8InspectorClient
 
class  V8InspectorImpl
 
class  V8InspectorSession
 
class  V8InspectorSessionImpl
 
class  V8ProfilerAgentImpl
 
class  V8Regex
 
class  V8RuntimeAgentImpl
 
class  V8SchemaAgentImpl
 
class  V8SerializationDuplicateTracker
 
struct  V8StackFrame
 
class  V8StackTrace
 
struct  V8StackTraceId
 
class  V8StackTraceImpl
 
class  ValueMirror
 
struct  WrapOptions
 
struct  WrapSerializationOptions
 

Typedefs

using UChar = char16_t
 
using TerminateExecutionCallback
 

Enumerations

enum class  V8InternalValueType {
  kNone , kEntry , kScope , kScopeList ,
  kPrivateMethodList , kPrivateMethod
}
 
enum class  V8MessageOrigin { kConsole , kException , kRevokedException }
 
enum class  ConsoleAPIType {
  kLog , kDebug , kInfo , kError ,
  kWarning , kDir , kDirXML , kTable ,
  kTrace , kStartGroup , kStartGroupCollapsed , kEndGroup ,
  kClear , kAssert , kTimeEnd , kCount
}
 
enum class  WrapMode { kJson , kIdOnly , kPreview , kDeep }
 
enum  MultilineMode { MultilineDisabled , MultilineEnabled }
 

Functions

int32_t computeCrc32 (const String16 &text)
 
void generateCustomPreview (v8::Isolate *isolate, int sessionId, const String16 &groupName, v8::Local< v8::Object > object, v8::MaybeLocal< v8::Value > maybeConfig, int maxDepth, std::unique_ptr< CustomPreview > *preview)
 
void generateCustomPreview (v8::Isolate *isolate, int sessionId, const String16 &groupName, v8::Local< v8::Object > object, v8::MaybeLocal< v8::Value > config, int maxDepth, std::unique_ptr< protocol::Runtime::CustomPreview > *preview)
 
std::vector< std::unique_ptr< protocol::Debugger::SearchMatch > > searchInTextByLinesImpl (V8InspectorSession *session, const String16 &text, const String16 &query, const bool caseSensitive, const bool isRegex)
 
String16 findSourceURL (const String16 &content, bool multiline)
 
String16 findSourceMapURL (const String16 &content, bool multiline)
 
String16 operator+ (const char *a, const String16 &b)
 
v8::Local< v8::StringtoV8String (v8::Isolate *isolate, const String16 &string)
 
v8::Local< v8::StringtoV8StringInternalized (v8::Isolate *isolate, const String16 &string)
 
v8::Local< v8::StringtoV8StringInternalized (v8::Isolate *isolate, const char *str)
 
v8::Local< v8::StringtoV8String (v8::Isolate *isolate, const StringView &string)
 
String16 toProtocolString (v8::Isolate *isolate, v8::Local< v8::String > value)
 
String16 toProtocolStringWithTypeCheck (v8::Isolate *isolate, v8::Local< v8::Value > value)
 
String16 toString16 (const StringView &string)
 
StringView toStringView (const String16 &string)
 
bool stringViewStartsWith (const StringView &string, const char *prefix)
 
std::unique_ptr< StringBufferStringBufferFrom (String16 str)
 
std::unique_ptr< StringBufferStringBufferFrom (std::vector< uint8_t > str)
 
String16 stackTraceIdToString (uintptr_t id)
 
template<size_t N>
StringView toStringView (const char *str[N])
 
void SetMaxAsyncTaskStacksForTest (V8Inspector *inspector, int limit)
 
void DumpAsyncTaskStacksStateForTest (V8Inspector *inspector)
 
static void setFunctionBreakpoint (ConsoleHelper &helper, int sessionId, v8::Local< v8::Function > function, V8DebuggerAgentImpl::BreakpointSource source, v8::Local< v8::String > condition, bool enable)
 
static void inspectImpl (const v8::FunctionCallbackInfo< v8::Value > &info, v8::Local< v8::Value > value, int sessionId, InspectRequest request, V8InspectorImpl *inspector)
 
static bool isCommandLineAPIGetter (const String16 &name)
 
static String16 getScriptLanguage (const V8DebuggerScript &script)
 
std::string UTF16ToUTF8 (const UChar *stringStart, size_t length)
 
std::basic_string< UCharUTF8ToUTF16 (const char *stringStart, size_t length)
 
v8::Maybe< bool > createDataProperty (v8::Local< v8::Context > context, v8::Local< v8::Object > object, v8::Local< v8::Name > key, v8::Local< v8::Value > value)
 
v8::Maybe< bool > createDataProperty (v8::Local< v8::Context > context, v8::Local< v8::Array > array, int index, v8::Local< v8::Value > value)
 
Response toProtocolValue (v8::Local< v8::Context > context, v8::Local< v8::Value > value, int maxDepth, std::unique_ptr< protocol::Value > *result)
 
Response arrayToProtocolValue (v8::Local< v8::Context > context, v8::Local< v8::Array > array, int maxDepth, std::unique_ptr< protocol::ListValue > *result)
 
Response objectToProtocolValue (v8::Local< v8::Context > context, v8::Local< v8::Object > object, int maxDepth, std::unique_ptr< protocol::DictionaryValue > *result)
 
std::unique_ptr< protocol::FundamentalValue > toProtocolValue (double doubleValue)
 
Response toProtocolValue (v8::Local< v8::Context > context, v8::Local< v8::Value > value, std::unique_ptr< protocol::Value > *result)
 
std::unique_ptr< ValueMirrorclientMirror (v8::Local< v8::Context > context, v8::Local< v8::Object > value, const String16 &subtype)
 

Variables

static uint32_t kCrcTable [256]
 
const int kMaxCustomPreviewDepth = 20
 
static const char kBacktraceObjectGroup [] = "backtrace"
 
static const char kDebuggerNotEnabled [] = "Debugger agent is not enabled"
 
static const char kDebuggerNotPaused []
 
static const size_t kBreakpointHintMaxLength = 128
 
static const intptr_t kBreakpointHintMaxSearchOffset = 80 * 10
 
static const size_t kMaxNumBreakpoints = 1000
 
static constexpr v8::base::TimeDelta kDefaultTimerDelay
 
static const int kMaxProtocolDepth = 1000
 

Typedef Documentation

◆ TerminateExecutionCallback

Initial value:
protocol::Runtime::Backend::TerminateExecutionCallback

Definition at line 48 of file v8-debugger.h.

◆ UChar

using v8_inspector::UChar = char16_t

Definition at line 22 of file string-16.h.

Enumeration Type Documentation

◆ ConsoleAPIType

enum class v8_inspector::ConsoleAPIType
strong
Enumerator
kLog 
kDebug 
kInfo 
kError 
kWarning 
kDir 
kDirXML 
kTable 
kTrace 
kStartGroup 
kStartGroupCollapsed 
kEndGroup 
kClear 
kAssert 
kTimeEnd 
kCount 

Definition at line 29 of file v8-console-message.h.

◆ MultilineMode

Enumerator
MultilineDisabled 
MultilineEnabled 

Definition at line 20 of file v8-regex.h.

◆ V8InternalValueType

Enumerator
kNone 
kEntry 
kScope 
kScopeList 
kPrivateMethodList 
kPrivateMethod 

Definition at line 31 of file inspected-context.h.

◆ V8MessageOrigin

enum class v8_inspector::V8MessageOrigin
strong
Enumerator
kConsole 
kException 
kRevokedException 

Definition at line 27 of file v8-console-message.h.

◆ WrapMode

enum class v8_inspector::WrapMode
strong
Enumerator
kJson 
kIdOnly 
kPreview 
kDeep 

Definition at line 35 of file v8-debugger.h.

Function Documentation

◆ arrayToProtocolValue()

protocol::Response v8_inspector::arrayToProtocolValue ( v8::Local< v8::Context > context,
v8::Local< v8::Array > array,
int maxDepth,
std::unique_ptr< protocol::ListValue > * result )

Definition at line 45 of file value-mirror.cc.

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

◆ clientMirror()

std::unique_ptr< ValueMirror > v8_inspector::clientMirror ( v8::Local< v8::Context > context,
v8::Local< v8::Object > value,
const String16 & subtype )

Definition at line 1738 of file value-mirror.cc.

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

◆ computeCrc32()

int32_t v8_inspector::computeCrc32 ( const String16 & text)

Definition at line 72 of file crc32.cc.

Here is the call graph for this function:

◆ createDataProperty() [1/2]

v8::Maybe< bool > v8_inspector::createDataProperty ( v8::Local< v8::Context > context,
v8::Local< v8::Array > array,
int index,
v8::Local< v8::Value > value )

Definition at line 24 of file v8-value-utils.cc.

◆ createDataProperty() [2/2]

v8::Maybe< bool > v8_inspector::createDataProperty ( v8::Local< v8::Context > context,
v8::Local< v8::Object > object,
v8::Local< v8::Name > key,
v8::Local< v8::Value > value )

Definition at line 13 of file v8-value-utils.cc.

Here is the caller graph for this function:

◆ DumpAsyncTaskStacksStateForTest()

V8_EXPORT void v8_inspector::DumpAsyncTaskStacksStateForTest ( V8Inspector * inspector)

Definition at line 18 of file test-interface.cc.

◆ findSourceMapURL()

String16 v8_inspector::findSourceMapURL ( const String16 & content,
bool multiline )

Definition at line 164 of file search-util.cc.

Here is the caller graph for this function:

◆ findSourceURL()

String16 v8_inspector::findSourceURL ( const String16 & content,
bool multiline )

Definition at line 160 of file search-util.cc.

Here is the caller graph for this function:

◆ generateCustomPreview() [1/2]

void v8_inspector::generateCustomPreview ( v8::Isolate * isolate,
int sessionId,
const String16 & groupName,
v8::Local< v8::Object > object,
v8::MaybeLocal< v8::Value > config,
int maxDepth,
std::unique_ptr< protocol::Runtime::CustomPreview > * preview )

◆ generateCustomPreview() [2/2]

void v8_inspector::generateCustomPreview ( v8::Isolate * isolate,
int sessionId,
const String16 & groupName,
v8::Local< v8::Object > object,
v8::MaybeLocal< v8::Value > maybeConfig,
int maxDepth,
std::unique_ptr< CustomPreview > * preview )

Definition at line 259 of file custom-preview.cc.

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

◆ getScriptLanguage()

static String16 v8_inspector::getScriptLanguage ( const V8DebuggerScript & script)
static

Definition at line 1883 of file v8-debugger-agent-impl.cc.

Here is the caller graph for this function:

◆ inspectImpl()

static void v8_inspector::inspectImpl ( const v8::FunctionCallbackInfo< v8::Value > & info,
v8::Local< v8::Value > value,
int sessionId,
InspectRequest request,
V8InspectorImpl * inspector )
static

Definition at line 743 of file v8-console.cc.

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

◆ isCommandLineAPIGetter()

static bool v8_inspector::isCommandLineAPIGetter ( const String16 & name)
static

Definition at line 928 of file v8-console.cc.

Here is the caller graph for this function:

◆ objectToProtocolValue()

protocol::Response v8_inspector::objectToProtocolValue ( v8::Local< v8::Context > context,
v8::Local< v8::Object > object,
int maxDepth,
std::unique_ptr< protocol::DictionaryValue > * result )

Definition at line 64 of file value-mirror.cc.

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

◆ operator+()

String16 v8_inspector::operator+ ( const char * a,
const String16 & b )
inline

Definition at line 126 of file string-16.h.

◆ searchInTextByLinesImpl()

std::vector< std::unique_ptr< protocol::Debugger::SearchMatch > > v8_inspector::searchInTextByLinesImpl ( V8InspectorSession * session,
const String16 & text,
const String16 & query,
const bool caseSensitive,
const bool isRegex )

Definition at line 144 of file search-util.cc.

Here is the caller graph for this function:

◆ setFunctionBreakpoint()

static void v8_inspector::setFunctionBreakpoint ( ConsoleHelper & helper,
int sessionId,
v8::Local< v8::Function > function,
V8DebuggerAgentImpl::BreakpointSource source,
v8::Local< v8::String > condition,
bool enable )
static

Definition at line 655 of file v8-console.cc.

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

◆ SetMaxAsyncTaskStacksForTest()

V8_EXPORT void v8_inspector::SetMaxAsyncTaskStacksForTest ( V8Inspector * inspector,
int limit )

Definition at line 12 of file test-interface.cc.

◆ stackTraceIdToString()

String16 v8_inspector::stackTraceIdToString ( uintptr_t id)

Definition at line 240 of file string-util.cc.

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

◆ StringBufferFrom() [1/2]

std::unique_ptr< StringBuffer > v8_inspector::StringBufferFrom ( std::vector< uint8_t > str)

Definition at line 235 of file string-util.cc.

◆ StringBufferFrom() [2/2]

std::unique_ptr< StringBuffer > v8_inspector::StringBufferFrom ( String16 str)

Definition at line 230 of file string-util.cc.

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

◆ stringViewStartsWith()

bool v8_inspector::stringViewStartsWith ( const StringView & string,
const char * prefix )

Definition at line 170 of file string-util.cc.

Here is the caller graph for this function:

◆ toProtocolString()

String16 v8_inspector::toProtocolString ( v8::Isolate * isolate,
v8::Local< v8::String > value )

Definition at line 143 of file string-util.cc.

Here is the caller graph for this function:

◆ toProtocolStringWithTypeCheck()

String16 v8_inspector::toProtocolStringWithTypeCheck ( v8::Isolate * isolate,
v8::Local< v8::Value > value )

Definition at line 151 of file string-util.cc.

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

◆ toProtocolValue() [1/3]

std::unique_ptr< protocol::FundamentalValue > v8_inspector::toProtocolValue ( double doubleValue)

Definition at line 101 of file value-mirror.cc.

Here is the call graph for this function:

◆ toProtocolValue() [2/3]

protocol::Response v8_inspector::toProtocolValue ( v8::Local< v8::Context > context,
v8::Local< v8::Value > value,
int maxDepth,
std::unique_ptr< protocol::Value > * result )

Definition at line 115 of file value-mirror.cc.

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

◆ toProtocolValue() [3/3]

Response v8_inspector::toProtocolValue ( v8::Local< v8::Context > context,
v8::Local< v8::Value > value,
std::unique_ptr< protocol::Value > * result )

Definition at line 160 of file value-mirror.cc.

Here is the call graph for this function:

◆ toString16()

V8_EXPORT_PRIVATE String16 v8_inspector::toString16 ( const StringView & string)

Definition at line 157 of file string-util.cc.

Here is the caller graph for this function:

◆ toStringView() [1/2]

template<size_t N>
StringView v8_inspector::toStringView ( const char * str[N])

Definition at line 81 of file string-util.h.

◆ toStringView() [2/2]

V8_EXPORT_PRIVATE StringView v8_inspector::toStringView ( const String16 & string)

Definition at line 165 of file string-util.cc.

Here is the caller graph for this function:

◆ toV8String() [1/2]

v8::Local< v8::String > v8_inspector::toV8String ( v8::Isolate * isolate,
const String16 & string )

Definition at line 102 of file string-util.cc.

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

◆ toV8String() [2/2]

v8::Local< v8::String > v8_inspector::toV8String ( v8::Isolate * isolate,
const StringView & string )

Definition at line 128 of file string-util.cc.

Here is the call graph for this function:

◆ toV8StringInternalized() [1/2]

v8::Local< v8::String > v8_inspector::toV8StringInternalized ( v8::Isolate * isolate,
const char * str )

Definition at line 122 of file string-util.cc.

Here is the call graph for this function:

◆ toV8StringInternalized() [2/2]

v8::Local< v8::String > v8_inspector::toV8StringInternalized ( v8::Isolate * isolate,
const String16 & string )

Definition at line 111 of file string-util.cc.

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

◆ UTF16ToUTF8()

std::string v8_inspector::UTF16ToUTF8 ( const UChar * stringStart,
size_t length )

Definition at line 343 of file v8-string-conversions.cc.

Here is the caller graph for this function:

◆ UTF8ToUTF16()

std::basic_string< char16_t > v8_inspector::UTF8ToUTF16 ( const char * stringStart,
size_t length )

Definition at line 386 of file v8-string-conversions.cc.

Here is the caller graph for this function:

Variable Documentation

◆ kBacktraceObjectGroup

const char v8_inspector::kBacktraceObjectGroup[] = "backtrace"
static

Definition at line 68 of file v8-debugger-agent-impl.cc.

◆ kBreakpointHintMaxLength

const size_t v8_inspector::kBreakpointHintMaxLength = 128
static

Definition at line 73 of file v8-debugger-agent-impl.cc.

◆ kBreakpointHintMaxSearchOffset

const intptr_t v8_inspector::kBreakpointHintMaxSearchOffset = 80 * 10
static

Definition at line 74 of file v8-debugger-agent-impl.cc.

◆ kCrcTable

uint32_t v8_inspector::kCrcTable[256]
static

Definition at line 18 of file crc32.cc.

◆ kDebuggerNotEnabled

const char v8_inspector::kDebuggerNotEnabled[] = "Debugger agent is not enabled"
static

Definition at line 69 of file v8-debugger-agent-impl.cc.

◆ kDebuggerNotPaused

const char v8_inspector::kDebuggerNotPaused[]
static
Initial value:
=
"Can only perform operation while paused."

Definition at line 70 of file v8-debugger-agent-impl.cc.

◆ kDefaultTimerDelay

v8::base::TimeDelta v8_inspector::kDefaultTimerDelay
staticconstexpr
Initial value:
=
static constexpr TimeDelta FromMilliseconds(int64_t milliseconds)
Definition time.h:84

Definition at line 495 of file v8-heap-profiler-agent-impl.cc.

◆ kMaxCustomPreviewDepth

const int v8_inspector::kMaxCustomPreviewDepth = 20

Definition at line 15 of file custom-preview.h.

◆ kMaxNumBreakpoints

const size_t v8_inspector::kMaxNumBreakpoints = 1000
static

Definition at line 77 of file v8-debugger-agent-impl.cc.

◆ kMaxProtocolDepth

const int v8_inspector::kMaxProtocolDepth = 1000
static

Definition at line 38 of file value-mirror.cc.