Enable subresource filter for children of frames with aborted first load
Subframes which have their initial load aborted (e.g. due to a document.write() call) never have the subresource filter activated on the browser side. We now skip over these frames when ascending the frame tree so that they inherit the appropriate activation from the frame's parent. We do not handle the case of a main frame with an aborted load. This will be fixed by crbug.com/1055558. Frames with aborted non-initial loads keep their previous activation. In addition, activated_frame_hosts_ is renamed to frame_host_filter_map_ to reflect the inclusion of nullptr for frame hosts that should inherit the activation of its parent (which might not be activated). Some tests are modified to watch for a title change that occurs after all scripts are loaded. This allows those scripts' functions to be used safely. The subresource filter was enabled on the frames with an aborted initial load themselves by crrev.com/c/2064474. Bug: 1052362 Change-Id: I9121be0f9154e346ca2602c30475b68e4da9f560 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2081523 Commit-Queue: Alex Turner <alexmt@chromium.org> Reviewed-by:Charlie Harrison <csharrison@chromium.org> Cr-Commit-Position: refs/heads/master@{#754730}
Showing
File moved
95 Bytes
File moved