@@ -303,19 +303,17 @@ function finalizeAndReportTiming (response, initiatorType = 'other') {
303303 // global, and cacheState.
304304 markResourceTiming (
305305 timingInfo ,
306- originalURL ,
306+ originalURL . href ,
307307 initiatorType ,
308308 globalThis ,
309309 cacheState
310310 )
311311}
312312
313313// 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+ : ( ) => { }
319317
320318// https://fetch.spec.whatwg.org/#abort-fetch
321319function abortFetch ( p , request , responseObject , error ) {
@@ -1042,7 +1040,7 @@ function fetchFinale (fetchParams, response) {
10421040 // and responseStatus.
10431041 if ( fetchParams . request . initiatorType != null ) {
10441042 // 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 )
10461044 }
10471045 }
10481046
0 commit comments