Re: New [must_use] property in XPIDL

2016-08-24 Thread Nicholas Nethercote
On Wed, Aug 24, 2016 at 9:38 PM, Gijs Kruitbosch wrote: > > Can this problem be solved with more of these types of > annotations/"compiler-aids", that is, could we teach the compiler to accept > either nsresult or out checks at least for simple xpidl property fetches? >

Re: New [must_use] property in XPIDL

2016-08-24 Thread Mike Hommey
On Mon, Aug 22, 2016 at 04:39:15PM -0700, R Kent James wrote: > On 8/21/2016 9:14 PM, Nicholas Nethercote wrote: > > I strongly encourage people to do likewise on > > any IDL files with which they are familiar. Adding appropriate checks isn't > > always easy > > Exactly, and I hope that you and

Re: New [must_use] property in XPIDL

2016-08-24 Thread Jim Blandy
On Wed, Aug 24, 2016 at 12:17 PM, R Kent James wrote: > But for the record, there are LOTS of issues in Mozilla code that are > missing a "part of writing production code" My own pet peeve is JS code > that gives no hint about the types of inputs, when there are complex >

Re: New [must_use] property in XPIDL

2016-08-24 Thread R Kent James
On 8/24/2016 11:31 AM, Jim Blandy wrote: > On Mon, Aug 22, 2016 at 4:39 PM, R Kent James > wrote: > > Exactly, and I hope that you and others restrain your exuberance a > little bit for this reason. A warning would be one thing, but a hard >

Re: New [must_use] property in XPIDL

2016-08-24 Thread Jim Blandy
On Mon, Aug 22, 2016 at 4:39 PM, R Kent James wrote: > Exactly, and I hope that you and others restrain your exuberance a > little bit for this reason. A warning would be one thing, but a hard > failure that forces developers to drop what they are doing and think > hard about an

Re: Intent to ship imageSmoothingEnabled and remove mozImageSmoothingEnabled.

2016-08-24 Thread Mike Taylor
Hey Thomas, On 8/22/16 4:06 PM, Thomas Wisniewski wrote: Summary: ctx.imageSmoothingEnabled is a Canvas2D context property controlling the interpolation of images drawn to 2D canvases (especially useful for pixel art). Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=768072 Link to standard:

Re: New [must_use] property in XPIDL

2016-08-24 Thread Boris Zbarsky
On 8/24/16 7:38 AM, Gijs Kruitbosch wrote: Separately, the "return failure but also set pointer to non-null" concept sounds very strange to me. There are two possible ways of thinking about outparams in XPCOM: 1) The callee must not touch the outparam values when returning an error result.

Re: New [must_use] property in XPIDL

2016-08-24 Thread Gijs Kruitbosch
On 24/08/2016 01:29, Nicholas Nethercote wrote: On Tue, Aug 23, 2016 at 3:22 PM, R Kent James wrote: A common programming pattern that I would use, when I don't really care about why something failed, is: nsCOMPtr inputStream;

Re: New [must_use] property in XPIDL

2016-08-24 Thread Jörg Knobloch
On 23/08/2016 06:28, Nicholas Nethercote wrote: I see that I've caused several Thunderbird breakages with the changes I've been making. I apologize for not giving you advance warning about this. Since I'm the guy who was, as Kent said, "forced [...] to drop everything", I think some warning