Index: Source/core/workers/WorkerMessagingProxy.cpp |
diff --git a/Source/core/workers/WorkerMessagingProxy.cpp b/Source/core/workers/WorkerMessagingProxy.cpp |
index d165ee2e37661bfc6110128bc2b1b2717e5109e7..a9404196326a934b4988c8eda1a29d428784eb9f 100644 |
--- a/Source/core/workers/WorkerMessagingProxy.cpp |
+++ b/Source/core/workers/WorkerMessagingProxy.cpp |
@@ -138,9 +138,10 @@ private: |
// We don't bother checking the askedToTerminate() flag here, because exceptions should *always* be reported even if the thread is terminated. |
// This is intentionally different than the behavior in MessageWorkerTask, because terminated workers no longer deliver messages (section 4.6 of the WebWorker spec), but they do report exceptions. |
- bool errorHandled = !workerObject->dispatchEvent(ErrorEvent::create(m_errorMessage, m_sourceURL, m_lineNumber, m_columnNumber)); |
+ RefPtr<ErrorEvent> event = ErrorEvent::create(m_errorMessage, m_sourceURL, m_lineNumber, m_columnNumber); |
+ bool errorHandled = !workerObject->dispatchEvent(event); |
if (!errorHandled) |
- context->reportException(m_errorMessage, m_lineNumber, m_columnNumber, m_sourceURL, 0); |
+ context->reportException(event, 0); |
} |
String m_errorMessage; |