Re: Using promises from C++

2014-04-21 Thread Joshua Cranmer 🐧
On 4/22/2014 12:46 AM, Boris Zbarsky wrote: On 4/22/14, 12:24 AM, Joshua Cranmer 🐧 wrote: I consider Promise more like a generic platform feature (considering that the specification is moving to ES6 instead of DOM) ES assumes you always have a global. In fact, until ES6 it assumed that there

Re: Using promises from C++

2014-04-21 Thread Boris Zbarsky
On 4/22/14, 12:24 AM, Joshua Cranmer 🐧 wrote: I managed to, in one of my playground techniques, create a global using a backstage pass and some xpconnect APIs, so it's not impossible but it is damn annoying. Right. If you don't have a global to start with, your life will _really_ suck if you

Re: Using promises from C++

2014-04-21 Thread Joshua Cranmer 🐧
On 4/21/2014 10:52 PM, Boris Zbarsky wrote: On 4/21/14, 11:35 PM, Joshua Cranmer 🐧 wrote: I'm referring to using a Promise, essentially, in backend code of Thunderbird. There is no "window" I mean Window in the "DOM Window" sense. Promises can be created using some other global (which one is

Re: Using promises from C++

2014-04-21 Thread Boris Zbarsky
On 4/21/14, 11:35 PM, Joshua Cranmer 🐧 wrote: I'm referring to using a Promise, essentially, in backend code of Thunderbird. There is no "window" I mean Window in the "DOM Window" sense. Promises can be created using some other global (which one is up to the person creating it), but typically

Re: Using promises from C++

2014-04-21 Thread Joshua Cranmer 🐧
On 4/21/2014 9:34 PM, Boris Zbarsky wrote: On 4/21/14, 7:31 PM, Joshua Cranmer 🐧 wrote: Now, creating a Promise (via mozilla::dom::Promise) from C++ and passing it to JS is possible but kind of difficult, since I need to materialize an nsIGlobalObject which requires too much code. You basicall

Re: Using promises from C++

2014-04-21 Thread Boris Zbarsky
On 4/21/14, 7:31 PM, Joshua Cranmer 🐧 wrote: Now, creating a Promise (via mozilla::dom::Promise) from C++ and passing it to JS is possible but kind of difficult, since I need to materialize an nsIGlobalObject which requires too much code. You basically need the window the promise will be associ

Using promises from C++

2014-04-21 Thread Joshua Cranmer 🐧
Right now, the received wisdom as I understand it is that Promises are the hot, hip new way to do asynchronous programming. So, over here in $WE_WANT_TO_REMOVE_CRUFT, I proposed adding a new API that returns a Promise for all the JS consumers. This new API, naturally, is to be implemented in JS

Re: Removing "[PID]" prefix from |make mozmill| warning/error/assertion lines?

2014-04-21 Thread Zack Weinberg
On 2014-04-21 1:07 PM, Steve Fink wrote: On Sat 19 Apr 2014 08:36:22 AM PDT, ISHIKAWA,chiaki wrote: egrep "^(\\[[0-9]*\\] |)WARNING" $1 | egrep NS_ENSURE | grep -v "sort operation has occurred for the SQL statement" | sort | uniq -f1 -c | sort -n -r It'd be easier if you threw in a *little* b

Re: Rendering meeting today, Monday 5:30pm PDT ("the later time")

2014-04-21 Thread Jeff Muizelaar
This meeting has been cancelled as there’s nothing substantial on the agenda. -Jeff On Apr 21, 2014, at 10:35 AM, Milan Sreckovic wrote: > (Sorry for the late notice, I should have sent this out before the weekend, > but the holiday meant I missed the reminder.) > > > The Rendering meeting i

Re: Strengthening "special cases" language in API exposure guidelines

2014-04-21 Thread Jonas Sicking
On Mon, Apr 21, 2014 at 6:30 AM, Andrew Overholt wrote: > +It is '''highly unlikely''' that we will expose this functionality > +to the web at large. I would rather say that "we should avoid exposing this functionality to the web at large." Otherwise it sounds like some ominous 3rd party is caus

Re: Landing c-c-breaking changes that remove c-c-only code from m-c

2014-04-21 Thread Joshua Cranmer 🐧
On 4/21/2014 11:50 AM, Ehsan Akhgari wrote: You can check CONFIG['MOZ_BUILD_APP'] against what you pass to --enable-application in mozconfig files. So that would be 'mailnews' (or 'mail'?) and 'suite' for Thunderbird and Seamonkey respectively. Actually, CONFIG['MOZ_THUNDERBIRD'] and CONFIG['MOZ

Re: Removing "[PID]" prefix from |make mozmill| warning/error/assertion lines?

2014-04-21 Thread Steve Fink
On Sat 19 Apr 2014 08:36:22 AM PDT, ISHIKAWA,chiaki wrote: > egrep "^(\\[[0-9]*\\] |)WARNING" $1 | egrep NS_ENSURE | grep -v "sort > operation has occurred for the SQL statement" | sort | uniq -f1 -c | > sort -n -r It'd be easier if you threw in a *little* bit of perl: perl -lne 'print $1 if /

Re: Landing c-c-breaking changes that remove c-c-only code from m-c

2014-04-21 Thread Ehsan Akhgari
On Fri, Apr 18, 2014 at 11:21 AM, ISHIKAWA, Chiaki wrote: > (2014/04/18 2:00), Ehsan Akhgari wrote: > >> On 2014-04-17, 10:00 AM, Neil wrote: >> >>> Henri Sivonen wrote: >>> >>> I am not done preparing the removal patches yet, but with my current patch queue I can already get 149 KB off of A

Rendering meeting today, Monday 5:30pm PDT ("the later time")

2014-04-21 Thread Milan Sreckovic
(Sorry for the late notice, I should have sent this out before the weekend, but the holiday meant I missed the reminder.) The Rendering meeting is about all things Gfx, Image, Layout, and Media. It takes place every second Monday, alternating between 2:30pm PDT and 5:30pm PDT. The next meeting

Strengthening "special cases" language in API exposure guidelines

2014-04-21 Thread Andrew Overholt
Hi, I've been told that it would be nice if we had stronger language in our API exposure guidelines [1] around when we deviate from them. This is mostly applicable when we expose things to Firefox OS applications. The changes I propose to the "Special cases" section [2] are: -There will o