Thursday, July 12, 2007

WorkerPool destruction cleanup done, now on to actual features

The main things that I have volunteered to do for the next Gears milestone are:
I'm diving into the first of these two today. The first thing to do is figure out how to throw errors in each of the JavaScript engines globally. That is, if an error occurs in a WorkerPool and isn't handled by WorkerPool.onerror, then the error should be thrown in the global context of the parent page. Basically, it should do the same thing as what happens when you run this JavaScript code:

window.setTimeout("throw new Error('boo!')", 100);


Spidermonkey (the JavaScript engine inside Firefox) has an API that I believe we can use for this purpose: JS_ReportError. I'm not sure if there is an equivalent for IE, or if I will have to basically do something like: eval("throw new Error('boo!')"). I would like to avoid using eval if possible because it seems hacky and there are more security considerations.

No comments: