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 03975f55dccae5d83bfc62786ce24a87749c1c1d..373a20500bf6cf4070b6e7766a584f735fbbbeaa 100644 |
--- a/third_party/WebKit/Source/core/events/EventTarget.cpp |
+++ b/third_party/WebKit/Source/core/events/EventTarget.cpp |
@@ -32,8 +32,8 @@ |
#include "core/events/EventTarget.h" |
#include "bindings/core/v8/ExceptionState.h" |
-#include "bindings/core/v8/ScriptCallStack.h" |
#include "bindings/core/v8/ScriptEventListener.h" |
+#include "bindings/core/v8/SourceLocation.h" |
#include "bindings/core/v8/V8DOMActivityLogger.h" |
#include "core/dom/ExceptionCode.h" |
#include "core/editing/Editor.h" |
@@ -101,13 +101,10 @@ void reportBlockedEvent(ExecutionContext* context, const Event* event, Registere |
"Handling of '%s' input event was delayed for %ld ms due to main thread being busy. " |
"Consider marking event handler as 'passive' to make the page more responive.", |
event->type().getString().utf8().data(), lround(delayedSeconds * 1000)); |
- ConsoleMessage* message = nullptr; |
v8::Local<v8::Function> function = eventListenerEffectiveFunction(v8Listener->isolate(), handler); |
- if (!function.IsEmpty()) |
- message = ConsoleMessage::create(JSMessageSource, WarningMessageLevel, messageText, String(), function->GetScriptLineNumber() + 1, function->GetScriptColumnNumber() + 1, nullptr, function->ScriptId()); |
- else |
- message = ConsoleMessage::create(JSMessageSource, WarningMessageLevel, messageText, String(), 0, 0); |
+ OwnPtr<SourceLocation> location = SourceLocation::fromFunction(function); |
+ ConsoleMessage* message = ConsoleMessage::create(JSMessageSource, WarningMessageLevel, messageText, std::move(location)); |
context->addConsoleMessage(message); |
registeredListener->setBlockedEventWarningEmitted(); |
} |