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  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 compelling case for *preferring* non-fatal assertions (i.e.
> NS_ASSERTION) in many scenarios, particularly when failure is not
> catastrophic. See his blog post here for more details:
> I found (and still find) his argument there quite compelling. I think
> it's important that debug builds are able to proceed past (inevitable)
> unexpected-but-not-horrible conditions -- while at the same time,
> perhaps shouting about those unexpected conditions noisily so that
> people can report them if they care to do so (and so that test suites fail).
> Personally, I use *both* MOZ_ASSERT and NS_ASSERTION, in different
> scenarios, depending on how catastrophic it would be if the asserted
> condition doesn't hold, and depending on how sure I am that the
> condition does-currently & must-always-in-the-future hold true.
Sitting on the shoulders of giants, an idea, in the unlikely case it's not been
thought of yet:
How about an assertion that files a crash report (or something lighter like a
telemetry blip) but does not actually crash?
dev-platform mailing list