Skip to content

Commit 0c6d9ae

Browse files
bnoordhuisMylesBorins
authored andcommitted
src: fix compile warnings introduced in 73ad3f9
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 <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Timothy Gu <[email protected]> Reviewed-By: Eugene Ostroukhov <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
1 parent b1fd50a commit 0c6d9ae

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

src/inspector_socket.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ class WsHandler : public ProtocolHandler {
328328
} while (processed > 0 && !data->empty());
329329
}
330330

331-
void Write(const std::vector<char> data) {
331+
void Write(const std::vector<char> data) override {
332332
std::vector<char> output = encode_frame_hybi17(data);
333333
WriteRaw(output, WriteRequest::Cleanup);
334334
}
@@ -446,7 +446,7 @@ class HttpHandler : public ProtocolHandler {
446446
}
447447
}
448448

449-
void CancelHandshake() {
449+
void CancelHandshake() override {
450450
const char HANDSHAKE_FAILED_RESPONSE[] =
451451
"HTTP/1.0 400 Bad Request\r\n"
452452
"Content-Type: text/html; charset=UTF-8\r\n\r\n"

src/inspector_socket_server.cc

+1-10
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,6 @@ const char* MatchPathSegment(const char* path, const char* expected) {
8484
return nullptr;
8585
}
8686

87-
void OnBufferAlloc(uv_handle_t* handle, size_t len, uv_buf_t* buf) {
88-
buf->base = new char[len];
89-
buf->len = len;
90-
}
91-
9287
void PrintDebuggerReadyMessage(const std::string& host,
9388
int port,
9489
const std::vector<std::string>& ids,
@@ -235,7 +230,6 @@ class SocketSession {
235230
private:
236231
const int id_;
237232
InspectorSocket::Pointer ws_socket_;
238-
InspectorSocketServer* server_;
239233
const int server_port_;
240234
std::string ws_key_;
241235
};
@@ -531,10 +525,7 @@ void InspectorSocketServer::Send(int session_id, const std::string& message) {
531525
// InspectorSession tracking
532526
SocketSession::SocketSession(InspectorSocketServer* server, int id,
533527
int server_port)
534-
: id_(id),
535-
server_(server),
536-
server_port_(server_port) { }
537-
528+
: id_(id), server_port_(server_port) {}
538529

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

0 commit comments

Comments
 (0)