Repository navigation
fix: run webRequest handlers for URLs handled by ElectronURLLoaderFactory - #45915
Conversation
jkleinsc
left a comment
There was a problem hiding this comment.
LGTM; asking @deepak1556 to take a look as well.
deepak1556
left a comment
There was a problem hiding this comment.
LGTM overall, sorry for the delayed review. Minor nit to avoid unnecessary clone operations.
AsarURLLoaderFactory is now intercepted by ProxyingURLLoaderFactory, which already handles when the file:// scheme is intercepted.
|
@deepak1556 @jkleinsc I've removed the unnecessary clones as suggested. I also made a tiny change so file:// service workers also trigger webRequest handlers, just like their non-file:// counterparts. They were the last request type that bypassed webRequest handlers in ProxyingURLLoaderFactory. |
|
Should we label this a feature or potentially even a breaking change in terms of backport policy? It has a pretty big surface area. EDIT: Ah, I see we have |
|
Merging as CI failures are unrelated. |
|
Release Notes Persisted
|
Description of Change
Fixes instances where
ElectronURLLoaderFactoryis used without an interceptingProxyingURLLoaderFactory, leading towebRequesthandlers not being called. This occurs inSimpleURLLoaderWrapper::GetURLLoaderFactoryForURLwhere the special URL loaders are not built withElectronBrowserClient::WillCreateURLLoaderFactory, and inProxyingURLLoaderFactory::CreateLoaderAndStartwhere intercepted URLs cause theProxyingURLLoaderFactoryto be left early.Resolves #45865.
Resolves #45903.
Checklist
npm testpassesRelease Notes
Notes: Fixed webRequest handlers not being called for intercepted protocols and special net.fetch URLs.