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

Unified Diff: third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.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/workers/InProcessWorkerMessagingProxy.cpp
diff --git a/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp b/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp
index 577ecbab82dd01ee622704d81e0a46b07762980e..e9025ad610e3000fb5941b76603712399a07777d 100644
--- a/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp
+++ b/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp
@@ -57,10 +57,10 @@ namespace blink {
namespace {
-void processUnhandledExceptionOnWorkerGlobalScope(const String& errorMessage, std::unique_ptr<SourceLocation> location, ExecutionContext* scriptContext)
+void processUnhandledExceptionOnWorkerGlobalScope(int exceptionId, ExecutionContext* scriptContext)
{
WorkerGlobalScope* globalScope = toWorkerGlobalScope(scriptContext);
- globalScope->exceptionUnhandled(errorMessage, std::move(location));
+ globalScope->exceptionUnhandled(exceptionId);
}
void processMessageOnWorkerGlobalScope(PassRefPtr<SerializedScriptValue> message, std::unique_ptr<MessagePortChannelArray> channels, InProcessWorkerObjectProxy* workerObjectProxy, ExecutionContext* scriptContext)
@@ -177,7 +177,7 @@ void InProcessWorkerMessagingProxy::postTaskToLoader(std::unique_ptr<ExecutionCo
getExecutionContext()->postTask(BLINK_FROM_HERE, std::move(task));
}
-void InProcessWorkerMessagingProxy::reportException(const String& errorMessage, std::unique_ptr<SourceLocation> location)
+void InProcessWorkerMessagingProxy::reportException(const String& errorMessage, std::unique_ptr<SourceLocation> location, int exceptionId)
{
DCHECK(isParentContextThread());
if (!m_workerObject)
@@ -191,7 +191,7 @@ void InProcessWorkerMessagingProxy::reportException(const String& errorMessage,
ErrorEvent* event = ErrorEvent::create(errorMessage, location->clone(), nullptr);
if (m_workerObject->dispatchEvent(event) == DispatchEventResult::NotCanceled)
- postTaskToWorkerGlobalScope(createCrossThreadTask(&processUnhandledExceptionOnWorkerGlobalScope, errorMessage, passed(std::move(location))));
+ postTaskToWorkerGlobalScope(createCrossThreadTask(&processUnhandledExceptionOnWorkerGlobalScope, exceptionId));
}
void InProcessWorkerMessagingProxy::reportConsoleMessage(MessageSource source, MessageLevel level, const String& message, std::unique_ptr<SourceLocation> location)

Powered by Google App Engine
This is Rietveld 408576698