@@ -303,19 +303,17 @@ function finalizeAndReportTiming (response, initiatorType = 'other') {
303
303
// global, and cacheState.
304
304
markResourceTiming (
305
305
timingInfo ,
306
- originalURL ,
306
+ originalURL . href ,
307
307
initiatorType ,
308
308
globalThis ,
309
309
cacheState
310
310
)
311
311
}
312
312
313
313
// https://w3c.github.io/resource-timing/#dfn-mark-resource-timing
314
- function markResourceTiming ( timingInfo , originalURL , initiatorType , globalThis , cacheState ) {
315
- if ( nodeMajor > 18 || ( nodeMajor === 18 && nodeMinor >= 2 ) ) {
316
- performance . markResourceTiming ( timingInfo , originalURL . href , initiatorType , globalThis , cacheState )
317
- }
318
- }
314
+ const markResourceTiming = ( nodeMajor > 18 || ( nodeMajor === 18 && nodeMinor >= 2 ) )
315
+ ? performance . markResourceTiming
316
+ : ( ) => { }
319
317
320
318
// https://fetch.spec.whatwg.org/#abort-fetch
321
319
function abortFetch ( p , request , responseObject , error ) {
@@ -1042,7 +1040,7 @@ function fetchFinale (fetchParams, response) {
1042
1040
// and responseStatus.
1043
1041
if ( fetchParams . request . initiatorType != null ) {
1044
1042
// TODO: update markresourcetiming
1045
- markResourceTiming ( timingInfo , fetchParams . request . url , fetchParams . request . initiatorType , globalThis , cacheState , bodyInfo , responseStatus )
1043
+ markResourceTiming ( timingInfo , fetchParams . request . url . href , fetchParams . request . initiatorType , globalThis , cacheState , bodyInfo , responseStatus )
1046
1044
}
1047
1045
}
1048
1046
0 commit comments