Argument validation as a JSM?

2014-05-15 Thread ajvincent
I've been thinking a bit about writing a JSM for validating arguments coming into a function. The first part would be the set of assertion functions: * a non-empty string * a whole number * a positive number * a non-negative number * a function * instanceof * typeof * member

Re: Intent to implement and ship: navigator.hardwareConcurrency

2014-05-15 Thread Rik Cabanier
On Wed, May 14, 2014 at 11:39 AM, Ehsan Akhgari ehsan.akhg...@gmail.comwrote: On 2014-05-13, 9:01 PM, Rik Cabanier wrote: ... The problem is that the API doesn't really make it obvious that you're not supposed to take the value that the getter returns and just spawn N workers.

Re: Argument validation as a JSM?

2014-05-15 Thread David Rajchenbach-Teller
I remember opening a bug for this ~2.5 years ago. The answer was that most of these assertions are so trivial to write that putting them in a module would actually make reading the code harder than simpler. I don't think the situation has changed since then. Cheers, David On 15/05/14 08:04,

Re: Argument validation as a JSM?

2014-05-15 Thread Mike de Boer
I agree with what David said; it usually makes the code harder to read, but that also greatly depends on the exposed API of the library. Assertions are a widely-known, commonly accepted way to do in-method validation. I quite recently wrote Assert.jsm

Re: Proposed changes to autocomplete administrative levels

2014-05-15 Thread Anne van Kesteren
On Wed, May 14, 2014 at 1:52 AM, Brian Nicholson bnichol...@mozilla.com wrote: If we disagree with this proposal: What alternatives do we have? Given that countries require more than two administrative levels in postal address, it seems our options are limited. We can't simply provide a

Application MAR-file auto Update not working from 29.0 to 29.0.1

2014-05-15 Thread Manish
Hi, This is my first post in this forum so please let me know if anything is wrong. I have been working on a desktop application named AZARDI which is based on xulrunner. It is an offline ePub Reader for all three major platforms (Windows, Mac, Linux). You can check it out at

Re: Application MAR-file auto Update not working from 29.0 to 29.0.1

2014-05-15 Thread Ben Hearsum
On 14-05-15 08:46 AM, Manish wrote: Hi, This is my first post in this forum so please let me know if anything is wrong. I have been working on a desktop application named AZARDI which is based on xulrunner. It is an offline ePub Reader for all three major platforms (Windows, Mac,

Re: Proposed changes to autocomplete administrative levels

2014-05-15 Thread Reuben Morais
On May 15, 2014, at 9:29, Anne van Kesteren ann...@annevk.nl wrote: On Wed, May 14, 2014 at 1:52 AM, Brian Nicholson bnichol...@mozilla.com wrote: If we disagree with this proposal: What alternatives do we have? Given that countries require more than two administrative levels in postal

Re: Proposed changes to autocomplete administrative levels

2014-05-15 Thread Anne van Kesteren
On Thu, May 15, 2014 at 5:02 PM, Reuben Morais reuben.mor...@gmail.com wrote: The en-US locale (and every other locale) would need to have English translations for European countries’ administrative level names. Yes. Not being able to use this feature with a credit card from Switzerland and an

Re: Argument validation as a JSM?

2014-05-15 Thread ajvincent
Re: readability, that's something to think about, but when I write code like this: if ((typeof num != number) || (Math.floor(num) != num) || isNaN(num) || (num 0) || Math.abs(num) == Infinity) { throw new Error(This need to be a non-negative whole

Re: Argument validation as a JSM?

2014-05-15 Thread Ms2ger
On 05/15/2014 05:58 PM, ajvinc...@gmail.com wrote: Re: readability, that's something to think about, but when I write code like this: if ((typeof num != number) || (Math.floor(num) != num) || isNaN(num) || (num 0) || Math.abs(num) == Infinity) {

Re: Intent to implement and ship: navigator.hardwareConcurrency

2014-05-15 Thread Ben Kelly
On May 15, 2014, at 1:26 AM, Rik Cabanier caban...@gmail.com wrote: On Wed, May 14, 2014 at 11:39 AM, Ehsan Akhgari ehsan.akhg...@gmail.comwrote: ... Make it possible for authors to make a semi-informed decision on how to divide the work among workers. That can already be done

RE: Application MAR-file auto Update not working from 29.0 to 29.0.1

2014-05-15 Thread Robert Strong
That error is due to not having an update manifest in the mar and implies that the update mar wasn't generated with a manifest. http://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/update/updat er/updater.cpp#3700 Robert -Original Message- From: dev-platform

UPDATE: Current action plan for try server issues

2014-05-15 Thread Hal Wine
Thanks to a few hours of debugging by glandium Tuesday night, a tweak has been made which may address the multi-hour delays we had been seeing. (As of now, we've seen one successful push that took ~38 min of CPU and wall clock time to complete.) With that in place, the current plans are: a)

FYI: [Planned Maintenance Notification] Tree closing maintenance window, Sat May 17, 0900-1600 PT

2014-05-15 Thread Hal Wine
Original Message Subject:[Planned Maintenance Notification] Tree closing maintenance window Date: Thu, 15 May 2014 21:28:41 - From: notificati...@mozilla.com To: every...@mozilla.org Short Summary: Mozilla IT will have a tree closing maintenance window

Re: Proposed changes to autocomplete administrative levels

2014-05-15 Thread Matthew N.
On 5/15/14, 8:21 AM, Ehsan Akhgari wrote: On 2014-05-15, 5:29 AM, Anne van Kesteren wrote: On Wed, May 14, 2014 at 1:52 AM, Brian Nicholson bnichol...@mozilla.com wrote: If we disagree with this proposal: What alternatives do we have? Given that countries require more than two