Remove uses of PR_NOT_REACHED from the mozilla::pkix test suite

RESOLVED FIXED in mozilla34

Status

()

Core
Security: PSM
--
trivial
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: briansmith, Assigned: briansmith)

Tracking

Trunk
mozilla34
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Created attachment 8472778 [details] [diff] [review]
no-more-PR_NOT_REACHED.patch
Attachment #8472778 - Flags: review?(dkeeler)
Comment on attachment 8472778 [details] [diff] [review]
no-more-PR_NOT_REACHED.patch

Review of attachment 8472778 [details] [diff] [review]:
-----------------------------------------------------------------

::: security/pkix/test/lib/pkixtestutil.cpp
@@ +1412,5 @@
>                            der::CONTEXT_SPECIFIC | der::CONSTRUCTED | 1,
>                            revocationTime);
>      }
>      default:
> +      assert(false);

Any particular reason we don't want to continue to abort() here?
Attachment #8472778 - Flags: review?(dkeeler) → review+
Comment on attachment 8472778 [details] [diff] [review]
no-more-PR_NOT_REACHED.patch

Review of attachment 8472778 [details] [diff] [review]:
-----------------------------------------------------------------

::: security/pkix/test/lib/pkixtestutil.cpp
@@ +1412,5 @@
>                            der::CONTEXT_SPECIFIC | der::CONSTRUCTED | 1,
>                            revocationTime);
>      }
>      default:
> +      assert(false);

In general, we (should) only call abort when we don't have another way of indicating an error has occurred. Here, returning nullptr is the way to indicate an error has occurred.
https://hg.mozilla.org/mozilla-central/rev/d034a64d96dd
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.