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

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: full stack trace 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/EventTarget.cpp
diff --git a/third_party/WebKit/Source/core/events/EventTarget.cpp b/third_party/WebKit/Source/core/events/EventTarget.cpp
index 102516b95bedb3b4394cebbe22d5275d4f9ef602..e82599fb6a6c42890a12b45fd8a106e3c9afe63f 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"
@@ -99,13 +99,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();
}

Powered by Google App Engine
This is Rietveld 408576698