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 (NS_WARN_IF(somethingthatshouldbetrue))
   return NS_ERROR_INVALID_ARG;

if (NS_WARN_IF(NS_FAILED(rv))
   return rv;

I am working on a script which can be used to automatically convert most of the 
existing NS_ENSURE_* macros, and I will also be updating the coding
style guide to point to the recommended form.

--BDS



Why this deprecation?
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to