| 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 c3d395b70091abac31014faee6c00a895e1481b3..ebf6e7d513d2acd7e3a3a6b2d01caff95ae10caa 100644
|
| --- a/third_party/WebKit/Source/core/events/EventTarget.cpp
|
| +++ b/third_party/WebKit/Source/core/events/EventTarget.cpp
|
| @@ -336,6 +336,16 @@ void EventTarget::AddedEventListener(
|
| UseCounter::Count(executing_window->document(),
|
| UseCounter::kSlotChangeEventAddListener);
|
| }
|
| + } else if (EventUtil::IsDOMMutationEventType(event_type)) {
|
| + if (ExecutionContext* context = GetExecutionContext()) {
|
| + String message_text = String::Format(
|
| + "Added synchronous DOM mutation listener to a '%s' event. "
|
| + "Consider using MutationObserver to make the page more responsive.",
|
| + event_type.GetString().Utf8().data());
|
| + PerformanceMonitor::ReportGenericViolation(
|
| + context, PerformanceMonitor::kDiscouragedAPIUse, message_text, 0,
|
| + nullptr);
|
| + }
|
| }
|
| }
|
|
|
|
|