Re: [RFC] Modules for workers

2013-07-11 Thread Rob Campbell
On 2013-05-18, at 06:09 , David Rajchenbach-Teller wrote: > Hi everyone, > > As part of the ongoing effort to make (Chrome) Workers useful for > platform refactorings, we have been working on a lightweight module > loader for workers (bug 872421). This loader implements a minimal > versi

Re: [RFC] Modules for workers

2013-07-10 Thread Dave Townsend
On 5/28/2013 5:08 AM, David Rajchenbach-Teller wrote: On 5/27/13 7:34 PM, Jonas Sicking wrote: The alternative is to use C++ workers. This doesn't work for addons obviously, but those aren't yet a concern for B2G. Well, my main concern is front-end- and add-on-accessible code. Normally, it sho

Re: [RFC] Modules for workers

2013-05-28 Thread David Rajchenbach-Teller
On 5/27/13 7:34 PM, Jonas Sicking wrote: > The alternative is to use C++ workers. This doesn't work for addons > obviously, but those aren't yet a concern for B2G. Well, my main concern is front-end- and add-on-accessible code. Normally, it shouldn't influence B2G. > Weren't we moving addons into

Re: [RFC] Modules for workers

2013-05-27 Thread Jonas Sicking
The alternative is to use C++ workers. This doesn't work for addons obviously, but those aren't yet a concern for B2G. Weren't we moving addons into separate processes anyway? / Jonas On May 24, 2013 12:39 AM, "David Rajchenbach-Teller" wrote: > Well, if we do not want the main thread to collap

Re: [RFC] Modules for workers

2013-05-24 Thread David Rajchenbach-Teller
Well, if we do not want the main thread to collapse under its weight, we have to move code off the main thread and to encourage add-ons to do likewise. I'm not sure I see an alternative here. Cheers, David On 5/24/13 1:12 AM, Jonas Sicking wrote: > My main concern is that Workers created by Gec

Re: [RFC] Modules for workers

2013-05-23 Thread Jonas Sicking
On Sat, May 18, 2013 at 3:09 AM, David Rajchenbach-Teller wrote: > Hi everyone, > > As part of the ongoing effort to make (Chrome) Workers useful for > platform refactorings, we have been working on a lightweight module > loader for workers (bug 872421). This loader implements a minimal

Re: [RFC] Modules for workers

2013-05-22 Thread David Rajchenbach-Teller
It should be possible to share some modules between Jetpack and Workers, for Jetpack modules that do not depend on DOM or XPCOM and Worker modules that do not depend on Worker-only code. This is not an immediate goal, but it is considered a-would-be-nice-to-have. Cheers, David On 5/20/13 8:53 PM

Re: [RFC] Modules for workers

2013-05-22 Thread Dave Townsend
On 5/18/2013 3:09 AM, David Rajchenbach-Teller wrote: Hi everyone, As part of the ongoing effort to make (Chrome) Workers useful for platform refactorings, we have been working on a lightweight module loader for workers (bug 872421). This loader implements a minimal version of CommonJ

[RFC] Modules for workers

2013-05-18 Thread David Rajchenbach-Teller
Hi everyone, As part of the ongoing effort to make (Chrome) Workers useful for platform refactorings, we have been working on a lightweight module loader for workers (bug 872421). This loader implements a minimal version of CommonJS modules, aka require.js. Example: // Setup the loade