← All reports

Local Network Access permission storage + `permissions.query()`

Component: WebKit NetworkProcess | f83ad9a

Local Network Access (LNA) restricts pages from reaching local/loopback resources without a user-granted permission. The decision is enforced in NetworkProcess, but navigator.permissions.query() is normally answered by the UI process. This commit adds NetworkProcess-side storage for LNA grants/denials, a revocation path, and permissions.query() support for 'local-network'/'loopback-network'. Previously the check algorithm consulted a grant map nothing ever wrote to, so decisions were unreachable.

LNA's permission model becomes functional for the first time, with the authoritative answer moved into the process that enforces it — closing a gap where a page could be told 'granted' while access was actually refused. WebPermissionController special-cases the two names so the web process routes the query directly to NetworkProcess. Decisions are keyed by both requesting and top-level origin, and tracked as two distinct permissions rather than one combined state (unlike Chromium's pre-split model).