[Site Isolation] Cross-process resource and loaderId aggregation in Page.getResourceTree
df1a3bd
Under Site Isolation each cross-origin frame runs in its own WebContent process, but CachedResourceLoader (holding cached subresources) lives in the hosting process, not the UIProcess. The Web Inspector's Page.getResourceTree previously returned correct frame structure and URLs for cross-origin frames but left loaderId and resources empty, having no cross-process retrieval path.
LayoutTests/http/tests/site-isolation/inspector/page/resource-tree-resources-cross-origin-iframe.html
for (let attempt = 0; attempt < 50; ++attempt) {
({ frameTree } = await WI.backendTarget.PageAgent.getResourceTree());
child = frameTree.childFrames?.[0];
if (child && (child.resources || []).some((r) => r.url.endsWith("/resource-tree-subframe-style.css")))
break;
await new Promise((resolve) => setTimeout(resolve, 50));
}
The proxy now walks the WebFrameProxy tree, groups frame IDs by hosting process, sends each process a typed GetFrameResourceData IPC request carrying only that process's frame IDs, and assembles the replied structs into a unified tree via a CallbackAggregator. The command is made asynchronous to accommodate the round-trips; secure decoding is auto-generated from a new serialization.in file.
Significance
This adds a new async multi-process IPC path in the Web Inspector — a CallbackAggregator spanning multiple WebContent processes — exactly the kind of code where frame-lifetime bugs and TOCTOU races appear.
Audit directions
Aaa Aaaaaaaaaaaaaaaa Aaaaaaaa Aaaa Aaaaaa Aaaaaaa a Aaaaaa Aaaaaaaa Aa Aaa Aaaaa Aaaa a Aa a Aaaaaaaaaaaa Aaaaa Aaaaaaaaa Aa Aaaaaaaa Aaaaa Aaa Aaaa Aaa Aaaaaa Aaa Aaa Aaaaa Aaaaaa Aaa Aaaaaaaaaa Aaa Aaaaaaa Aaaa Aaaaa Aa a Aaaaa Aaaaa Aaa Aaaaa Aaaaaaa Aaaa Aaaaaaaa Aa Aaaaaaaa Aaaaaaaa Aa Aaa Aaaaa Aaaaaaaaa Aa a Aaaa Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa Aa Aaa Aaaaaaaaaa Aaaaaaa Aaaaaaaa Aaa Aaaaa Aaa Aaa Aaaaaaaaa Aaaa a Aa a Aaaaaaaaaa Aaaa Aaaaa a Aaaaa Aa Aaaaaa Aa a Aaaaaaaaa Aaaaaaaa Aaa Aaaaaaaaaa Aaaaaaa Aaaa Aaa Aaaaa Aaaa Aaa a Aaaaaaa Aaaaaa Aaa Aaaa Aaaaaaaaaa Aaaaaaaa Aa Aaaa Aaa Aaaaaaaaaa Aaaaaaa Aaaa Aaaaaaa Aa Aaaaaaaaaaaaaaaaa Aaaa a Aaaaaaaa Aa Aaa Aaaaaaa Aaaaaaaaa Aaaaaaaa Aaaaaaaaaaa Aaaaaaa Aaa Aaaa Aaaaa Aaaa Aaaa Aaaaaa Aaaaaaaaa Aaaaaaaa Aaaa a Aaaaaaaaaa Aaaaa Aaa Aa Aaaaaaaaa Aaaaaa Aaaaaaaaaaaaaaa Aaaaaaaaa Aaaaaa Aaaaaaa Aaa Aaaaaaaaaa Aaaaaaaaaa
🔒New async cross-process inspector IPC path — multi-process coordination edge cases and frame identity handling warrant security investigation.
Subscribe to read more