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

Unified Diff: third_party/WebKit/Source/core/inspector/ThreadDebugger.cpp

Issue 2170263002: [DevTools] Pass error object when reporting exceptions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: worklets! Created 4 years, 5 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/inspector/ThreadDebugger.cpp
diff --git a/third_party/WebKit/Source/core/inspector/ThreadDebugger.cpp b/third_party/WebKit/Source/core/inspector/ThreadDebugger.cpp
index 512815facaec1751c1982c29bbe2f70788631bf9..891d6284fc149e0fa649a3db7f92068d96f83dd4 100644
--- a/third_party/WebKit/Source/core/inspector/ThreadDebugger.cpp
+++ b/third_party/WebKit/Source/core/inspector/ThreadDebugger.cpp
@@ -117,12 +117,18 @@ unsigned ThreadDebugger::promiseRejected(v8::Local<v8::Context> context, const S
else if (message.startWith("Uncaught "))
message = message.substring(0, 8) + " (in promise)" + message.substring(8);
- unsigned result = debugger()->promiseRejected(context, message, exception, location->url(), location->lineNumber(), location->columnNumber(), location->cloneStackTrace(), location->scriptId());
- // TODO(dgozman): maybe not wrap in ConsoleMessage.
+ unsigned result = debugger()->exceptionThrown(context, defaultMessage, exception, message, location->url(), location->lineNumber(), location->columnNumber(), location->cloneStackTrace(), location->scriptId());
+ // TODO(dgozman): do not wrap in ConsoleMessage.
reportConsoleMessage(toExecutionContext(context), ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, message, std::move(location)));
return result;
}
+void ThreadDebugger::promiseRejectionRevoked(v8::Local<v8::Context> context, unsigned promiseRejectionId)
+{
+ const String16 message = "Handler added to rejected promise";
+ debugger()->exceptionRevoked(context, promiseRejectionId, message);
+}
+
void ThreadDebugger::beginUserGesture()
{
m_userGestureIndicator = wrapUnique(new UserGestureIndicator(DefinitelyProcessingNewUserGesture));

Powered by Google App Engine
This is Rietveld 408576698