| Index: third_party/WebKit/Source/core/events/EventTarget.cpp
|
| diff --git a/third_party/WebKit/Source/core/events/EventTarget.cpp b/third_party/WebKit/Source/core/events/EventTarget.cpp
|
| index 99562b50dbc1064632c9c4b1335e3a1f0570fef2..b7bd6325e42488f7b6765afba9eb48a0c41be74f 100644
|
| --- a/third_party/WebKit/Source/core/events/EventTarget.cpp
|
| +++ b/third_party/WebKit/Source/core/events/EventTarget.cpp
|
| @@ -59,8 +59,6 @@ using namespace WTF;
|
| namespace blink {
|
| namespace {
|
|
|
| -static const double kBlockedWarningThresholdMillis = 100.0;
|
| -
|
| enum PassiveForcedListenerResultType {
|
| PreventDefaultNotCalled,
|
| DocumentLevelTouchPreventDefaultCalled,
|
| @@ -96,15 +94,14 @@ bool isScrollBlockingEvent(const AtomicString& eventType) {
|
| eventType == EventTypeNames::wheel;
|
| }
|
|
|
| -double blockedEventsWarningThreshold(ExecutionContext* context, Event* event) {
|
| +double blockedEventsWarningThreshold(ExecutionContext* context,
|
| + const Event* event) {
|
| if (!event->cancelable())
|
| return 0.0;
|
| if (!isScrollBlockingEvent(event->type()))
|
| return 0.0;
|
| -
|
| - return PerformanceMonitor::enabled(context)
|
| - ? kBlockedWarningThresholdMillis / 1000
|
| - : 0;
|
| + return PerformanceMonitor::threshold(context,
|
| + PerformanceMonitor::kBlockedEvent);
|
| }
|
|
|
| void reportBlockedEvent(ExecutionContext* context,
|
| @@ -135,8 +132,10 @@ void reportBlockedEvent(ExecutionContext* context,
|
| eventListenerEffectiveFunction(v8Listener->isolate(), handler);
|
| std::unique_ptr<SourceLocation> location =
|
| SourceLocation::fromFunction(function);
|
| - PerformanceMonitor::logViolation(WarningMessageLevel, context, messageText,
|
| - std::move(location));
|
| +
|
| + PerformanceMonitor::reportGenericViolation(
|
| + context, PerformanceMonitor::kBlockedEvent, messageText, delayedSeconds,
|
| + std::move(location));
|
| registeredListener->setBlockedEventWarningEmitted();
|
| }
|
|
|
|
|