Skip to content

Commit

Permalink
[DevTools] Fix stale requests in Network panel not being refreshed
Browse files Browse the repository at this point in the history
Fix bug where changes to network requests wouldn't be reflected in the
Network panel. For example, a finished request would show as "pending"
until a refresh was forced by filtering the request out and then
resetting the filter.

BUG=599404

Review URL: https://codereview.chromium.org/1842323002

Cr-Commit-Position: refs/heads/master@{#384685}
  • Loading branch information
mattzeunert authored and Commit bot committed Apr 1, 2016
1 parent 54fdf8f commit 35e8582
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,7 @@ Mathias Bynens <mathias@qiwi.be>
Mathieu Meisser <mmeisser@logitech.com>
Matt Arpidone <mma.public@gmail.com>
Matt Strum <mstrum@amazon.com>
Matt Zeunert <matt@mostlystatic.com>
Matthew Bauer <mjbauer95@gmail.com>
Matthew Demarest <demarem@amazon.com>
Matthew Robertson <matthewrobertson03@gmail.com>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,10 @@ WebInspector.NetworkLogView.prototype = {

var dataGrid = this._dataGrid;
var rootNode = dataGrid.rootNode();
/** @type {!Array<!WebInspector.NetworkDataGridNode> } */
var nodesToInsert = [];
/** @type {!Array<!WebInspector.NetworkDataGridNode> } */
var nodesToRefresh = [];
for (var requestId in this._staleRequestIds) {
var node = this._nodesByRequestId.get(requestId);
if (!node)
Expand All @@ -976,6 +979,8 @@ WebInspector.NetworkLogView.prototype = {
if (!node[WebInspector.NetworkLogView._isFilteredOutSymbol])
nodesToInsert.push(node);
}
if (!isFilteredOut)
nodesToRefresh.push(node);
var request = node.request();
this._timeCalculator.updateBoundaries(request);
this._durationCalculator.updateBoundaries(request);
Expand All @@ -985,10 +990,12 @@ WebInspector.NetworkLogView.prototype = {
var node = nodesToInsert[i];
var request = node.request();
dataGrid.insertChild(node);
node.refresh();
node[WebInspector.NetworkLogView._isMatchingSearchQuerySymbol] = this._matchRequest(request);
}

for (var node of nodesToRefresh)
node.refresh();

this._highlightNthMatchedRequestForSearch(this._updateMatchCountAndFindMatchIndex(this._currentMatchedRequestNode), false);

if (!this.calculator().boundary().equals(oldBoundary)) {
Expand Down

0 comments on commit 35e8582

Please sign in to comment.