On Feb 14, 2:46 am, Boris Zbarsky <bzbar...@mit.edu> wrote: > On 2/13/13 7:36 PM, Simon Kornblith wrote: > > > Don't workers have access to XMLHttpRequest? > > That's implemented by sending messages to the main thread and doing the > XHR from there, so no messages means no XHR. > > -Boris
There's a difference between workers being able to communicate with their pages via 'messages' (e.g. postMessage) and workers being able to communicate with the main thread behind the scenes via runnables. XHR doesn't require workers to have access to postMessage for instance. Basically there are many different ways in which a worker can be closed. For normal page navigation causes (e.g. page falls out of bfcache) workers get notified that they're being torn down and then have some small amount of time to do additional processing (currently that really only includes sync XHR). They could 'while(1)' of course but they will be killed as soon as their timeout expires. We skip the close handler entirely if the application is shutting down, so we shouldn't expect any XHRs to happen during shutdown anyway. The different shutdown scenarios are listed and explained here: http://mxr.mozilla.org/mozilla-central/source/dom/workers/WorkerFeature.h#13 -bent _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform