fix: crash in webRequest due to unsafe static_cast
upstream was changed to wrap the network delegate see https://chromium.googlesource.com/chromium/src/+/69.0.3497.106/services/network/network_context.cc#948
This commit is contained in:
parent
e548ed1a6e
commit
a71755e1b6
3 changed files with 9 additions and 5 deletions
|
@ -49,11 +49,9 @@ void CallNetworkDelegateMethod(
|
|||
URLPatterns patterns,
|
||||
Listener listener) {
|
||||
// Force creating network delegate.
|
||||
net::URLRequestContext* context =
|
||||
url_request_context_getter->GetURLRequestContext();
|
||||
url_request_context_getter->GetURLRequestContext();
|
||||
// Then call the method.
|
||||
AtomNetworkDelegate* network_delegate =
|
||||
static_cast<AtomNetworkDelegate*>(context->network_delegate());
|
||||
auto* network_delegate = url_request_context_getter->network_delegate();
|
||||
(network_delegate->*method)(type, std::move(patterns), std::move(listener));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue