Skip to content

Commit

Permalink
Reanchoring BroadcastChannel overrides
Browse files Browse the repository at this point in the history
Chromium change:
https://chromium.googlesource.com/chromium/src/+/48762ae06d8de05d3dc8ef727d04eaa223901786

commit 48762ae06d8de05d3dc8ef727d04eaa223901786
Author: Noam Rosenthal <nrosenthal@chromium.org>
Date:   Thu Jan 12 19:08:43 2023 +0000

    Refactor nested-navigations resource-timing flow

    This changes how frames, iframes & objects decide how to report
    their navigations as resource timing entries to their parent:

    - Any frame-initiated navigation (e.g. iframe.src change) is
      reported as an entry. This complies with current spec.
    - For nested navigations that fail Timing-Allow-Origin, we don't
      report the normal responseEnd - instead we report the load event
      time as the responseEnd, to prevent leakage of navigation-related
      cross-origin information
      (see w3c/resource-timing#340)

    This incidentally fixes other existing issues with nested navigations
    and resource timing, such as flaky tests and inconsistencies regarding
    restored iframes.

    Bug: 1404695
    Bug: 1348080
    Bug: 1290721
    Bug: 1380078
    Bug: 1378015
    Bug: 957181

    Spec changes: whatwg/html#8643
    whatwg/fetch#1579
  • Loading branch information
cdesouza-chromium authored and emerick committed Feb 11, 2023
1 parent 7187a5d commit ceee839
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ String GetEphemeralBroadcastChannelName(LocalDOMWindow* window, String name) {
// the worker is using.
// The name change is applied only while connecting.
#define GetRemoteNavigationAssociatedInterfaces \
should_send_resource_timing_info_to_parent(); /* no-op */ \
RemoteMainFrameIntersection(); /* no-op */ \
base::AutoReset<String> ephemeral_name_auto_reset( \
&name_, GetEphemeralBroadcastChannelName(window, name_)); \
frame->GetRemoteNavigationAssociatedInterfaces
Expand Down

0 comments on commit ceee839

Please sign in to comment.