Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(762)

Unified Diff: third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js

Issue 1842323002: [DevTools] Fix stale requests in Network panel not being refreshed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js b/third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js
index 4b7c2d79789fefe86675e9a11a226730c245cf87..fcbb6860595cc5043cfcb8f2239f8a3183b5e8c7 100644
--- a/third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js
+++ b/third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js
@@ -962,6 +962,7 @@ WebInspector.NetworkLogView.prototype = {
var dataGrid = this._dataGrid;
var rootNode = dataGrid.rootNode();
var nodesToInsert = [];
+ var nodesToRefresh = [];
pfeldman 2016/04/01 17:47:13 You should annotate this array as !Array<WebInspec
Matt Zeunert 2016/04/01 18:47:06 Done.
for (var requestId in this._staleRequestIds) {
var node = this._nodesByRequestId.get(requestId);
if (!node)
@@ -976,6 +977,9 @@ WebInspector.NetworkLogView.prototype = {
if (!node[WebInspector.NetworkLogView._isFilteredOutSymbol])
nodesToInsert.push(node);
}
+ if (!isFilteredOut) {
pfeldman 2016/04/01 17:47:13 This should be in the else branch - otherwise you
Matt Zeunert 2016/04/01 18:47:06 I removed the refresh call from inside the nodesTo
+ nodesToRefresh.push(node);
+ }
var request = node.request();
this._timeCalculator.updateBoundaries(request);
this._durationCalculator.updateBoundaries(request);
@@ -985,10 +989,14 @@ 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 i = 0; i < nodesToRefresh.length; ++i) {
+ var node = nodesToRefresh[i];
+ node.refresh();
pfeldman 2016/04/01 17:47:13 We are now using "for of" for non performance crit
Matt Zeunert 2016/04/01 18:47:06 Done.
+ }
+
this._highlightNthMatchedRequestForSearch(this._updateMatchCountAndFindMatchIndex(this._currentMatchedRequestNode), false);
if (!this.calculator().boundary().equals(oldBoundary)) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698