Re: Proposal: use nsresult& outparams in constructors to represent failure

2016-04-20 Thread Gerald Squelart
On Thursday, April 21, 2016 at 4:33:40 PM UTC+10, Nicholas Nethercote wrote: > On Thu, Apr 21, 2016 at 4:19 PM, Xidorn Quan wrote: > >> > >> Maybe you're referring to factory methods, like this: > >> > >> static T* T::New(); > >> > >> which would return null on failure. Such methods can be usefu

Re: Proposal: use nsresult& outparams in constructors to represent failure

2016-04-20 Thread Nicholas Nethercote
On Thu, Apr 21, 2016 at 4:19 PM, Xidorn Quan wrote: >> >> Maybe you're referring to factory methods, like this: >> >> static T* T::New(); >> >> which would return null on failure. Such methods can be useful, but >> there's two problems. First, they're not applicable to stack-allocated >> objects

Re: Proposal: use nsresult& outparams in constructors to represent failure

2016-04-20 Thread Xidorn Quan
On Thu, Apr 21, 2016 at 3:57 PM, Nicholas Nethercote wrote: > On Thu, Apr 21, 2016 at 3:05 PM, Eric Rescorla wrote: > > So, if we are going to do something along these lines, I would want it > to be > > a convention that if you use MakeUnique and the like (as you should) then > > they automatica

Re: Update on Webcomponents?

2016-04-20 Thread Anne van Kesteren
On Thu, Apr 21, 2016 at 5:36 AM, Philipp Kewisch wrote: > I was experimenting with web components and noticed how there are gaps > between what Firefox supports and what Chrome supports. Reading blog > posts and such I am aware that this is because consensus has not been > reached on the final imp

Re: Proposal: use nsresult& outparams in constructors to represent failure

2016-04-20 Thread Nicholas Nethercote
On Thu, Apr 21, 2016 at 3:05 PM, Eric Rescorla wrote: > The general problem that > it doesn't alleviate is that failure to check the return value leaves you > with a reference/pointer to an object in an ill-defined half-constructed > state. At least for heap allocations, I'd much rather have the p

Re: Proposal: use nsresult& outparams in constructors to represent failure

2016-04-20 Thread Kris Maglione
On Wed, Apr 20, 2016 at 10:02:47PM -0700, Kyle Huey wrote: On Wed, Apr 20, 2016 at 9:52 PM, Kris Maglione There isn't a strict guarantee of non-nullness for reference parameters. This is an extreme example, but technically valid: T th(*(nsresult*)0); IIRC this is undefined behavior, so when

Re: Proposal: use nsresult& outparams in constructors to represent failure

2016-04-20 Thread Eric Rescorla
I'm sympathetic to the desire to have a single fallible construction function (this is generally how I structure things in C code), but I'm not sure that this is really the right design for it. The general problem that it doesn't alleviate is that failure to check the return value leaves you with a

Re: Proposal: use nsresult& outparams in constructors to represent failure

2016-04-20 Thread Gerald Squelart
On Thursday, April 21, 2016 at 11:15:10 AM UTC+10, Nicholas Nethercote wrote: > Hi, > > C++ constructors can't be made fallible without using exceptions. As a result, > for many classes we have a constructor and a fallible Init() method which must > be called immediately after construction. > > E

Re: Proposal: use nsresult& outparams in constructors to represent failure

2016-04-20 Thread Kyle Huey
On Wed, Apr 20, 2016 at 9:52 PM, Kris Maglione wrote: > On Thu, Apr 21, 2016 at 02:10:59PM +1000, Nicholas Nethercote wrote: > >> On Thu, Apr 21, 2016 at 1:23 PM, Kris Maglione >> wrote: >> >>> >>> If we do this, can we please use |nsresult*| rather than |nsresult&|? >>> >> >> I prefer a referen

Re: Proposal: use nsresult& outparams in constructors to represent failure

2016-04-20 Thread Kris Maglione
On Thu, Apr 21, 2016 at 02:10:59PM +1000, Nicholas Nethercote wrote: On Thu, Apr 21, 2016 at 1:23 PM, Kris Maglione wrote: If we do this, can we please use |nsresult*| rather than |nsresult&|? I prefer a reference because of the guarantee of non-nullness. But I could live with a pointer if p

Re: Build System Project - Update from the last 2 weeks

2016-04-20 Thread Nicholas Nethercote
On Thu, Apr 21, 2016 at 2:13 AM, Bobby Holley wrote: > I believe Ehsan was close to having Clang static analysis running on > Windows. Nathan Froyd has also been involved, and should be included in any discussion there. Nick ___ dev-platform mailing li

Re: Proposal: use nsresult& outparams in constructors to represent failure

2016-04-20 Thread Nicholas Nethercote
On Thu, Apr 21, 2016 at 1:23 PM, Kris Maglione wrote: > > If we do this, can we please use |nsresult*| rather than |nsresult&|? I prefer a reference because of the guarantee of non-nullness. But I could live with a pointer if people think it's better. Nick ___

Update on Webcomponents?

2016-04-20 Thread Philipp Kewisch
Hey all, I was experimenting with web components and noticed how there are gaps between what Firefox supports and what Chrome supports. Reading blog posts and such I am aware that this is because consensus has not been reached on the final implementation and I agree it would not be a good idea to

Re: Proposal: use nsresult& outparams in constructors to represent failure

2016-04-20 Thread Kris Maglione
On Thu, Apr 21, 2016 at 11:07:21AM +1000, Nicholas Nethercote wrote: Instead, we would do this: nsresult rv; T ts(rv); if (NS_FAILED(rv)) { return rv; } T* th = new T(rv); if (NS_FAILED(rv)) { delete th; return rv; } If we do this, can we please use |nsresult*| rather than |ns

Out parameters, References vs. Pointers (was: Proposal: use nsresult& outparams in constructors to represent failure)

2016-04-20 Thread 陳侃如
Nicholas Nethercote writes: > Hi, > > C++ constructors can't be made fallible without using exceptions. As a result, > for many classes we have a constructor and a fallible Init() method which must > be called immediately after construction. > > Except... there is one way to make constructors fal

Re: Proposal: use nsresult& outparams in constructors to represent failure

2016-04-20 Thread Nicholas Nethercote
On Thu, Apr 21, 2016 at 11:50 AM, Jim Blandy wrote: > The pattern seems reasonable enough. > > DXR says we have 2579 "init" or "Init" functions, and 9801 callers of such > functions. I used: > > function:init ext:cpp ext:h > callers:init ext:cpp ext:h There are also some called "Initialize" :) I

Re: Proposal: use nsresult& outparams in constructors to represent failure

2016-04-20 Thread Jim Blandy
The pattern seems reasonable enough. DXR says we have 2579 "init" or "Init" functions, and 9801 callers of such functions. I used: function:init ext:cpp ext:h callers:init ext:cpp ext:h Do you propose we make an effort to fix up existing code, or just introduce this as the preferred pattern in n

Proposal: use nsresult& outparams in constructors to represent failure

2016-04-20 Thread Nicholas Nethercote
Hi, C++ constructors can't be made fallible without using exceptions. As a result, for many classes we have a constructor and a fallible Init() method which must be called immediately after construction. Except... there is one way to make constructors fallible: use an |nsresult& aRv| outparam to

Intent to ship: support "basic shapes" for the CSS 'clip-path' property

2016-04-20 Thread Jonathan Watt
Summary: Currently clip-path clipping requires a reference to an SVG element which can be cumbersome for authors. We intend to allow clip-path to specify basic shapes (circle, ellipse, polygon) inline, for example: style="clip-path: polygon(20% 50px, 200px 25%, 200px 150px, 20% 75%)"

Re: Build System Project - Update from the last 2 weeks

2016-04-20 Thread Bobby Holley
I believe Ehsan was close to having Clang static analysis running on Windows. On Wed, Apr 20, 2016 at 8:44 AM, Gregory Szorc wrote: > > > > On Apr 20, 2016, at 08:16, Nicolas B. Pierron < > nicolas.b.pier...@mozilla.com> wrote: > > > > Unrelated, Do we have news for clang blockers on Windows? I

Re: Build System Project - Update from the last 2 weeks

2016-04-20 Thread Christopher Manchester
Hi Armen, Thanks for noticing that, I think you found an issue with how we're submitting data caused by something I landed last week. I filed https://bugzilla.mozilla.org/show_bug.cgi?id=1266183 to track a fix. Chris On Wed, Apr 20, 2016 at 12:01 PM, Armen Zambrano G. wrote: > Do we know what

Re: Telemetry experiments need to be easier (on Nightly)

2016-04-20 Thread Jared Hirsch
Hi all, I wrote a telemetry experiment last year[1], and I also found the process challenging to navigate. I found that many important details were undocumented, but were mentioned in review comments, so I added what I could to the telemetry experiment wiki page and to MDN. My experiment gathere

Re: Moving XP to ESR?

2016-04-20 Thread Ben Hearsum
This would require a new update channel to support, because it would be a unique line of code that isn't "release" or "esr". It couldn't be implemented as a relbranch either, because we'd need CI for it. You're basically proposing a long lived esr-like branch that we only ship to XP users. I

Re: Build System Project - Update from the last 2 weeks

2016-04-20 Thread Armen Zambrano G.
Do we know what happen with the data points of the end of the graph? https://treeherder.mozilla.org/perf.html#/graphs?timerange=2592000&series=%5Bmozilla-inbound,04b9f1fd5577b40a555696555084e68a4ed2c28f,1%5D&series=%5Bmozilla-inbound,65e0ddb3dc085864cbee77ab034dead6323a1ce6,1%5D&series=%5Bmozilla

Re: Moving XP to ESR?

2016-04-20 Thread Armen Zambrano G.
Would it make more sense to have a relbranch instead of using ESR? IIRC ESRs are stable for a period but when we uplift we uplift everything new. For this XP relbranch we would only take security patches. It would serve the purpose of keeping our users secure where they're but saving some ener

Re: Dump frame tree in real time

2016-04-20 Thread Botond Ballo
On Wed, Apr 20, 2016 at 5:50 AM, Jip de Beer wrote: > Thanks. I'm aware that it's a privileged API. It seemed Botond was offering a > workaround. In my testing, I used it in the Browser Console (as opposed to the Web Console), which can access privileged APIs. As you were the one who brought up

Re: Build System Project - Update from the last 2 weeks

2016-04-20 Thread Gregory Szorc
> On Apr 20, 2016, at 08:16, Nicolas B. Pierron > wrote: > > Unrelated, Do we have news for clang blockers on Windows? In particular, I > am thinking about the various Sanitizers. We haven't really talked about Clang on Windows in our build meeting/plannings. That's not to say someone else

Re: Moving XP to ESR?

2016-04-20 Thread Henri Sivonen
On Mon, Apr 18, 2016 at 4:46 PM, Thomas Zimmermann wrote: > And XP still runs on ~10% of all desktops. That's an opportunity to > convert some of the users to Firefox. This assumes that 1) users who are still on XP still make active browser choices 2) ESR wouldn't be good enough to for these use

Re: Build System Project - Update from the last 2 weeks

2016-04-20 Thread Nicolas B. Pierron
Unrelated, Do we have news for clang blockers on Windows? In particular, I am thinking about the various Sanitizers. On 04/20/2016 11:00 AM, David Burns wrote: We have also started looking at how we can use a global compiler cache on local builds and not just in automation. This will allow art

Re: Telemetry experiments need to be easier (on Nightly)

2016-04-20 Thread Kartikaya Gupta
On Wed, Apr 20, 2016 at 10:26 AM, Benjamin Smedberg wrote: > The goal of this is for experiments to be fairly lightweight. > > Can you talk about where the problems were? The only signoffs that are > currently required are code review (no surprise there) and > acknowledgement from a release driver

Re: Moving XP to ESR?

2016-04-20 Thread Chris H-C
> I wonder how much of the marketshare is likely XP SP2. According to the longitudinal dataset, SP2 is roughly 16% of the Windows XP population, with the rest SP3. So, still some millions of users. :chutten On Wed, Apr 20, 2016 at 9:38 AM, Mike Conley wrote: > The people on this thread might f

Re: Telemetry experiments need to be easier (on Nightly)

2016-04-20 Thread Benjamin Smedberg
The goal of this is for experiments to be fairly lightweight. Can you talk about where the problems were? The only signoffs that are currently required are code review (no surprise there) and acknowledgement from a release driver. For pref flips in particular, we've talked about extending the exp

Re: Spidernode/JXCore

2016-04-20 Thread Ehsan Akhgari
On 2016-04-14 12:08 PM, Steve Fink wrote: > On 04/14/2016 06:21 AM, Philip Chee wrote: >> On 12/04/2016 19:27, Henri Sivonen wrote: >> >>> My understanding is that >>> https://git.merproject.org/mer-core/qtmozembed/ still uses it. As we >>> are figuring out how to be more embeddable (see >>> https:

Re: Please use "web-platform-tests --manifest-update" for updating wpt tests

2016-04-20 Thread James Graham
On 20/04/16 14:13, Nathan Froyd wrote: On Wed, Apr 20, 2016 at 8:59 AM, James Graham wrote: On 20/04/16 13:53, Josh Matthews wrote: Servo has a script [1] that runs on the build machine that executes --manifest-update and checks whether the contents of MANFEST.json is different before and afte

Build System Project - Update from the last 2 weeks

2016-04-20 Thread David Burns
Below is a highlight of all work the build peers have done in the last 2 weeks as part of their work to modernise the build infrastructure. Since the last report[1] a large number of improvements have landed in Mozilla Central. We have landed some more build improvements that have brought down th

Re: Moving XP to ESR?

2016-04-20 Thread Mike Conley
The people on this thread might find chutten's recent blog post interesting: https://chuttenblog.wordpress.com/2016/04/19/firefoxs-windows-xp-users-upgrade-path/ Juicy chunk: "Between 40% and 53% of Firefox users running Windows XP are Stuck" -Mike On 18/04/2016 9:04 AM, Henri Sivonen wrote: >

Re: Please use "web-platform-tests --manifest-update" for updating wpt tests

2016-04-20 Thread Nathan Froyd
On Wed, Apr 20, 2016 at 8:59 AM, James Graham wrote: > On 20/04/16 13:53, Josh Matthews wrote: >> Servo has a script [1] that runs on the build machine that executes >> --manifest-update and checks whether the contents of MANFEST.json is >> different before and after. We could do the same for Geck

Re: Please use "web-platform-tests --manifest-update" for updating wpt tests

2016-04-20 Thread James Graham
On 20/04/16 13:53, Josh Matthews wrote: Servo has a script [1] that runs on the build machine that executes --manifest-update and checks whether the contents of MANFEST.json is different before and after. We could do the same for Gecko and make it turn the job orange on treeherder. I plan to ad

Re: Intent to Ship: HTML5 and tags

2016-04-20 Thread Ting-Yu Lin
On Wed, Apr 20, 2016 at 2:44 AM, Tantek Çelik wrote: > On Tue, Apr 19, 2016 at 8:41 AM, Ting-Yu Lin wrote: > > To summarize the feedback so far, I'd still like to ship and > > without |summary::marker| because > > > > 1) No other browsers support summary::marker yet. > > This is a reason to sh

Re: Please use "web-platform-tests --manifest-update" for updating wpt tests

2016-04-20 Thread Josh Matthews
Servo has a script [1] that runs on the build machine that executes --manifest-update and checks whether the contents of MANFEST.json is different before and after. We could do the same for Gecko and make it turn the job orange on treeherder. Cheers, Josh [1] https://github.com/servo/servo/bl

Re: Please keep an eye out for new plugin crashes

2016-04-20 Thread Robert Kaiser
FWIW, no crashes listed in this query after a week of having this on Nightly. KaiRo Benjamin Smedberg schrieb: In today's nightly I landed a patch in bug 1252152 which will crash a plugin-container process more aggressively if a plugin instance is torn down while its code is on the stack. Plea

Re: Dump frame tree in real time

2016-04-20 Thread Jip de Beer
Thanks. I'm aware that it's a privileged API. It seemed Botond was offering a workaround. Anyhow, because of all your help I was able to dump the Frame Tree (not in real time). But I also learned the frame tree doesn't contain all the information I need. Especially the z-order information. The

Buggy AVX instruction set support detection

2016-04-20 Thread Nicholas Nethercote
Hi, There is a longstanding NSS crash -- which occurs at a rate of a ~200 per week -- that appears to be caused by buggy detection of AVX instruction set support. If you know about AVX detection and want to help, please take a look at https://bugzilla.mozilla.org/show_bug.cgi?id=1263495. Thank y