Skip to content
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: 6 additions & 2 deletions src/inspector_agent.cc
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,11 @@ void SendTargentsListResponse(inspector_socket_t* socket, int port) {
char buffer[sizeof(LIST_RESPONSE_TEMPLATE) + 4096];
char title[2048]; // uv_get_process_title trims the title if too long
int err = uv_get_process_title(title, sizeof(title));
ASSERT_EQ(0, err);
if (err != 0) {
snprintf(title, sizeof(title), "Node.js");
}
char* c = title;
while (!c) {
while (*c != '\0') {
if (*c < ' ' || *c == '\"') {
*c = '_';
}
Expand Down Expand Up @@ -323,6 +325,8 @@ AgentImpl::AgentImpl(Environment* env) : port_(0),
int err;
err = uv_sem_init(&start_sem_, 0);
CHECK_EQ(err, 0);
memset(&data_written_, 0, sizeof(data_written_));
memset(&io_thread_req_, 0, sizeof(io_thread_req_));
}

AgentImpl::~AgentImpl() {
Expand Down