@@ -334,16 +334,27 @@ void InspectorSocketServer::SendListResponse(InspectorSocket* socket,
334
334
detected_host = FormatHostPort (socket->GetHost (),
335
335
session->server_port ());
336
336
}
337
- std::ostringstream frontend_url;
338
- frontend_url << " chrome-devtools://devtools/bundled" ;
339
- frontend_url << " /inspector.html?experiments=true&v8only=true&ws=" ;
340
- frontend_url << FormatAddress (detected_host, id, false );
341
- target_map[" devtoolsFrontendUrl" ] += frontend_url.str ();
337
+ std::string formatted_address = FormatAddress (detected_host, id, false );
338
+ target_map[" devtoolsFrontendUrl" ] = GetFrontendURL (false ,
339
+ formatted_address);
340
+ // The compat URL is for Chrome browsers older than 66.0.3345.0
341
+ target_map[" devtoolsFrontendUrlCompat" ] = GetFrontendURL (true ,
342
+ formatted_address);
342
343
target_map[" webSocketDebuggerUrl" ] = FormatAddress (detected_host, id, true );
343
344
}
344
345
SendHttpResponse (socket, MapsToString (response));
345
346
}
346
347
348
+ std::string InspectorSocketServer::GetFrontendURL (bool is_compat,
349
+ const std::string &formatted_address) {
350
+ std::ostringstream frontend_url;
351
+ frontend_url << " chrome-devtools://devtools/bundled/" ;
352
+ frontend_url << (is_compat ? " inspector" : " js_app" );
353
+ frontend_url << " .html?experiments=true&v8only=true&ws=" ;
354
+ frontend_url << formatted_address;
355
+ return frontend_url.str ();
356
+ }
357
+
347
358
bool InspectorSocketServer::Start () {
348
359
CHECK_NE (delegate_, nullptr );
349
360
CHECK_EQ (state_, ServerState::kNew );
0 commit comments