fix: access violation during redirects (intercepted requests) (#25393)
* fix: don't delete loader factory when request is pending When intercepted request is pending we need to make sure that loader factory is not deleted, especially when redirect occurs. Otherwise, it may cause access violation. * fix: added logic that removes requests from collection * fix: fixed lint errors * fix: fixed review remark * fix: fixed review remarks Removed intercepted_requests_ collection and leverage pending_receivers_. * fix: brought back removed line
This commit is contained in:
parent
125c5a6e9b
commit
8207f6901d
3 changed files with 48 additions and 31 deletions
|
@ -66,7 +66,7 @@ class ElectronURLLoaderFactory
|
|||
const network::ResourceRequest& request,
|
||||
mojo::PendingRemote<network::mojom::URLLoaderClient> client,
|
||||
const net::MutableNetworkTrafficAnnotationTag& traffic_annotation,
|
||||
network::mojom::URLLoaderFactory* proxy_factory,
|
||||
mojo::PendingRemote<network::mojom::URLLoaderFactory> proxy_factory,
|
||||
ProtocolType type,
|
||||
gin::Arguments* args);
|
||||
|
||||
|
@ -77,6 +77,10 @@ class ElectronURLLoaderFactory
|
|||
mojo::PendingReceiver<network::mojom::URLLoaderFactory> factory_receiver);
|
||||
~ElectronURLLoaderFactory() override;
|
||||
|
||||
static void OnComplete(
|
||||
mojo::PendingRemote<network::mojom::URLLoaderClient> client,
|
||||
int32_t request_id,
|
||||
const network::URLLoaderCompletionStatus& status);
|
||||
static void StartLoadingBuffer(
|
||||
mojo::PendingRemote<network::mojom::URLLoaderClient> client,
|
||||
network::mojom::URLResponseHeadPtr head,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue