Bug 246663 - Fire error event when link preload fails synchronously
Summary: Fire error event when link preload fails synchronously
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryan Reno
URL:
Keywords: InRadar
Depends on:
Blocks: 235656
  Show dependency treegraph
 
Reported: 2022-10-17 17:23 PDT by Ryan Reno
Modified: 2022-10-19 10:03 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Reno 2022-10-17 17:23:47 PDT
The fetch and process the linked resource steps for a preload link specify we should fire an error event when there's an error returned from the fetch.
Comment 1 Radar WebKit Bug Importer 2022-10-17 17:24:06 PDT
<rdar://problem/101269688>
Comment 2 Ryan Reno 2022-10-17 17:27:34 PDT
Pull request: https://github.com/WebKit/WebKit/pull/5473
Comment 3 Ryan Reno 2022-10-18 09:41:28 PDT
I did such a poor job of explaining the issue and naming this bug.

What we need to do is fire error events when a synchronous failure occurs. In particular, when we block the preload via CSP we don't ever schedule with the Network Process so the current code path for firing an error event never executes. Since we're supposed to return the spec's notion of a network error when we block due to CSP then we should also fire an error event when we block due to CSP.
Comment 4 EWS 2022-10-19 10:03:28 PDT
Committed 255740@main (6bab27e2e35e): <https://commits.webkit.org/255740@main>

Reviewed commits have been landed. Closing PR #5473 and removing active labels.