Closed Bug 844869 Opened 11 years ago Closed 11 years ago

NS_ASSERTION should be fatal with GTest

Categories

(Testing :: General, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla22

People

(Reporter: BenWa, Assigned: BenWa)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

      No description provided.
Depends on: gtest
Looks like we need XPCOM_DEBUG_BREAK=stack-and-abort:

http://mxr.mozilla.org/mozilla-central/source/xpcom/base/nsDebugImpl.cpp#211
Attached patch patchSplinter Review
Assignee: nobody → bgirard
Status: NEW → ASSIGNED
Attachment #717911 - Flags: review?(dbaron)
Comment on attachment 717911 [details] [diff] [review]
patch

Are you sure you don't want the final parameter to be true?

It seems a little cleaner doing this in whatever (make/python/shell) code runs this, but I suppose doing it in the C++ is fine.

Please test that an NS_ASSERTION firing actually causes a failure.
Attachment #717911 - Flags: review?(dbaron) → review+
(In reply to David Baron [:dbaron] (don't cc:, use needinfo? instead) from comment #3)
> Comment on attachment 717911 [details] [diff] [review]
> patch
> 
> Are you sure you don't want the final parameter to be true?
> 

Well I though this would be the default value. If something wanted to override the default I think it make sense to let it. If you have an example where this would be bad I can change it.

> It seems a little cleaner doing this in whatever (make/python/shell) code
> runs this, but I suppose doing it in the C++ is fine.

Part of my motivation is I'd like ./firefox -unittest to give you a sane default run of this. This makes it easy to run in a debugger for example.

> 
> Please test that an NS_ASSERTION firing actually causes a failure.

Done
https://hg.mozilla.org/mozilla-central/rev/00fc2c679bf5
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: