Bug 37143

Summary: Chromium: worker exceptions are not shown in console
Product: WebKit Reporter: Andrey Kosyakov <caseq>
Component: WebKit Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Minor CC: commit-queue, yurys
Priority: P3    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Fixed reporting of unhandled worker exceptions by inverting check for EventTarget.dispatchEvent result in accordance with its spec none

Description Andrey Kosyakov 2010-04-06 02:33:11 PDT
workerExceptions.html:

<html>
<script>
var w = new Worker("workerException.js");
</script>
</html>

workerException.js:
throw { };

EXPECTED: Loading workerException.html should cause a console message "Uncaught #<an Object>" to be printed to console.
ACTUAL: nothing happens

This stopped working after r56402, when semantics of EventTarget.dispatchEvent() was slightly changed. The code in WebWorkerClientImpl::postExceptionToWorkerObject(), however, was incorrect before, as EventTarget.dispatchEvent() is supposed to return true iff no event handlers called preventDefault() (i.e. event is unhandled).
Comment 1 Andrey Kosyakov 2010-04-06 03:01:32 PDT
Created attachment 52619 [details]
Fixed reporting of unhandled worker exceptions by inverting check for EventTarget.dispatchEvent result in accordance with its spec
Comment 2 Yury Semikhatsky 2010-04-06 03:03:48 PDT
Comment on attachment 52619 [details]
Fixed reporting of unhandled worker exceptions by inverting check for EventTarget.dispatchEvent result in accordance with its spec

Please make sure this change doesn't break layout tests.
Comment 3 WebKit Commit Bot 2010-04-06 03:14:11 PDT
Comment on attachment 52619 [details]
Fixed reporting of unhandled worker exceptions by inverting check for EventTarget.dispatchEvent result in accordance with its spec

Clearing flags on attachment: 52619

Committed r57138: <http://trac.webkit.org/changeset/57138>
Comment 4 WebKit Commit Bot 2010-04-06 03:14:15 PDT
All reviewed patches have been landed.  Closing bug.