Closed Bug 1021221 Opened 10 years ago Closed 9 years ago

resourceTiming initiatorType changes on refresh

Categories

(Core :: Networking, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla37

People

(Reporter: valentin, Assigned: valentin)

References

Details

Attachments

(1 file, 1 obsolete file)

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"
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+
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)
Setting the initiatorType to img in ProxyListener::OnStartRequest for resources that don't already have it set.
Attachment #8513540 - Attachment is obsolete: true
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+
https://hg.mozilla.org/mozilla-central/rev/ce30926721eb
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
You need to log in before you can comment on or make changes to this bug.