Closed Bug 1658097 Opened 4 years ago Closed 4 years ago

[fission] resource timing broken for cross-origin frames

Categories

(Core :: DOM: Core & HTML, defect, P2)

defect

Tracking

()

RESOLVED FIXED
84 Branch
Fission Milestone M6c
Tracking Status
firefox84 --- fixed

People

(Reporter: nika, Assigned: valentin)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

I noticed this while working on bug 1614524. The test https://searchfox.org/mozilla-central/rev/a3b25e347e2c22207c4b369b99246e4aebf861a7/dom/tests/mochitest/general/test_resource_timing_cross_origin.html will begin perma-failing once support for loading remote documents in <object> and <embed> elements lands.

The APIs used for collecting this resource timing information currently do not handle the case where the requesting document is cross-process from where the resource is loaded, meaning that timed loads for many cross-origin <object>, <embed> and <iframe> resources will not be reported.

M6c. Resource timing won't affect users so it doesn't need to block M6b experiment.

Severity: -- → S3
Fission Milestone: ? → M6c
Priority: -- → P3
Flags: needinfo?(valentin.gosu)

Resource timing hasn't had a lot of love recently. A bunch of WPT tests are disabled or PASS/FAIL.

The main reason this error is happening is because the load is happening in a different process from the performance object that the resource-timing entry should be added to. So it can't access the object, so it won't show up in the parent's entry list.
I suspect this also happens for iframes, not just object/embed.

We should change this to account for the cross-process boundary so if we can't get the in-process performance object, we use a proxy that implements PerformanceStorage and forwards the PerformanceTimingData to the correct process/object.

I don't think I'll have time to work on this anytime soon unfortunately.

Flags: needinfo?(valentin.gosu)
Whiteboard: [qf]

This doesn't really fit into our qf categories, so marking it qf-.

Whiteboard: [qf]

Doesn't need to block Fission Nightly. Tracking for our Fission Beta experiment (M7).

Fission Milestone: M6c → M7

This is required for fixing dom/tests/mochitest/general/test_resource_timing_cross_origin.html failing mochitest.

Fission Milestone: M7 → M6c

Jens confirmed that Valentin will be looking into this. Thank you Valentin.

Assignee: nobody → valentin.gosu
Status: NEW → ASSIGNED
Priority: P3 → P2

Nika suggested an approach to the problem. Saving here for later reference.

valentin
nika: mattwoodrow : I'm trying to figure out how to approach https://bugzilla.mozilla.org/show_bug.cgi?id=1658097
I need to pass the timing information from a cross-origin iframe to it's parent - but I'm not totally sure how to do that. It only needs to be available when OnStopRequest for the iframe (or the corresponding load-complete message) is received by the parent document.
Is there a place already where we pass such data? Or what would be the best way to achieve that?
nika
There's no OnStopRequest for the iframe in the parent document right now, so I'm guessing you mean the load event unblocking?
valentin: https://searchfox.org/mozilla-central/rev/02cb78667e87ccc42fea5edc6f3f2dd2edd6ecd5/dom/ipc/PBrowser.ipdl#701 and https://searchfox.org/mozilla-central/rev/02cb78667e87ccc42fea5edc6f3f2dd2edd6ecd5/dom/ipc/PBrowserBridge.ipdl#67 might be what you're looking for
Pushed by valentin.gosu@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/f8ce8da605a8
[fission] Send resource timing data for cross-origin frames to the correct process r=nika,necko-reviewers,dragana
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch
Regressions: CVE-2022-42927
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: