On Mon, Feb 25, 2013 at 12:28 PM, Andrew Sutherland <[email protected]> wrote: > Currently, Gecko's workers are limited in terms of functionality because > many bindings use XPConnect but only new JSClass/Paris-style bindings can be > exposed. See https://bugzilla.mozilla.org/show_bug.cgi?id=580070 for more > on that. > > Is it our plan to expose all of our WebAPI's to Web Workers, or only a > subset?
There's a decent amount of work to do for each API that we want to expose to workers. We're working on reducing this amount of work, but ultimately it's always work to make code work off the main thread. So I don't believe the plan is to expose "all of our WebAPI's". Instead we need to determine this on a case-by-case basis based on the amount of work needed and the amount of value added. > The background for my question is that we are currently trying to move much > of the e-mail back-end into a worker. (A background page would have been > preferred but those aren't really supported and would introduce too many > edge cases at the current time.) For > https://bugzilla.mozilla.org/show_bug.cgi?id=832824 we want to resolve > e-mail addresses to contacts from the mozContacts WebAPI. This is something > that could be done in the mail libs back-end on the worker, on the front-end > side of the mail libs 'bridge' in the main page itself, or something the > Gaia e-mail UI could do on its own. The right choice for the medium future > depends on whether mozContacts will eventually be available on the worker or > not. (In the long-term, the back-end will want to know about contacts to > support advanced features, no matter what.) We could expose contacts to workers, but I think there's a fair amount of infrastructure missing still, so I wouldn't expect this to happen soon. In particular the following pieces are missing: * Ability to implement WebIDL interfaces in JS (this is being actively worked on and will likely happen soon) * Ability to use .ipdl protocols from workers (we have a hack to sort of make this work, but nothing will likely land for another few months). * Ability to use JS components in workers (not currently worked on. I don't know how much work would be involved) * Expose message manager to JS components in workers (not currently worked on). So basically I wouldn't engineer for this being in place very soon. It might happen eventually, but I think we'll have several releases between now and then. / Jonas _______________________________________________ dev-b2g mailing list [email protected] https://lists.mozilla.org/listinfo/dev-b2g
