diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2009-07-31 11:52:57 +1000 |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2009-07-31 11:52:57 +1000 |
commit | aa9cf406d62004519ad54596e1c391f9a6439210 (patch) | |
tree | dd562b9c296981f2761b76623911be8496c7af84 /src/3rdparty/webkit/WebCore/workers/WorkerMessagingProxy.cpp | |
parent | 987aec28b950e1c9817a20a9dd71afc071cd93ea (diff) | |
parent | 56b6a5924008ab5cdbae36e9662eddba923acd5e (diff) |
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'src/3rdparty/webkit/WebCore/workers/WorkerMessagingProxy.cpp')
-rw-r--r-- | src/3rdparty/webkit/WebCore/workers/WorkerMessagingProxy.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/3rdparty/webkit/WebCore/workers/WorkerMessagingProxy.cpp b/src/3rdparty/webkit/WebCore/workers/WorkerMessagingProxy.cpp index b6e16424b..5971c1dac 100644 --- a/src/3rdparty/webkit/WebCore/workers/WorkerMessagingProxy.cpp +++ b/src/3rdparty/webkit/WebCore/workers/WorkerMessagingProxy.cpp @@ -31,13 +31,13 @@ #include "WorkerMessagingProxy.h" +#include "DedicatedWorkerContext.h" #include "DOMWindow.h" #include "Document.h" #include "GenericWorkerTask.h" #include "MessageEvent.h" #include "ScriptExecutionContext.h" #include "Worker.h" -#include "WorkerContext.h" #include "WorkerThread.h" namespace WebCore { @@ -59,7 +59,7 @@ private: virtual void performTask(ScriptExecutionContext* scriptContext) { ASSERT(scriptContext->isWorkerContext()); - WorkerContext* context = static_cast<WorkerContext*>(scriptContext); + DedicatedWorkerContext* context = static_cast<DedicatedWorkerContext*>(scriptContext); RefPtr<MessagePort> port; if (m_channel) { port = MessagePort::create(*scriptContext); @@ -127,7 +127,15 @@ private: virtual void performTask(ScriptExecutionContext* context) { - if (!m_messagingProxy->askedToTerminate()) + Worker* workerObject = m_messagingProxy->workerObject(); + if (!workerObject || m_messagingProxy->askedToTerminate()) + return; + + bool errorHandled = false; + if (workerObject->onerror()) + errorHandled = workerObject->dispatchScriptErrorEvent(m_errorMessage, m_sourceURL, m_lineNumber); + + if (!errorHandled) context->reportException(m_errorMessage, m_lineNumber, m_sourceURL); } |