Skip to content

Commit

Permalink
fix: ProxyWebSocket hitting DCHECK
Browse files Browse the repository at this point in the history
  • Loading branch information
sentialx committed Apr 7, 2020
1 parent ad12645 commit e838729
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions shell/browser/electron_browser_client.cc
Expand Up @@ -1356,9 +1356,12 @@ void ElectronBrowserClient::CreateWebSocket(
browser_context);

DCHECK(web_request_api);
web_request_api->ProxyWebSocket(frame, std::move(factory), url,
site_for_cookies.RepresentativeUrl(),
user_agent, std::move(handshake_client));

if (web_request_api->MayHaveProxies()) {
web_request_api->ProxyWebSocket(frame, std::move(factory), url,
site_for_cookies.RepresentativeUrl(),
user_agent, std::move(handshake_client));
}
#endif

v8::Isolate* isolate = v8::Isolate::GetCurrent();
Expand Down

0 comments on commit e838729

Please sign in to comment.