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

Unified Diff: webkit/glue/webworkerclient_impl.cc

Issue 159429: Enable layout tests: worker-constructor.html and worker-script-error.html.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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: webkit/glue/webworkerclient_impl.cc
===================================================================
--- webkit/glue/webworkerclient_impl.cc (revision 21664)
+++ webkit/glue/webworkerclient_impl.cc (working copy)
@@ -212,10 +212,17 @@
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 @@
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(

Powered by Google App Engine
This is Rietveld 408576698