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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sdk/ServerTiming.js

Issue 2689833002: DevTools: Server Timing values should be in milliseconds (Closed)
Patch Set: nullable value. Created 3 years, 10 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 | « third_party/WebKit/Source/devtools/front_end/network/RequestTimingView.js ('k') | 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/sdk/ServerTiming.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/ServerTiming.js b/third_party/WebKit/Source/devtools/front_end/sdk/ServerTiming.js
index 04a329670442f110e4e3effc28fd0b51d650d61f..186f0fd9d77949de0532f6962f4a3cfb19402432 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/ServerTiming.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/ServerTiming.js
@@ -7,8 +7,8 @@
SDK.ServerTiming = class {
/**
* @param {string} metric
- * @param {number} value
- * @param {string} description
+ * @param {?number} value
+ * @param {?string} description
*/
constructor(metric, value, description) {
this.metric = metric;
@@ -39,9 +39,11 @@ SDK.ServerTiming = class {
var metric = metricMatch[1];
var value = metricMatch[2];
var description = metricMatch[3] || metricMatch[4];
- if (value !== null)
+ if (value !== undefined)
value = Math.abs(parseFloat(metricMatch[2]));
valueString = metricMatch[5]; // comma delimited headers
+ if (value === undefined || isNaN(value))
+ value = null;
result.push(new SDK.ServerTiming(metric, value, description));
}
return result;
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/network/RequestTimingView.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698