| Index: third_party/WebKit/Source/core/events/Event.cpp
|
| diff --git a/third_party/WebKit/Source/core/events/Event.cpp b/third_party/WebKit/Source/core/events/Event.cpp
|
| index 3f4f9738ab5a41f8a1bf82f77ac5280491cbcf3d..8d201b7fe90764828b2c4be634c02b2e5488cb99 100644
|
| --- a/third_party/WebKit/Source/core/events/Event.cpp
|
| +++ b/third_party/WebKit/Source/core/events/Event.cpp
|
| @@ -30,6 +30,7 @@
|
| #include "core/svg/SVGElement.h"
|
| #include "core/timing/DOMWindowPerformance.h"
|
| #include "core/timing/Performance.h"
|
| +#include "platform/Histogram.h"
|
| #include "wtf/CurrentTime.h"
|
|
|
| namespace blink {
|
| @@ -60,6 +61,13 @@ Event::Event()
|
| Event::Event(const AtomicString& eventType, bool canBubbleArg, bool cancelableArg, double platformTimeStamp)
|
| : Event(eventType, canBubbleArg, cancelableArg, ComposedMode::Scoped, platformTimeStamp)
|
| {
|
| + // Verify that timestamp is coming from the monotonic clock.
|
| + double delta = monotonicallyIncreasingTime() - platformTimeStamp;
|
| + bool hasValidTimebase = delta >= 0 && delta <= 60 * 1000;
|
| +
|
| + DEFINE_STATIC_LOCAL(BooleanHistogram, histogram, ("Event.TimestampHasValidTimebase.Renderer"));
|
| + histogram.count(hasValidTimebase);
|
| + DCHECK(hasValidTimebase);
|
| }
|
|
|
| Event::Event(const AtomicString& eventType, bool canBubbleArg, bool cancelableArg, ComposedMode composedMode)
|
|
|