On 2014-01-06 7:58 PM, Karl Tomlinson wrote:
smaug sm...@welho.com writes:
Why this deprecation?
NS_ENSURE_ macros hid return paths.
That was exactly why they were a Good Thing! Normal control flow was
emphasized.
zw
___
dev-platform mailing
Bobby Holley writes:
Note that there in a explicit stylistic exception that NS_WARN_IF
statements do not require braces. So it's:
if (NS_WARN_IF(NS_FAILED(rv)))
return rv;
I don't see that on the current version of
https://developer.mozilla.org/en-US/docs/Developer_Guide/Coding_Style
I
On 01/07/2014 05:14 PM, smaug wrote:
On 01/07/2014 08:46 AM, Bobby Holley wrote:
On Mon, Jan 6, 2014 at 5:04 PM, smaug sm...@welho.com wrote:
no, since it is always possible to expand those macros.
However
if (NS_WARN_IF(NS_FAILED(rv)) {
return rv;
}
is super ugly.
Note that there in a
On 01/07/2014 08:46 AM, Bobby Holley wrote:
On Mon, Jan 6, 2014 at 5:04 PM, smaug sm...@welho.com wrote:
no, since it is always possible to expand those macros.
However
if (NS_WARN_IF(NS_FAILED(rv)) {
return rv;
}
is super ugly.
Note that there in a explicit stylistic exception that
I filed bug 957201 for NS_WARN_IF_FAILED.
Andrew
- Original Message -
On 01/07/2014 02:58 AM, Karl Tomlinson wrote:
smaug sm...@welho.com writes:
Why this deprecation?
NS_ENSURE_ macros hid return paths.
Also many people didn't understand that they issued warnings, and
so
Hm. It's pretty unfortunate that we now need 4 lines per fallible call, as
opposed to 2 with NS_ENSURE_* macros. The stylistic exception made this 3,
which was slightly more palatable.
bholley
On Tue, Jan 7, 2014 at 7:26 AM, smaug sm...@welho.com wrote:
On 01/07/2014 05:14 PM, smaug wrote:
On 1/6/2014 7:43 PM, smaug wrote:
Why this deprecation?
Karl is right, we are removing the macros that hide control flow (as
well as warnings, in this case).
I'm considering the NS_WARN_IF_FAILED(rv) proposal. It's obviously a
less typing then NS_WARN_IF(NS_FAILED(rv)), but I'm not
On 11/22/2013 10:18 PM, Benjamin Smedberg wrote:
With the landing of bug 672843, the NS_ENSURE_* macros are now considered
deprecated. If you are writing code that wants to issue warnings when
methods fail, please either use NS_WARNING directly or use the new NS_WARN_IF
macro.
if
smaug sm...@welho.com writes:
Why this deprecation?
NS_ENSURE_ macros hid return paths.
Also many people didn't understand that they issued warnings, and
so used the macros for expected return paths.
Was there some useful functionality that is not provided by the
replacements?
On 01/07/2014 02:58 AM, Karl Tomlinson wrote:
smaug sm...@welho.com writes:
Why this deprecation?
NS_ENSURE_ macros hid return paths.
Also many people didn't understand that they issued warnings, and
so used the macros for expected return paths.
Was there some useful functionality that is
With the landing of bug 672843, the NS_ENSURE_* macros are now
considered deprecated. If you are writing code that wants to issue
warnings when methods fail, please either use NS_WARNING directly or use
the new NS_WARN_IF macro.
if (NS_WARN_IF(somethingthatshouldbetrue))
return
On 11/22/2013 12:18 PM, Benjamin Smedberg wrote:
If you are writing code that wants to issue
warnings when methods fail, please either use NS_WARNING directly or use
the new NS_WARN_IF macro.
if (NS_WARN_IF(somethingthatshouldbetrue))
return NS_ERROR_INVALID_ARG;
if
12 matches
Mail list logo