Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/inspector/v8-inspector-session-impl.cc')
-rw-r--r--deps/v8/src/inspector/v8-inspector-session-impl.cc16
1 files changed, 15 insertions, 1 deletions
diff --git a/deps/v8/src/inspector/v8-inspector-session-impl.cc b/deps/v8/src/inspector/v8-inspector-session-impl.cc
index 1d8d12ac0d1..d37f87a2a77 100644
--- a/deps/v8/src/inspector/v8-inspector-session-impl.cc
+++ b/deps/v8/src/inspector/v8-inspector-session-impl.cc
@@ -170,6 +170,12 @@ void V8InspectorSessionImpl::sendProtocolNotification(
m_channel->sendNotification(MessageBuffer::create(std::move(message)));
}
+void V8InspectorSessionImpl::fallThrough(int callId, const String16& method,
+ const String16& message) {
+ // There's no other layer to handle the command.
+ UNREACHABLE();
+}
+
void V8InspectorSessionImpl::flushProtocolNotifications() {
m_channel->flushProtocolNotifications();
}
@@ -313,7 +319,15 @@ void V8InspectorSessionImpl::reportAllContexts(V8RuntimeAgentImpl* agent) {
void V8InspectorSessionImpl::dispatchProtocolMessage(
const StringView& message) {
- m_dispatcher.dispatch(protocol::StringUtil::parseJSON(message));
+ int callId;
+ String16 method;
+ std::unique_ptr<protocol::Value> parsedMessage =
+ protocol::StringUtil::parseJSON(message);
+ if (m_dispatcher.parseCommand(parsedMessage.get(), &callId, &method)) {
+ // Pass empty string instead of the actual message to save on a conversion.
+ // We're allowed to do so because fall-through is not implemented.
+ m_dispatcher.dispatch(callId, method, std::move(parsedMessage), "");
+ }
}
std::unique_ptr<StringBuffer> V8InspectorSessionImpl::stateJSON() {