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

Unified Diff: third_party/WebKit/Source/core/events/EventTarget.cpp

Issue 2016123002: Remove ScriptCallStack. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2006893004
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
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | third_party/WebKit/Source/core/frame/DOMWindow.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | third_party/WebKit/Source/core/frame/DOMWindow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698