5#ifndef V8_INSPECTOR_V8_CONSOLE_MESSAGE_H_
6#define V8_INSPECTOR_V8_CONSOLE_MESSAGE_H_
16#include "src/inspector/protocol/Console.h"
17#include "src/inspector/protocol/Forward.h"
18#include "src/inspector/protocol/Runtime.h"
22class InspectedContext;
24class V8InspectorSessionImpl;
25class V8StackTraceImpl;
56 const String16& consoleContext, std::unique_ptr<V8StackTraceImpl>);
60 unsigned lineNumber,
unsigned columnNumber,
61 std::unique_ptr<V8StackTraceImpl>,
int scriptId,
v8::Isolate*,
63 unsigned exceptionId);
66 double timestamp,
const String16& message,
unsigned revokedExceptionId);
71 bool generatePreview)
const;
82 using Arguments = std::vector<std::unique_ptr<v8::Global<v8::Value>>>;
83 std::unique_ptr<protocol::Array<protocol::Runtime::RemoteObject>>
85 std::unique_ptr<protocol::Runtime::RemoteObject>
wrapException(
88 unsigned columnNumber, std::unique_ptr<V8StackTraceImpl>,
117 const std::deque<std::unique_ptr<V8ConsoleMessage>>&
messages()
const {
121 void addMessage(std::unique_ptr<V8ConsoleMessage>);
127 int count(
int contextId,
int consoleContextId,
const String16&
id);
131 std::optional<double>
timeLog(
int contextId,
int consoleContextId,
133 std::optional<double>
timeEnd(
int contextId,
int consoleContextId,
bool countReset(int contextId, int consoleContextId, const String16 &id)
const std::deque< std::unique_ptr< V8ConsoleMessage > > & messages() const
bool shouldReportDeprecationMessage(int contextId, const String16 &method)
void contextDestroyed(int contextId)
void addMessage(std::unique_ptr< V8ConsoleMessage >)
std::optional< double > timeLog(int contextId, int consoleContextId, const String16 &label)
V8ConsoleMessageStorage(V8InspectorImpl *, int contextGroupId)
std::map< int, PerContextData > m_data
std::optional< double > timeEnd(int contextId, int consoleContextId, const String16 &label)
std::deque< std::unique_ptr< V8ConsoleMessage > > m_messages
V8InspectorImpl * m_inspector
~V8ConsoleMessageStorage()
std::pair< int, String16 > LabelKey
static std::unique_ptr< V8ConsoleMessage > createForConsoleAPI(v8::Local< v8::Context > v8Context, int contextId, int groupId, V8InspectorImpl *inspector, double timestamp, ConsoleAPIType, v8::MemorySpan< const v8::Local< v8::Value > > arguments, const String16 &consoleContext, std::unique_ptr< V8StackTraceImpl >)
void contextDestroyed(int contextId)
V8MessageOrigin origin() const
void reportToFrontend(protocol::Console::Frontend *) const
std::unique_ptr< V8StackTraceImpl > m_stackTrace
std::unique_ptr< protocol::DictionaryValue > getAssociatedExceptionData(V8InspectorImpl *inspector, V8InspectorSessionImpl *session) const
static std::unique_ptr< V8ConsoleMessage > createForRevokedException(double timestamp, const String16 &message, unsigned revokedExceptionId)
ConsoleAPIType type() const
std::vector< std::unique_ptr< v8::Global< v8::Value > > > Arguments
static std::unique_ptr< V8ConsoleMessage > createForException(double timestamp, const String16 &detailedMessage, const String16 &url, unsigned lineNumber, unsigned columnNumber, std::unique_ptr< V8StackTraceImpl >, int scriptId, v8::Isolate *, const String16 &message, int contextId, v8::Local< v8::Value > exception, unsigned exceptionId)
std::unique_ptr< protocol::Runtime::RemoteObject > wrapException(V8InspectorSessionImpl *, bool generatePreview) const
unsigned m_revokedExceptionId
std::unique_ptr< protocol::Array< protocol::Runtime::RemoteObject > > wrapArguments(V8InspectorSessionImpl *, bool generatePreview) const
String16 m_consoleContext
int estimatedSize() const
String16 m_detailedMessage
void setLocation(const String16 &url, unsigned lineNumber, unsigned columnNumber, std::unique_ptr< V8StackTraceImpl >, int scriptId)
V8ConsoleMessage(V8MessageOrigin, double timestamp, const String16 &message)
std::map< LabelKey, double > m_timers
std::set< String16 > m_reportedDeprecationMessages
std::map< LabelKey, int > m_counters