Closed Bug 1819474 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 38753 - Revert "Consolidate iframe & object resource timing code paths"

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox112 fixed)

RESOLVED FIXED
112 Branch
Tracking Status
firefox112 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

(Depends on 1 open bug, )

Details

(Whiteboard: [wptsync downstream])

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

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

Dan H <harringtond@chromium.org> wrote:

Revert "Consolidate iframe & object resource timing code paths"

This reverts commit 5dcb6f7b01d5f51144a9ba847c34bb0cdc344ccb.

Reason for revert: MSan failures crbug.com/1420057

Original change's description:

Consolidate iframe & object resource timing code paths

So far some of the logic in resource timing for subframe navigations
iframe/object/embed) was duplicated, e.g. both in blink and in content.

This has led to race conditions, inconsistencies and sometimes
XSS leaks.

This patch attempts to improve the situation by consolidating the code
paths:

  • NavigationRequest receives is_container_initiated, which ensures only
    container-initiated navigations are reported to the parent. This
    is a clarification of something that was ambiguous in the spec
    previously (https://github.com/whatwg/html/issues/8846).
    It later uses ParentResourceTimingAccess to decide if a navigation
    should report to its parent with/without response details
    (status code and mime-type), or not report at all (TAO-fail, not
    an iframe, not container-initiated).

  • Both object fallbacks and cancelled navigations (204/205) report
    to the parent via RenderFrameImpl, and blink converts that to a
    ResourceTimingInfo object. This allows us to remove the duplicated
    resource timing creation code in //content.

  • We report fallback resource timing also for plugin error events and
    not only for load events.

Bug: 1399862
Bug: 1410705
Change-Id: Id37d23cd02eee9e38f812e6f3da99caedafdee3d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4214695
Reviewed-by: Takashi Toyoshima \<toyoshim@chromium.org>
Reviewed-by: Daniel Cheng \<dcheng@chromium.org>
Reviewed-by: Arthur Sonzogni \<arthursonzogni@chromium.org>
Commit-Queue: Noam Rosenthal \<nrosenthal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1110433}

Bug: 1399862
Bug: 1410705
Bug: 1420057
Change-Id: Icfc5b6ca7ebd718b2fff58e3f5c7765c53ee93f9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4295881
Owners-Override: Dan H \<harringtond@chromium.org>
Reviewed-by: Dan H \<harringtond@chromium.org>
Commit-Queue: Dan H \<harringtond@chromium.org>
Bot-Commit: Rubber Stamper \<rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1110619}

PR 38753 applied with additional changes from upstream: 53a3c3f1d8fcaea434595d00ec4431038de1d49e
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 19 subtests

Status Summary

Firefox

OK : 1
PASS: 19

Chrome

OK : 1
PASS: 19

Safari

OK : 1
PASS: 1
FAIL: 18

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e75538b2c448 [wpt PR 38753] - Revert "Consolidate iframe & object resource timing code paths", a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 112 Branch
You need to log in before you can comment on or make changes to this bug.