Index: third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp |
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp |
index 50780b6f6c7b413d0f4f9e391066ce35b720a957..a4ca289eb351c7023763eb28bbf3cae7c0fb9e75 100644 |
--- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp |
+++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp |
@@ -42,6 +42,7 @@ |
#include "core/fetch/ResourceLoaderOptions.h" |
#include "core/inspector/ConsoleMessage.h" |
#include "core/inspector/WorkerInspectorController.h" |
+#include "core/inspector/WorkerThreadDebugger.h" |
#include "core/loader/ThreadableLoader.h" |
#include "core/origin_trials/OriginTrialContext.h" |
#include "core/workers/WorkerClients.h" |
@@ -215,8 +216,8 @@ CachedMetadataHandler* ServiceWorkerGlobalScope::createWorkerScriptCachedMetadat |
void ServiceWorkerGlobalScope::logExceptionToConsole(const String& errorMessage, std::unique_ptr<SourceLocation> location) |
{ |
WorkerGlobalScope::logExceptionToConsole(errorMessage, location->clone()); |
- ConsoleMessage* consoleMessage = ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, errorMessage, std::move(location)); |
- addMessageToWorkerConsole(consoleMessage); |
+ if (WorkerThreadDebugger* debugger = WorkerThreadDebugger::from(thread()->isolate())) |
+ debugger->exceptionUnhandled(errorMessage, std::move(location)); |
} |
void ServiceWorkerGlobalScope::scriptLoaded(size_t scriptSize, size_t cachedMetadataSize) |