Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src,inspector: fix method name, output format #9627

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/inspector_agent.cc
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ std::string MapToString(const std::map<std::string, std::string> object) {
json << name_value.second << "\"";
first = false;
}
json << "\n} ]";
json << "\n} ]\n\n";
return json.str();
}

Expand Down Expand Up @@ -250,7 +250,7 @@ class AgentImpl {
void WaitForFrontendMessage();
void NotifyMessageReceived();
State ToState(State state);
void SendTargentsListResponse(InspectorSocket* socket);
void SendListResponse(InspectorSocket* socket);
bool RespondToGet(InspectorSocket* socket, const std::string& path);

uv_sem_t start_sem_;
Expand Down Expand Up @@ -677,7 +677,7 @@ void AgentImpl::OnRemoteDataIO(InspectorSocket* socket,
}
}

void AgentImpl::SendTargentsListResponse(InspectorSocket* socket) {
void AgentImpl::SendListResponse(InspectorSocket* socket) {
std::map<std::string, std::string> response;
response["description"] = "node.js instance";
response["faviconUrl"] = "https://nodejs.org/static/favicon.ico";
Expand Down Expand Up @@ -710,7 +710,7 @@ bool AgentImpl::RespondToGet(InspectorSocket* socket, const std::string& path) {
return false;

if (match_path_segment(command, "list") || command[0] == '\0') {
SendTargentsListResponse(socket);
SendListResponse(socket);
return true;
} else if (match_path_segment(command, "protocol")) {
SendProtocolJson(socket);
Expand Down