Closed Bug 1841865 Opened 1 year ago Closed 1 year ago

[wpt-sync] Sync PR 40890 - Store the COOP restrict crossOriginIsolated bit in WebLocalFrameImpl.

Categories

(Core :: DOM: Core & HTML, task, P4)

task

Tracking

()

RESOLVED FIXED
117 Branch
Tracking Status
firefox117 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 40890 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/40890
Details from upstream follow.

Jonathan Hao <phao@chromium.org> wrote:

Store the COOP restrict crossOriginIsolated bit in WebLocalFrameImpl.

In https://crrev.com/c/4479858, the browser computes a boolean that
determines whether COOP origin forbids an iframe to be
crossOriginIsolatedwe, and send the boolean on CommitNavigation in order
to restrict crossOriginIsolated on an iframe and its top level frame has
a mismatched COOP origin. It causes breakage such as b/288962508 (Google
only) because SharedArrayBuffer's constructor sometimes needs to be
enabled earlier than CommitNavigation, which causes SharedArrayBuffer to
be undefined even though crossOriginIsolated is true.

Since we also computes the boolean for the main frame when then window
is created, the solution in this CL is as follows:

  1. Each WebLocalFrameImpl stores a boolean that decides whether COOP
    origin forbids this frame to be crossOriginIsolated.
  2. Whenever a child frame is created, in CreateChildFrame, we pass the
    boolean down to the child frame via InitializeCoreFrameInternal. When
    the parent frame is the main frame, we only pass true when it's an
    initial empty document.

As before, InitializeCoreFrameInternal will eventually store the boolean
in LocalFrame and we can read it in LocalDOMWindow.

Bug: 1385827
Change-Id: I1330c30ad056d9f94ee7b7747eac68ae47b56acc
Reviewed-on: https://chromium-review.googlesource.com/4666003
WPT-Export-Revision: caf9100c1653515623042a2f4733e1dcb1a2de73

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]

CI Results

Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 1 tests and 2 subtests

Status Summary

Firefox

OK : 1
FAIL: 2

Chrome

OK : 1
FAIL: 2

Safari

OK : 1
FAIL: 2

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3944cc0b9c49 [wpt PR 40890] - Store the COOP restrict crossOriginIsolated bit in policy container., a=testonly
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 117 Branch
You need to log in before you can comment on or make changes to this bug.