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/NetworkTimeCalculator.js

Issue 2653363002: [Devtools] Added typing to network in prep for removing unrestricted (Closed)
Patch Set: changes Created 3 years, 11 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
Index: third_party/WebKit/Source/devtools/front_end/network/NetworkTimeCalculator.js
diff --git a/third_party/WebKit/Source/devtools/front_end/network/NetworkTimeCalculator.js b/third_party/WebKit/Source/devtools/front_end/network/NetworkTimeCalculator.js
index 26006cd5b9a16e8595e733c9954b8f7071b53532..05ceea8e50a22e8772385dd9ca7995efdfe3ec72 100644
--- a/third_party/WebKit/Source/devtools/front_end/network/NetworkTimeCalculator.js
+++ b/third_party/WebKit/Source/devtools/front_end/network/NetworkTimeCalculator.js
@@ -58,6 +58,8 @@ Network.NetworkTimeCalculator = class extends Common.Object {
constructor(startAtZero) {
super();
this.startAtZero = startAtZero;
+ this._minimumBoundary = -1;
+ this._maximumBoundary = -1;
this._boundryChangedEventThrottler = new Common.Throttler(0);
/** @type {?Network.NetworkTimeBoundary} */
this._window = null;
@@ -143,8 +145,8 @@ Network.NetworkTimeCalculator = class extends Common.Object {
}
reset() {
- delete this._minimumBoundary;
- delete this._maximumBoundary;
+ this._minimumBoundary = -1;
+ this._maximumBoundary = -1;
this._boundaryChanged();
}
@@ -296,7 +298,7 @@ Network.NetworkTimeCalculator = class extends Common.Object {
var previousMinimumBoundary = this._minimumBoundary;
var previousMaximumBoundary = this._maximumBoundary;
const minOffset = Network.NetworkTimeCalculator._minimumSpread;
- if (typeof this._minimumBoundary === 'undefined' || typeof this._maximumBoundary === 'undefined') {
+ if (this._minimumBoundary === -1 || this._maximumBoundary === -1) {
this._minimumBoundary = timestamp;
this._maximumBoundary = timestamp + minOffset;
} else {

Powered by Google App Engine
This is Rietveld 408576698