resourceTiming initiatorType changes on refresh

RESOLVED FIXED in mozilla37

Status

()

Core
Networking
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: valentin, Assigned: valentin)

Tracking

unspecified
mozilla37
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

3 years ago
Load a page containing an image.
window.performance.getEntries() shows the initiatorType as "img".
Refresh the webpage
The initiator type is now "other", although it should be "img"
(Assignee)

Updated

3 years ago
Duplicate of this bug: 1083228
http://w3c-test.org/resource-timing/test_resource_timing.html
(Assignee)

Comment 3

3 years ago
Created attachment 8513540 [details] [diff] [review]
resourceTiming initiatorType is empty/<other> when images are loaded from cache

Setting the initiatorType in imgCacheValidator::OnStartRequest for images in <img> tags
and ProxyListener::OnStartRequest for images that are dynamically loaded
Attachment #8513540 - Flags: review?(netzen)
Comment on attachment 8513540 [details] [diff] [review]
resourceTiming initiatorType is empty/<other> when images are loaded from cache

Review of attachment 8513540 [details] [diff] [review]:
-----------------------------------------------------------------

Someone else is probably a better reviewer for this, forwarding the request.
Attachment #8513540 - Flags: review?(netzen) → review?(seth)
Comment on attachment 8513540 [details] [diff] [review]
resourceTiming initiatorType is empty/<other> when images are loaded from cache

Review of attachment 8513540 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good to me.
Attachment #8513540 - Flags: review?(seth) → review+
(Assignee)

Comment 6

3 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/fd24a9549c1d
Backed out in https://hg.mozilla.org/integration/mozilla-inbound/rev/7fab145c2d3a for mochitest-3 orange

https://treeherder.mozilla.org/ui/logviewer.html#?job_id=4171010&repo=mozilla-inbound
Flags: needinfo?(valentin.gosu)
(Assignee)

Comment 8

3 years ago
I didn't notice the orange in my previous runs. :)
I'll post an update patch and a test for this as well.
Flags: needinfo?(valentin.gosu)
(Assignee)

Comment 9

3 years ago
Created attachment 8542556 [details] [diff] [review]
resourceTiming initiatorType is empty/other when images are loaded from cache

Setting the initiatorType to img in ProxyListener::OnStartRequest for resources that don't already have it set.
(Assignee)

Updated

3 years ago
Attachment #8513540 - Attachment is obsolete: true
(Assignee)

Comment 10

3 years ago
Comment on attachment 8542556 [details] [diff] [review]
resourceTiming initiatorType is empty/other when images are loaded from cache

Review of attachment 8542556 [details] [diff] [review]:
-----------------------------------------------------------------

No longer setting the initiatorType in imgCacheValidator::OnStartRequest (that is fixed by the patch in bug 1113676, along with a test for resource timing when cached)
Only setting the initiator type if it's not already set.

https://treeherder.mozilla.org/#/jobs?repo=try&revision=6d59bd5aba64
Attachment #8542556 - Flags: review+
(Assignee)

Comment 11

3 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/ce30926721eb
https://hg.mozilla.org/mozilla-central/rev/ce30926721eb
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
You need to log in before you can comment on or make changes to this bug.