AnalyticalGraphicsInc/cesium — pull request #1005 by shunter (2013-08-02 02:00:51+00:00)
Title: Add error handling to TaskProcessor

If a TaskProcessor threw an error in the Worker, the promise would never resolve. Instead, if an error occurs in the worker, reject the promise. This applies to both errors thrown while the worker code runs, as well as DataCloneErrors that may occur if the worker tries to post a message that can't be cloned, or transfer a non-transferable object, etc.

Also add tests for TaskProcessor, and add a helper function to that adapts promises to the Jasmine "waitsFor" style, and also lets you make further assertions on the resolved result or rejected error.