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

Unified Diff: third_party/WebKit/Source/core/events/RegisteredEventListener.h

Issue 1949793002: Emit a console warning when blocking event listener is delayed for too long (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 7 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/events/RegisteredEventListener.h
diff --git a/third_party/WebKit/Source/core/events/RegisteredEventListener.h b/third_party/WebKit/Source/core/events/RegisteredEventListener.h
index 01eb8fe2070c6dadb67c474748402395a3041a84..03797c01c5362859c9fd5970807f54ce94d0939a 100644
--- a/third_party/WebKit/Source/core/events/RegisteredEventListener.h
+++ b/third_party/WebKit/Source/core/events/RegisteredEventListener.h
@@ -36,6 +36,7 @@ public:
RegisteredEventListener()
: m_useCapture(false)
, m_passive(false)
+ , m_blockedEventWarningEmitted(false)
{
}
@@ -43,6 +44,7 @@ public:
: m_listener(listener)
, m_useCapture(options.capture())
, m_passive(options.passive())
+ , m_blockedEventWarningEmitted(false)
{
}
@@ -79,6 +81,16 @@ public:
return m_useCapture;
}
+ bool blockedEventWarningEmitted() const
+ {
+ return m_blockedEventWarningEmitted;
+ }
+
+ void setBlockedEventWarningEmitted()
+ {
+ m_blockedEventWarningEmitted = true;
+ }
+
bool matches(const EventListener* listener, const EventListenerOptions& options) const
{
// Equality is soley based on the listener and useCapture flags.
@@ -99,6 +111,7 @@ private:
Member<EventListener> m_listener;
unsigned m_useCapture : 1;
unsigned m_passive : 1;
+ unsigned m_blockedEventWarningEmitted : 1;
};
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/events/EventTarget.cpp ('k') | third_party/WebKit/Source/core/frame/Settings.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698