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

Unified Diff: Source/devtools/front_end/network/NetworkPanel.js

Issue 366973002: NetworkPanel: do not hold request itself in stale requests map. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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: Source/devtools/front_end/network/NetworkPanel.js
diff --git a/Source/devtools/front_end/network/NetworkPanel.js b/Source/devtools/front_end/network/NetworkPanel.js
index 51406894d43d90e2b8746d89fa5f421ec341e78f..645dac525b7cda1dacf5c2928f5ef0e7899ae49f 100644
--- a/Source/devtools/front_end/network/NetworkPanel.js
+++ b/Source/devtools/front_end/network/NetworkPanel.js
@@ -60,7 +60,8 @@ WebInspector.NetworkLogView = function(filterBar, coulmnsVisibilitySetting)
this._allowRequestSelection = false;
this._requests = [];
this._requestsById = {};
- this._staleRequests = {};
+ /** @type {!Object.<string, boolean>} */
+ this._staleRequestIds = {};
vsevik 2014/07/02 13:06:00 StringSet
this._requestGridNodes = {};
this._lastRequestGridNodeId = 0;
this._mainRequestLoadTime = -1;
@@ -662,7 +663,7 @@ WebInspector.NetworkLogView.prototype = {
{
for (var i = 0; i < this._requests.length; ++i) {
var request = this._requests[i];
- this._staleRequests[request.requestId] = request;
+ this._staleRequestIds[request.requestId] = true;
}
},
@@ -767,8 +768,8 @@ WebInspector.NetworkLogView.prototype = {
boundariesChanged = this.calculator.updateBoundariesForEventTime(this._mainRequestDOMContentLoadedTime) || boundariesChanged;
}
- for (var requestId in this._staleRequests) {
- var request = this._staleRequests[requestId];
+ for (var requestId in this._staleRequestIds) {
+ var request = this._requestsById[requestId];
var node = this._requestGridNode(request);
if (!node) {
// Create the timeline tree element and graph.
@@ -790,10 +791,10 @@ WebInspector.NetworkLogView.prototype = {
this._invalidateAllItems();
}
- for (var requestId in this._staleRequests)
- this._requestGridNode(this._staleRequests[requestId]).refreshGraph(this.calculator);
+ for (var requestId in this._staleRequestIds)
+ this._requestGridNode(this._requestsById[requestId]).refreshGraph(this.calculator);
- this._staleRequests = {};
+ this._staleRequestIds = {};
this._sortItems();
this._updateSummaryBar();
this._dataGrid.updateWidths();
@@ -822,7 +823,7 @@ WebInspector.NetworkLogView.prototype = {
this._requests = [];
this._requestsById = {};
- this._staleRequests = {};
+ this._staleRequestIds = {};
this._requestGridNodes = {};
this._resetSuggestionBuilder();
@@ -906,7 +907,7 @@ WebInspector.NetworkLogView.prototype = {
this._suggestionBuilder.addItem(WebInspector.NetworkPanel.FilterType.SetCookieValue, cookie.value());
}
- this._staleRequests[request.requestId] = request;
+ this._staleRequestIds[request.requestId] = true;
this._scheduleRefresh();
},
« 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