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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/ScriptEventListener.cpp

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: review comments addressed 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/bindings/core/v8/ScriptEventListener.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptEventListener.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptEventListener.cpp
index f491043518e66e88ce5aa9df9ea3e4b6e3ed27ce..c5eb0a293519de09c46bae967f5a59b86dc96f51 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptEventListener.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptEventListener.cpp
@@ -95,31 +95,4 @@ v8::Local<v8::Object> eventListenerHandler(ExecutionContext* executionContext, E
return v8Listener->getListenerObject(executionContext);
}
-v8::Local<v8::Function> eventListenerEffectiveFunction(v8::Isolate* isolate, v8::Local<v8::Object> handler)
-{
- v8::Local<v8::Function> function;
- if (handler->IsFunction()) {
- function = handler.As<v8::Function>();
- } else if (handler->IsObject()) {
- v8::Local<v8::Value> property;
- // Try the "handleEvent" method (EventListener interface).
- if (handler->Get(handler->CreationContext(), v8AtomicString(isolate, "handleEvent")).ToLocal(&property) && property->IsFunction())
- function = property.As<v8::Function>();
- // Fall back to the "constructor" property.
- else if (handler->Get(handler->CreationContext(), v8AtomicString(isolate, "constructor")).ToLocal(&property) && property->IsFunction())
- function = property.As<v8::Function>();
- }
- if (!function.IsEmpty())
- return getBoundFunction(function);
- return v8::Local<v8::Function>();
-}
-
-void getFunctionLocation(v8::Local<v8::Function> function, String& scriptId, int& lineNumber, int& columnNumber)
-{
- int scriptIdValue = function->ScriptId();
- scriptId = String::number(scriptIdValue);
- lineNumber = function->GetScriptLineNumber();
- columnNumber = function->GetScriptColumnNumber();
-}
-
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698