Re: NS_WARN_IF_FALSE has been renamed NS_WARNING_ASSERTION

2016-09-21 Thread Gerald Squelart
On Thursday, September 22, 2016 at 2:58:46 PM UTC+10, Daniel Holbert wrote: > On 09/21/2016 08:41 PM, Samael Wang wrote: > > The NS_ASSERTION document [1] says "Don't use NS_ASSERTION", which could be > > a bit confusing that now some of the similar named macros may be deprecated > > but some

Re: NS_WARN_IF_FALSE has been renamed NS_WARNING_ASSERTION

2016-09-21 Thread Daniel Holbert
On 09/21/2016 08:41 PM, Samael Wang wrote: > The NS_ASSERTION document [1] says "Don't use NS_ASSERTION", which could be a > bit confusing that now some of the similar named macros may be deprecated but > some are new and encouraged. I think that document's advice is too severe. roc made a

Re: Converting assertions into release assertions

2016-09-21 Thread Bobby Holley
There's also MOZ_DIAGNOSTIC_ASSERT, which is fatal in pre-release builds but not release ones. It can be a good compromise to find bugs in the wild when the performance cost is probably negligible but you're still not quite comfortable shipping it on release. I added it last year while working on

Converting assertions into release assertions

2016-09-21 Thread Nicholas Nethercote
Greetings, Assertions, such as MOZ_ASSERT, are great. But they only run in debug builds. Release assertions, such as MOZ_RELEASE_ASSERT, run in all builds. I want to highlight a nice case where converting a normal assertion into a release assertion was a win. In bug 1159244 Michael Layzell did

Re: NS_WARN_IF_FALSE has been renamed NS_WARNING_ASSERTION

2016-09-21 Thread Samael Wang
The NS_ASSERTION document [1] says "Don't use NS_ASSERTION", which could be a bit confusing that now some of the similar named macros may be deprecated but some are new and encouraged. Could we possibly have a section in the coding guideline explaining all these NS_ASSERTION / MOZ_ASSERT /

Re: Intent to ship: Storage API estimate method

2016-09-21 Thread Andrew Overholt
On Thu, Sep 22, 2016 at 2:03 AM, smaug wrote: > > On 09/21/2016 04:42 AM, Shawn Huang wrote: > >> >> ​Because ​Storage API needs to have SecureContext support, but currently >> not having isSecureContext available in Workers (bug 1269052) is >> problematic. Can we initially

Re: netwerk and media experts; feedback requests for background upload/download WebAPI video download use-case

2016-09-21 Thread Robert O'Callahan
On Thu, Sep 22, 2016 at 10:47 AM, Ehsan Akhgari wrote: > My point was more about whether there's something useful that can be > done with partially downloaded files other than media files. Not all > file formats lend themselves to be used before the full file is >

Re: netwerk and media experts; feedback requests for background upload/download WebAPI video download use-case

2016-09-21 Thread Ralph Giles
On Wed, Sep 21, 2016 at 3:19 PM, Ehsan Akhgari wrote: > Good point, which brings us to this question: is media playback the only > use case for using the in-progress downloads? This in-progress issue is mostly about the download size, so I can imagine the same thing

Re: netwerk and media experts; feedback requests for background upload/download WebAPI video download use-case

2016-09-21 Thread Ehsan Akhgari
On 2016-09-21 4:35 PM, Robert O'Callahan wrote: > On Thu, Sep 8, 2016 at 5:45 AM, Andrew Sutherland < > asutherl...@asutherland.org> wrote: > >> A motivating use-case is for a site that wants to download movies/podcasts >> in the background and keep them around for offline purposes. Once the

Re: NS_WARN_IF_FALSE has been renamed NS_WARNING_ASSERTION

2016-09-21 Thread ISHIKAWA,chiaki
On 2016/09/22 5:56, Daniel Holbert wrote: On 09/21/2016 12:48 PM, ISHIKAWA,chiaki wrote: In the following URL about coding style, https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style --- begin quote --- if (NS_WARN_IF(somethingthatshouldbetrue)) { return

Re: NS_WARN_IF_FALSE has been renamed NS_WARNING_ASSERTION

2016-09-21 Thread Daniel Holbert
On 09/21/2016 12:48 PM, ISHIKAWA,chiaki wrote: > In the following URL about coding style, > https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style > --- begin quote --- > if (NS_WARN_IF(somethingthatshouldbetrue)) { > return NS_ERROR_INVALID_ARG; > } > > if

Re: netwerk and media experts; feedback requests for background upload/download WebAPI video download use-case

2016-09-21 Thread Robert O'Callahan
On Thu, Sep 8, 2016 at 5:45 AM, Andrew Sutherland < asutherl...@asutherland.org> wrote: > A motivating use-case is for a site that wants to download movies/podcasts > in the background and keep them around for offline purposes. Once the file > is downloaded, it seems clear that the

Re: NS_WARN_IF_FALSE has been renamed NS_WARNING_ASSERTION

2016-09-21 Thread ISHIKAWA,chiaki
On 2016/09/02 16:02, Nicholas Nethercote wrote: Greetings, NS_WARN_IF_FALSE has been renamed NS_WARNING_ASSERTION. See https://bugzilla.mozilla.org/show_bug.cgi?id=1299727 for details, including the justification. See https://bugzilla.mozilla.org/show_bug.cgi?id=137 for a bug that this

Re: netwerk and media experts; feedback requests for background upload/download WebAPI video download use-case

2016-09-21 Thread Ehsan Akhgari
Also, in many cases the HTTP cache may not have enough space to store a downloaded movie, for example. But more importantly, it seems to me that relying on the browser's internal magic for this is error prone. For example, the video player reusing the same URL as the one being passed to

Re: Intent to ship: Storage API estimate method

2016-09-21 Thread smaug
What is the implementation status in other browsers? On 09/21/2016 04:42 AM, Shawn Huang wrote: Summary: ​The Storage Standard defines an API for persistent storage and quota estimates. ​The estimate() method can be used to