Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upResource fetch timing information is stored too late during document navigation #24468
Comments
|
I'll try to work on this as soon as I can :) |
|
Hey @tomasdivito! Thanks for your interest in working on this issue. It's now assigned to you! |
|
@jdm I have a couple questions regarding to your suggested solution. add a make Performance::queue_entries return the index of the added performance entry in self.entries
because we are also adding it to the observers... maybe it doesn't matter, but if that's the case and we get the index back (adding the return value to be Sorry for the amount of questions but I'm not pretty sure how this would work. I get what this would solve but I'm having some doubts and maybe this is a little bit more complicated. |
|
Good questions! Looking more closely at the code, there is already a As for the question about queue_entry, since every caller of queue_entry passes |
|
Just as an update, I was not able to focus on this because I was too busy with university. I will work on this saturday and will create a Pull Request for this. Again sorry! I would love to work on this more but at least until december I have no much free time :( |
|
Thanks for letting us know! |
|
@highfive: assign me |
|
Hey @shnmorimoto! Thanks for your interest in working on this issue. It's now assigned to you! |
…performance entry
…performance entry
…ember, r=<try> Fix performance interface timing member <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #23330 and #24468 (GitHub issue number if applicable) <!-- Either: --> - [x] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
…performance entry
…performance entry
…ember, r=<try> Fix performance interface timing member <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #23330 and #24468 (GitHub issue number if applicable) <!-- Either: --> - [x] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
…ember, r=jdm Fix performance interface timing member <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #23330 and #24468 (GitHub issue number if applicable) <!-- Either: --> - [x] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
…ember, r=jdm Fix performance interface timing member <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #23330 and #24468 (GitHub issue number if applicable) <!-- Either: --> - [x] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
…ember, r=jdm Fix performance interface timing member <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #23330 and #24468 (GitHub issue number if applicable) <!-- Either: --> - [x] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
…ember, r=jdm Fix performance interface timing member <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #23330 and #24468 (GitHub issue number if applicable) <!-- Either: --> - [x] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
|
Fixed by #25205 |
Given the changes in #24466 (or substituting
timing()without them), it is easy to get a page to panic by checkingnavigation.timingbefore parsing is complete. More specifically, the panic occurs because in this code there is no navigation timing entry that has been reported when a page like this is loaded:This occurs because we only register performance entries when a response is complete, rather than when the first bytes are received. I think we need to update all of the resource timing code to submit twice - when the first bytes are received, and then update the existing entry when all of the final timings are available.
We could:
self.entriesupdate_entrymethod toPerformancethat accepts an index and a &PerformanceEntry value and overwrites the corresponding entry inself.entriesupdate_entryAPI from process_response_eof