Closed
Bug 997065
Opened 10 years ago
Closed 10 years ago
Network Monitor: Multiple request header blocks for media/webm requests
Categories
(DevTools :: Netmonitor, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 33
People
(Reporter: thomas, Assigned: sjakthol)
References
Details
Attachments
(2 files, 2 obsolete files)
148.00 KB,
image/png
|
Details | |
22.27 KB,
patch
|
vporof
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:28.0) Gecko/20100101 Firefox/28.0 (Beta/Release) Build ID: 20140314220517 Steps to reproduce: 1. Make sure the browser cache is cleared. 2. Open the Network panel 3. Navigate to: http://mr-andersen.no/gfcycat-companion-test/issues/7.html (warning: the page loads a video w/sound using autoplay) 4. Select the trailer.webm entry in the request list quickly when the page is loaded. Actual results: If you click the trailer.webm entry before the video is buffered properly the Headers tab is populated with multiple Request Header blocks (see the attached screenshot) Expected results: Only one Request Header block after selecting the entry in the list.
Reporter | ||
Updated•10 years ago
|
Component: Untriaged → Developer Tools: Netmonitor
Reporter | ||
Comment 1•10 years ago
|
||
This issue could be related to bug 984687
Reporter | ||
Updated•10 years ago
|
Summary: Network Monitor: media/webm request issues → Network Monitor: Multiple request header blocks for media/webm requests
Comment 2•10 years ago
|
||
I'm having a separate issue with the webm file not showing up on every reload. Victor, any theories?
Updated•10 years ago
|
Flags: needinfo?(vporof)
Comment 3•10 years ago
|
||
Yes, this might be definitely related to bug 984687. It seems that if a request is inspected before it finishes (or all the information about it is available), some parts end up being displayed twice.
Flags: needinfo?(vporof)
Reporter | ||
Comment 4•10 years ago
|
||
> I'm having a separate issue with the webm file not showing up on every reload. Maybe related to the issue discussed here, bug 764958
Assignee | ||
Comment 5•10 years ago
|
||
Here's a patch that should fix the issues mentioned here and in bug 984687. The problem here is that the update is performed in an asynchronous task. If the data is updated often there were multiple tasks running simultaneously. This caused the information to be added multiple times. The patch fixes the problem by keeping track of the update task. If a new update of a tab is required while another one is running it waits for the first one to finish until performing the final update. If multiple updates are triggered during an update only the last one is performed once the pending update finishes. The attached test case tries to ensure the tabs don't contain duplicated information by waiting for the final "TAB_UPDATED" event and checking the content of the tabs (Headers, Cookies and Params). To test this case manually you need to inspect a request before it finishes. Test browser_net_status-codes.js was relying on the old behavior where summary would be updated synchronously even if another update was running. So instead of .thening on "TAB_UPDATED" event I decided to refactor the test to be a Task and use loops. Without that it would've looked a lot like this: <click on a request> <wait for a details pane to update>.then <perform checks> <click on a request> <wait for a details pane to update>.then <perform checks> and so on for each request twice (10 times)... This bug is a bit nasty to deal with so feedback is more than welcome.
Attachment #8444153 -
Flags: feedback?(vporof)
Assignee | ||
Comment 6•10 years ago
|
||
The previous patch contained an error. Here's an updated one without test failures. Sorry for the noise.
Attachment #8444153 -
Attachment is obsolete: true
Attachment #8444153 -
Flags: feedback?(vporof)
Attachment #8444155 -
Flags: feedback?(vporof)
Comment 7•10 years ago
|
||
Sorry for the long delay Sami, and thank you for the patch! I'll have a look at this asap.
Comment 8•10 years ago
|
||
Comment on attachment 8444155 [details] [diff] [review] netmonitor-no-duplicate-content-in-details.patch Review of attachment 8444155 [details] [diff] [review]: ----------------------------------------------------------------- Beautiful test and I'm liking the new logic. Thank you, let's land this! Have you pushed to try? Do you want me to do it? ::: browser/devtools/netmonitor/netmonitor-view.js @@ +2110,2 @@ > } > + else if (tab == this.widget.selectedIndex) { Nit: you could more cleanly write this as if (tab == this.widget.selectedIndex) { if (viewState.dirty[tab]) { ... } else { ... } } else { if (viewState.dirty[tab] { ... } }
Attachment #8444155 -
Flags: feedback?(vporof) → review+
Updated•10 years ago
|
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Assignee | ||
Comment 9•10 years ago
|
||
Thanks for the review. Here's a patch with the if-else if block simplified. Try run: https://tbpl.mozilla.org/?tree=Try&rev=74f673e71887
Assignee: nobody → sjakthol
Attachment #8444155 -
Attachment is obsolete: true
Attachment #8449554 -
Flags: review?(vporof)
Comment 10•10 years ago
|
||
Comment on attachment 8449554 [details] [diff] [review] netmonitor-no-duplicate-content-in-sidebar.patch Review of attachment 8449554 [details] [diff] [review]: ----------------------------------------------------------------- Splendid.
Attachment #8449554 -
Flags: review?(vporof) → review+
Comment 11•10 years ago
|
||
Please add a checkin-needed keyword to this bug if the try run is green.
Assignee | ||
Comment 14•10 years ago
|
||
All green: https://tbpl.mozilla.org/?tree=Try&rev=74f673e71887
Keywords: checkin-needed
Comment 16•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/610cfd0139c1
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 33
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•