Fix soft regression in scriptlets proxying fetch()

Related commit:
https://github.com/gorhill/uBlock/commit/13612d1d29

Related issue:
https://github.com/uBlockOrigin/uAssets/issues/30158
This commit is contained in:
Raymond Hill 2025-12-17 12:49:27 -05:00
parent abe9cdbef7
commit cbf24a40b6
No known key found for this signature in database
GPG key ID: F5630CAE62A14316

View file

@ -67,7 +67,7 @@ export function collateFetchArgumentsFn(resource, options) {
const props = [
'body', 'cache', 'credentials', 'duplex', 'headers',
'integrity', 'keepalive', 'method', 'mode', 'priority',
'redirect', 'referrer', 'referrerPolicy', 'signal', 'url'
'redirect', 'referrer', 'referrerPolicy', 'url'
];
const out = {};
if ( collateFetchArgumentsFn.collateKnownProps === undefined ) {
@ -84,7 +84,12 @@ export function collateFetchArgumentsFn(resource, options) {
) {
out.url = `${resource}`;
} else {
collateFetchArgumentsFn.collateKnownProps(resource, out);
let clone;
try {
clone = safe.Request_clone.call(resource);
} catch {
}
collateFetchArgumentsFn.collateKnownProps(clone || resource, out);
}
if ( typeof options === 'object' && options !== null ) {
collateFetchArgumentsFn.collateKnownProps(options, out);