#include "src/inspector/v8-inspector-session-impl.h"
#include "../../third_party/inspector_protocol/crdtp/cbor.h"
#include "../../third_party/inspector_protocol/crdtp/dispatch.h"
#include "../../third_party/inspector_protocol/crdtp/json.h"
#include "include/v8-context.h"
#include "include/v8-microtask-queue.h"
#include "src/base/logging.h"
#include "src/base/macros.h"
#include "src/inspector/injected-script.h"
#include "src/inspector/inspected-context.h"
#include "src/inspector/protocol/Protocol.h"
#include "src/inspector/remote-object-id.h"
#include "src/inspector/search-util.h"
#include "src/inspector/string-util.h"
#include "src/inspector/v8-console-agent-impl.h"
#include "src/inspector/v8-debugger-agent-impl.h"
#include "src/inspector/v8-debugger-barrier.h"
#include "src/inspector/v8-debugger.h"
#include "src/inspector/v8-heap-profiler-agent-impl.h"
#include "src/inspector/v8-inspector-impl.h"
#include "src/inspector/v8-profiler-agent-impl.h"
#include "src/inspector/v8-runtime-agent-impl.h"
#include "src/inspector/v8-schema-agent-impl.h"
namespace v8_inspector {
namespace {
span;
SpanFrom;
Status;
CheckCBORMessage;
ConvertCBORToJSON;
ConvertJSONToCBOR;
bool IsCBORMessage(StringView msg) { … }
Status ConvertToCBOR(StringView state, std::vector<uint8_t>* cbor) { … }
std::unique_ptr<protocol::DictionaryValue> ParseState(StringView state) { … }
}
bool V8InspectorSession::canDispatchMethod(StringView method) { … }
int V8ContextInfo::executionContextId(v8::Local<v8::Context> context) { … }
std::unique_ptr<V8InspectorSessionImpl> V8InspectorSessionImpl::create(
V8InspectorImpl* inspector, int contextGroupId, int sessionId,
V8Inspector::Channel* channel, StringView state,
V8Inspector::ClientTrustLevel clientTrustLevel,
std::shared_ptr<V8DebuggerBarrier> debuggerBarrier) { … }
V8InspectorSessionImpl::V8InspectorSessionImpl(
V8InspectorImpl* inspector, int contextGroupId, int sessionId,
V8Inspector::Channel* channel, StringView savedState,
V8Inspector::ClientTrustLevel clientTrustLevel,
std::shared_ptr<V8DebuggerBarrier> debuggerBarrier)
: … { … }
V8InspectorSessionImpl::~V8InspectorSessionImpl() { … }
protocol::DictionaryValue* V8InspectorSessionImpl::agentState(
const String16& name) { … }
std::unique_ptr<StringBuffer> V8InspectorSessionImpl::serializeForFrontend(
std::unique_ptr<protocol::Serializable> message) { … }
void V8InspectorSessionImpl::SendProtocolResponse(
int callId, std::unique_ptr<protocol::Serializable> message) { … }
void V8InspectorSessionImpl::SendProtocolNotification(
std::unique_ptr<protocol::Serializable> message) { … }
void V8InspectorSessionImpl::FallThrough(int callId,
const v8_crdtp::span<uint8_t> method,
v8_crdtp::span<uint8_t> message) { … }
void V8InspectorSessionImpl::FlushProtocolNotifications() { … }
void V8InspectorSessionImpl::reset() { … }
void V8InspectorSessionImpl::discardInjectedScripts() { … }
Response V8InspectorSessionImpl::findInjectedScript(
int contextId, InjectedScript*& injectedScript) { … }
Response V8InspectorSessionImpl::findInjectedScript(
RemoteObjectIdBase* objectId, InjectedScript*& injectedScript) { … }
void V8InspectorSessionImpl::releaseObjectGroup(StringView objectGroup) { … }
void V8InspectorSessionImpl::releaseObjectGroup(const String16& objectGroup) { … }
bool V8InspectorSessionImpl::unwrapObject(
std::unique_ptr<StringBuffer>* error, StringView objectId,
v8::Local<v8::Value>* object, v8::Local<v8::Context>* context,
std::unique_ptr<StringBuffer>* objectGroup) { … }
Response V8InspectorSessionImpl::unwrapObject(const String16& objectId,
v8::Local<v8::Value>* object,
v8::Local<v8::Context>* context,
String16* objectGroup) { … }
std::unique_ptr<protocol::Runtime::API::RemoteObject>
V8InspectorSessionImpl::wrapObject(v8::Local<v8::Context> context,
v8::Local<v8::Value> value,
StringView groupName, bool generatePreview) { … }
std::unique_ptr<protocol::Runtime::RemoteObject>
V8InspectorSessionImpl::wrapObject(v8::Local<v8::Context> context,
v8::Local<v8::Value> value,
const String16& groupName,
bool generatePreview) { … }
std::unique_ptr<protocol::Runtime::RemoteObject>
V8InspectorSessionImpl::wrapTable(v8::Local<v8::Context> context,
v8::Local<v8::Object> table,
v8::MaybeLocal<v8::Array> columns) { … }
void V8InspectorSessionImpl::setCustomObjectFormatterEnabled(bool enabled) { … }
void V8InspectorSessionImpl::reportAllContexts(V8RuntimeAgentImpl* agent) { … }
void V8InspectorSessionImpl::dispatchProtocolMessage(StringView message) { … }
std::vector<uint8_t> V8InspectorSessionImpl::state() { … }
std::vector<std::unique_ptr<protocol::Schema::API::Domain>>
V8InspectorSessionImpl::supportedDomains() { … }
std::vector<std::unique_ptr<protocol::Schema::Domain>>
V8InspectorSessionImpl::supportedDomainsImpl() { … }
void V8InspectorSessionImpl::addInspectedObject(
std::unique_ptr<V8InspectorSession::Inspectable> inspectable) { … }
V8InspectorSession::Inspectable* V8InspectorSessionImpl::inspectedObject(
unsigned num) { … }
void V8InspectorSessionImpl::schedulePauseOnNextStatement(
StringView breakReason, StringView breakDetails) { … }
void V8InspectorSessionImpl::cancelPauseOnNextStatement() { … }
void V8InspectorSessionImpl::breakProgram(StringView breakReason,
StringView breakDetails) { … }
void V8InspectorSessionImpl::setSkipAllPauses(bool skip) { … }
void V8InspectorSessionImpl::resume(bool terminateOnResume) { … }
void V8InspectorSessionImpl::stepOver() { … }
std::vector<std::unique_ptr<protocol::Debugger::API::SearchMatch>>
V8InspectorSessionImpl::searchInTextByLines(StringView text, StringView query,
bool caseSensitive, bool isRegex) { … }
void V8InspectorSessionImpl::triggerPreciseCoverageDeltaUpdate(
StringView occasion) { … }
V8InspectorSession::EvaluateResult V8InspectorSessionImpl::evaluate(
v8::Local<v8::Context> context, StringView expression,
bool includeCommandLineAPI) { … }
void V8InspectorSessionImpl::stop() { … }
}