Skip to content

Editorial: queue a task in NavigationPreloadManager#1834

Open
monica-ch wants to merge 2 commits into
w3c:mainfrom
monica-ch:queue-task-navigationpreload
Open

Editorial: queue a task in NavigationPreloadManager#1834
monica-ch wants to merge 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().
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