Skip to content

Commit

Permalink
src: fix compile warnings introduced in 73ad3f9
Browse files Browse the repository at this point in the history
Fix warnings introduced in commit 73ad3f9 ("inspector: Fix crash for
WS connection"):

* add missing `override` keywords
* remove unused fields and functions

PR-URL: #17649
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
  • Loading branch information
bnoordhuis authored and danbev committed Dec 15, 2017
1 parent 246aeac commit e989cd1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/inspector_socket.cc
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ class WsHandler : public ProtocolHandler {
} while (processed > 0 && !data->empty());
}

void Write(const std::vector<char> data) {
void Write(const std::vector<char> data) override {
std::vector<char> output = encode_frame_hybi17(data);
WriteRaw(output, WriteRequest::Cleanup);
}
Expand Down Expand Up @@ -446,7 +446,7 @@ class HttpHandler : public ProtocolHandler {
}
}

void CancelHandshake() {
void CancelHandshake() override {
const char HANDSHAKE_FAILED_RESPONSE[] =
"HTTP/1.0 400 Bad Request\r\n"
"Content-Type: text/html; charset=UTF-8\r\n\r\n"
Expand Down
11 changes: 1 addition & 10 deletions src/inspector_socket_server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,6 @@ const char* MatchPathSegment(const char* path, const char* expected) {
return nullptr;
}

void OnBufferAlloc(uv_handle_t* handle, size_t len, uv_buf_t* buf) {
buf->base = new char[len];
buf->len = len;
}

void PrintDebuggerReadyMessage(const std::string& host,
int port,
const std::vector<std::string>& ids,
Expand Down Expand Up @@ -235,7 +230,6 @@ class SocketSession {
private:
const int id_;
InspectorSocket::Pointer ws_socket_;
InspectorSocketServer* server_;
const int server_port_;
std::string ws_key_;
};
Expand Down Expand Up @@ -531,10 +525,7 @@ void InspectorSocketServer::Send(int session_id, const std::string& message) {
// InspectorSession tracking
SocketSession::SocketSession(InspectorSocketServer* server, int id,
int server_port)
: id_(id),
server_(server),
server_port_(server_port) { }

: id_(id), server_port_(server_port) {}

void SocketSession::Send(const std::string& message) {
ws_socket_->Write(message.data(), message.length());
Expand Down

0 comments on commit e989cd1

Please sign in to comment.