Closed Bug 1658097 Opened 4 years ago Closed 4 years ago

[fission] resource timing broken for cross-origin frames


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




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


(Reporter: nika, Assigned: valentin)


(Blocks 1 open bug)



(1 file)

I noticed this while working on bug 1614524. The test 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
Priority: P3 → P2

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

nika: mattwoodrow : I'm trying to figure out how to approach
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?
There's no OnStopRequest for the iframe in the parent document right now, so I'm guessing you mean the load event unblocking?
valentin: and might be what you're looking for
Pushed by
[fission] Send resource timing data for cross-origin frames to the correct process r=nika,necko-reviewers,dragana
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch
You need to log in before you can comment on or make changes to this bug.