Re: Too many system compartments at start-up

2014-03-29 Thread satadm
среда, 26 марта 2014 г., 5:10:45 UTC+2 пользователь Nicholas Nethercote написал: On a related note, I just noticed that in my current session a lot of the system compartments appear twice or even more. Does anyone know how this can happen? I only have one browser window open. If you have

Promise.jsm and the predefined Promise object

2014-03-29 Thread Paolo Amadini
With bug 988122 landing soon, you'll now find a Promise object available by default in the global scope of JavaScript modules. However, this default implementation is still limited, and you're strongly recommended to import Promise.jsm explicitly in new modules:

Re: Overview of how web-exposed objects are implemented

2014-03-29 Thread Mike Hoye
On 2014-03-29, 1:32 AM, Boris Zbarsky wrote: Someone asked me today whether we have any sort of high-level overview of how web-exposed objects are implemented. I didn't know of any, so I put together a start at https://ask.mozilla.org/question/390/how-is-the-web-exposed-dom-implemented/.

Re: Promise.jsm and the predefined Promise object

2014-03-29 Thread Gregory Szorc
On 3/29/14, 5:55 AM, Paolo Amadini wrote: With bug 988122 landing soon, you'll now find a Promise object available by default in the global scope of JavaScript modules. However, this default implementation is still limited, and you're strongly recommended to import Promise.jsm explicitly in new

Re: Overview of how web-exposed objects are implemented

2014-03-29 Thread Jet Villegas
Excellent info, Boris! I added a link here and removed the TODO comment: https://wiki.mozilla.org/Gecko:Overview#DOM_.2F_Content --Jet - Original Message - From: Boris Zbarsky bzbar...@mit.edu To: dev-platform@lists.mozilla.org Sent: Friday, March 28, 2014 10:32:00 PM Subject: Overview

Re: Promise.jsm and the predefined Promise object

2014-03-29 Thread Boris Zbarsky
On 3/29/14 8:55 AM, Paolo Amadini wrote: - You get better performance on long Promise chains Do we have hard data on this? I would be very interested in testcases that show performance issues with the Promise objects we're shipping on the web. -Boris

Re: Overview of how web-exposed objects are implemented

2014-03-29 Thread Boris Zbarsky
On 3/29/14 9:00 AM, Mike Hoye wrote: I've lowered the karmic threshold for wiki edits to 30 Thanks! -Boris ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform

Re: Promise.jsm and the predefined Promise object

2014-03-29 Thread Boris Zbarsky
On 3/29/14 2:33 PM, Gregory Szorc wrote: If Promise.jsm is obviously superior It's not, as far as I can tell. Nor is it fully API-compatible with the Promise spec. For example, it has no Promise.race and no Promise.prototype.catch. So code that expects per-spec behavior may not work with

Re: Promise.jsm and the predefined Promise object

2014-03-29 Thread David Rajchenbach-Teller
On 3/29/14 7:33 PM, Gregory Szorc wrote: If Promise.jsm is obviously superior, why don't we expose that version to chrome-privileged global scopes by default? One less footgun. If we did this, we would end up with two distinct Promise globals, with two distinct semantics. This seems to me like

Re: Promise.jsm and the predefined Promise object

2014-03-29 Thread Boris Zbarsky
On 3/29/14 4:57 PM, Boris Zbarsky wrote: For example, it has no Promise.race and no Promise.prototype.catch. And Promise.resolve() can throw in the case of Promise.jsm (which it can never do per spec). I didn't dig into the details of the implementation to look for any other