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

Unified Diff: third_party/WebKit/Source/core/timing/PerformanceBase.cpp

Issue 2622283007: Added DCHECK for monotonicTimeToDOMHighResTimeStamp in PerformanceBase (Closed)
Patch Set: added comments for monotonicTimeToDOMHighResTimeStamp in PerformanceBase 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
« no previous file with comments | « third_party/WebKit/Source/core/timing/PerformanceBase.h ('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/core/timing/PerformanceBase.cpp
diff --git a/third_party/WebKit/Source/core/timing/PerformanceBase.cpp b/third_party/WebKit/Source/core/timing/PerformanceBase.cpp
index 462a8b845989e86d327a6fabc3f194e4278c70be..d9eea13e88f2d8e555bbc778bf9cf821c176645f 100644
--- a/third_party/WebKit/Source/core/timing/PerformanceBase.cpp
+++ b/third_party/WebKit/Source/core/timing/PerformanceBase.cpp
@@ -577,8 +577,7 @@ DOMHighResTimeStamp PerformanceBase::monotonicTimeToDOMHighResTimeStamp(
return 0.0;
double timeInSeconds = monotonicTime - timeOrigin;
- if (timeInSeconds < 0)
- return 0.0;
+ DCHECK_GE(timeInSeconds, 0);
return convertSecondsToDOMHighResTimeStamp(
clampTimeResolution(timeInSeconds));
}
« no previous file with comments | « third_party/WebKit/Source/core/timing/PerformanceBase.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698