Skip to content

Check for null before running 'fetch a modulepreload script graph' optional steps#5664

Merged
domenic merged 1 commit into
whatwg:masterfrom
dandclark:dandclark/modulepreload-null-check
Jun 23, 2020
Merged

Check for null before running 'fetch a modulepreload script graph' optional steps#5664
domenic merged 1 commit into
whatwg:masterfrom
dandclark:dandclark/modulepreload-null-check

Conversation

@dandclark
Copy link
Copy Markdown
Contributor

Currently fetch a modulepreload module script graph optionally proceeds to steps to fetch the descendants of the preloaded module without checking the result of fetch a single module script for failure. It doesn't make sense to try to fetch descendants if the original fetch failed (e.g. due to 404), and fetch the descendants of and link doesn't expect to be passed a null module script.

Thus, this change guards the optional steps with a null check.

This clarification should be a no-op for implementers, who must already have this sort of check in place; there's not much that they could do otherwise.

…'fetch a modulepreload module script graph'.
@dandclark
Copy link
Copy Markdown
Contributor Author

I'm splitting this bugfix/clarification off from #5658 per @littledan 's suggestion.

Copy link
Copy Markdown
Contributor

@littledan littledan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a nice improvement for clarity.

Copy link
Copy Markdown
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thank you!

@domenic domenic merged commit b4fbe04 into whatwg:master Jun 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants