Closed Bug 1351521 Opened 7 years ago Closed 7 years ago

performance.getEntries() doesn't list entries for resources intercepted by a service worker in e10s mode

Categories

(Core :: DOM: Service Workers, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox58 --- fixed

People

(Reporter: catalinb, Assigned: bkelly)

References

(Blocks 2 open bugs)

Details

Attachments

(2 files, 1 obsolete file)

register a service worker with onfetch = function(event) { event.respondWith(fetch(event.request)); } and then load a page with a bunch of resources.

performance.getEntriesByType("resource"); should include PerformanceResourceTiming for these resources, but in e10s mode it doesn't.
The problem is that InterceptStreamListener::OnStopRequest skips the step where we add the performance entry in nsHttpChannelChild::OnStopRequest. However, I think it's not worth fixing this at this time and we should just wait for :asuth to land parent interception.
Depends on: 1231222
Priority: -- → P3
Andrew, given where you are on parent interception, do you still think we should wait on this?  Some partner sites would like to use it.
Flags: needinfo?(bugmail)
Especially given how we may have to hold off on landing various things because of 57 stability concerns, I see implementing this separately making sense.
Flags: needinfo?(bugmail)
I'm going to take this so I can add a test.  I'm worried that I'm regressing performance timeline stuff in bug 1391693.
Assignee: nobody → bkelly
Status: NEW → ASSIGNED
No longer depends on: 1231222
Depends on: 1191943
I did most of the hard bits in the dependent bugs, so this is a small fix now.
Andrew, this patch does a few things:

1. Synthesize a responseStart time in the intercepted OnStartRequest()
2. Synthesize a responseEnd time in the intercepted OnStopRequest()
3. Move the Performance::AddEntry() call to DoPreOnStopRequest() which we already call when synthesizing.
Attachment #8915344 - Attachment is obsolete: true
Attachment #8915705 - Flags: review?(bugmail)
Attachment #8915345 - Flags: review?(bugmail)
Attachment #8915705 - Flags: review?(bugmail) → review+
Attachment #8915345 - Flags: review?(bugmail) → review+
Pushed by bkelly@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/047092e0d447
P1 Add intercepted HttpChannelChild channels to the performance timeline. r=asuth
https://hg.mozilla.org/integration/mozilla-inbound/rev/0d8fa7a51ad0
P2 Update resource-timing.https.html WPT test expectations. r=asuth
https://hg.mozilla.org/mozilla-central/rev/047092e0d447
https://hg.mozilla.org/mozilla-central/rev/0d8fa7a51ad0
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: