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

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

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
Index: third_party/WebKit/Source/core/timing/PerformanceBase.h
diff --git a/third_party/WebKit/Source/core/timing/PerformanceBase.h b/third_party/WebKit/Source/core/timing/PerformanceBase.h
index db35f6c80f5bdbde1d9e5f6573bcede630522ac5..d4d9f6971731754c9130e8477dfeb8f1ae7594d0 100644
--- a/third_party/WebKit/Source/core/timing/PerformanceBase.h
+++ b/third_party/WebKit/Source/core/timing/PerformanceBase.h
@@ -75,6 +75,7 @@ class CORE_EXPORT PerformanceBase : public EventTargetWithInlineData {
// http://www.w3.org/TR/hr-time-2/#privacy-security
static double clampTimeResolution(double timeSeconds);
+ // monotonicTime needs to be no smaller than timeOrigin.
static DOMHighResTimeStamp monotonicTimeToDOMHighResTimeStamp(
double timeOrigin,
double monotonicTime);
@@ -82,7 +83,8 @@ class CORE_EXPORT PerformanceBase : public EventTargetWithInlineData {
// Translate given platform monotonic time in seconds into a high resolution
// DOMHighResTimeStamp in milliseconds. The result timestamp is relative to
// document's time origin and has a time resolution that is safe for
- // exposing to web.
+ // exposing to web. The monotonic time provided needs to be no smaller than
+ // document's time origin.
DOMHighResTimeStamp monotonicTimeToDOMHighResTimeStamp(double) const;
DOMHighResTimeStamp now() const;

Powered by Google App Engine
This is Rietveld 408576698