summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webworkerclient_impl.cc
diff options
context:
space:
mode:
authorjianli@chromium.org <jianli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-28 18:29:55 +0000
committerjianli@chromium.org <jianli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-28 18:29:55 +0000
commitbb08f1570dd01855b7a4d71ba37b43af5dae4578 (patch)
treedf21b77f7d7e129ecb256738046719fa8c518f92 /webkit/glue/webworkerclient_impl.cc
parentbec2c9fbba00e66bf5b13c59d021a0aa4d03427b (diff)
downloadchromium_src-bb08f1570dd01855b7a4d71ba37b43af5dae4578.zip
chromium_src-bb08f1570dd01855b7a4d71ba37b43af5dae4578.tar.gz
chromium_src-bb08f1570dd01855b7a4d71ba37b43af5dae4578.tar.bz2
Enable layout tests: worker-constructor.html and worker-script-error.html.
BUG=none TEST=none Review URL: http://codereview.chromium.org/159429 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21863 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webworkerclient_impl.cc')
-rw-r--r--webkit/glue/webworkerclient_impl.cc24
1 files changed, 18 insertions, 6 deletions
diff --git a/webkit/glue/webworkerclient_impl.cc b/webkit/glue/webworkerclient_impl.cc
index 22b7c17..1465eda 100644
--- a/webkit/glue/webworkerclient_impl.cc
+++ b/webkit/glue/webworkerclient_impl.cc
@@ -212,10 +212,17 @@ void WebWorkerClientImpl::postExceptionToWorkerObject(
return;
}
- script_execution_context_->reportException(
- webkit_glue::WebStringToString(error_message),
- line_number,
- webkit_glue::WebStringToString(source_url));
+ bool handled = false;
+ if (worker_->onerror())
+ handled = worker_->dispatchScriptErrorEvent(
+ webkit_glue::WebStringToString(error_message),
+ webkit_glue::WebStringToString(source_url),
+ line_number);
+ if (!handled)
+ script_execution_context_->reportException(
+ webkit_glue::WebStringToString(error_message),
+ line_number,
+ webkit_glue::WebStringToString(source_url));
}
void WebWorkerClientImpl::postConsoleMessageToWorkerObject(
@@ -325,8 +332,13 @@ void WebWorkerClientImpl::PostExceptionToWorkerObjectTask(
const WebCore::String& error_message,
int line_number,
const WebCore::String& source_url) {
- this_ptr->script_execution_context_->reportException(
- error_message, line_number, source_url);
+ bool handled = false;
+ if (this_ptr->worker_ && this_ptr->worker_->onerror())
+ handled = this_ptr->worker_->dispatchScriptErrorEvent(
+ error_message, source_url, line_number);
+ if (!handled)
+ this_ptr->script_execution_context_->reportException(
+ error_message, line_number, source_url);
}
void WebWorkerClientImpl::PostConsoleMessageToWorkerObjectTask(