| Index: third_party/inspector_protocol/lib/DispatcherBase_cpp.template
|
| diff --git a/third_party/inspector_protocol/lib/DispatcherBase_cpp.template b/third_party/inspector_protocol/lib/DispatcherBase_cpp.template
|
| index 0d4a305abe89872af970ba20b9dc8cc1da563a20..7a4cb062a79881a1cf5a4b13ea4ef94baeef52f8 100644
|
| --- a/third_party/inspector_protocol/lib/DispatcherBase_cpp.template
|
| +++ b/third_party/inspector_protocol/lib/DispatcherBase_cpp.template
|
| @@ -248,7 +248,7 @@ void UberDispatcher::registerBackend(const String& name, std::unique_ptr<protoco
|
| m_dispatchers[name] = std::move(dispatcher);
|
| }
|
|
|
| -DispatchResponse::Status UberDispatcher::dispatch(std::unique_ptr<Value> parsedMessage)
|
| +DispatchResponse::Status UberDispatcher::dispatch(std::unique_ptr<Value> parsedMessage, int* outCallId, String* outMethod)
|
| {
|
| if (!parsedMessage) {
|
| reportProtocolErrorTo(m_frontendChannel, DispatchResponse::kParseError, "Message must be a valid JSON");
|
| @@ -263,6 +263,8 @@ DispatchResponse::Status UberDispatcher::dispatch(std::unique_ptr<Value> parsedM
|
| int callId = 0;
|
| protocol::Value* callIdValue = messageObject->get("id");
|
| bool success = callIdValue && callIdValue->asInteger(&callId);
|
| + if (outCallId)
|
| + *outCallId = callId;
|
| if (!success) {
|
| reportProtocolErrorTo(m_frontendChannel, DispatchResponse::kInvalidRequest, "Message must have integer 'id' porperty");
|
| return DispatchResponse::kError;
|
| @@ -271,6 +273,8 @@ DispatchResponse::Status UberDispatcher::dispatch(std::unique_ptr<Value> parsedM
|
| protocol::Value* methodValue = messageObject->get("method");
|
| String method;
|
| success = methodValue && methodValue->asString(&method);
|
| + if (outMethod)
|
| + *outMethod = method;
|
| if (!success) {
|
| reportProtocolErrorTo(m_frontendChannel, callId, DispatchResponse::kInvalidRequest, "Message must have string 'method' porperty", nullptr);
|
| return DispatchResponse::kError;
|
|
|