There are a number of functions defined at global scope in WorkerContext - for example, setTimeout() and postMessage() are both defined in the worker global context.
It's perfectly valid for worker code to do this:
However, if the worker code does this instead, it gets a TypeError:
var saved = postMessage;
The test case works in Chromium, so it's somewhere in the JSC bindings.
On a related note, the following line of code from Worker Context results in a TypeError also:
Created attachment 33094 [details]
test case that shows this problem (passes on FF/Chrome, fails on Safari 4)
Created attachment 33209 [details]
This is dependent on 27420 as it relies on the IsWorkerContext attribute added in that patch.
Comment on attachment 33209 [details]
Awesome. Thanks for the patch.
assingning to me for landing