No longer assume subframes will have two documents created
Currently, the SubresourceFilterAgent assumes that frames will always have two documents created unless that frame has an aborted initial load. While this is current behavior in Chrome, it is contrary to the spec, which specifies that frames with an unset src should also only have one document created. (See crbug.com/778318 for fixing the bug.) If Chrome correctly implemented the spec, under the current implementation, no filter would ever be created for subframes with an unset src, even though they can still fetch resources. Accordingly, this change considers every created subframe document for subresource filter creation. Initial empty documents that previously never had filters will instead inherit their parent's activation state, i.e. they will have a filter created unless their parent's activation level is kDisabled. This change also allows us to remove the special case for aborted initial loads introduced by crrev.com/c/2064474. Bug: 1067021 Change-Id: I06a1fbb9550e0d83cddeefc6f56ebbf9a457cb71 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2137511 Commit-Queue: Alex Turner <alexmt@chromium.org> Reviewed-by:Charlie Harrison <csharrison@chromium.org> Cr-Commit-Position: refs/heads/master@{#759308}
Showing
Please register or sign in to comment