Skip to content

Editorial: queue a task in NavigationPreloadManager - #1834

Merged
monica-ch merged 2 commits into
w3c:mainfrom
monica-ch:queue-task-navigationpreload
Aug 12, 2026
Merged

Editorial: queue a task in NavigationPreloadManager#1834
monica-ch merged 2 commits into
w3c:mainfrom
monica-ch:queue-task-navigationpreload

Conversation

@monica-ch

@monica-ch monica-ch commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Update to navigation-preload-manager-enable, navigation-preload-manager-disable, navigation-preload-manager-setheadervalue, and navigation-preload-manager-getstate.

All four methods resolved/rejected their promises directly from an "in parallel" block, which violates the "don't touch JS objects from parallel" rule. Wrap the promise-touching steps in a Queue a task on the responsible event loop.

This is part 2/6 of #1740. Split out from #1755 for focused review.


Preview | Diff

…dManager

The enable(), disable(), setHeaderValue(), and getState() methods resolved/rejected their promises directly from an 'in parallel' block. Wrap the promise-touching steps in a Queue a task on the responsible event loop.

Refs: w3c#1740
Comment thread index.bs
Per @yoshisatoyanagisawa: keep the registration lookup, active worker null-check, and navigation-preload flag/header set/unset in the parallel block (atomic operations, safe from parallel context). Only wrap the promise-resolution and promise-rejection steps in Queue a task. Matches the pattern already used by getState().

@yoshisatoyanagisawa yoshisatoyanagisawa left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm

@monica-ch
monica-ch merged commit c09305a into w3c:main Aug 12, 2026
2 checks passed
github-actions Bot added a commit that referenced this pull request Aug 12, 2026
SHA: c09305a
Reason: push, by monica-ch

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants