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

Unified Diff: third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp

Issue 2116563003: [DevTools] Report unhandled exceptions and promise rejections through Runtime. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tests pass 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/workers/WorkerGlobalScope.cpp
diff --git a/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp b/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp
index d20f8ba0ef0e7369470886c78ea4ffea62c3f814..d44ec3b1d28f347cf8be3c556380a05e1d16aa0b 100644
--- a/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp
+++ b/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp
@@ -355,7 +355,8 @@ void WorkerGlobalScope::countDeprecation(UseCounter::Feature feature) const
void WorkerGlobalScope::exceptionUnhandled(const String& errorMessage, std::unique_ptr<SourceLocation> location)
{
- addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, errorMessage, std::move(location)));
+ if (WorkerThreadDebugger* debugger = WorkerThreadDebugger::from(thread()->isolate()))
+ debugger->exceptionUnhandled(errorMessage, std::move(location));
}
bool WorkerGlobalScope::isSecureContext(String& errorMessage, const SecureContextCheck privilegeContextCheck) const

Powered by Google App Engine
This is Rietveld 408576698