Bug 204445 - add ASSERT_NOT_REACHED_WITH_MESSAGE and RELEASE_ASSERT_NOT_REACHED_WITH_MESSAGE
Summary: add ASSERT_NOT_REACHED_WITH_MESSAGE and RELEASE_ASSERT_NOT_REACHED_WITH_MESSAGE
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-11-21 00:22 PST by Tuomas Karkkainen
Modified: 2019-11-21 05:00 PST (History)
8 users (show)

See Also:


Attachments
proposed patch (2.73 KB, patch)
2019-11-21 00:27 PST, Tuomas Karkkainen
no flags Details | Formatted Diff | Diff
proposed patch (2.42 KB, patch)
2019-11-21 03:56 PST, Tuomas Karkkainen
koivisto: review+
Details | Formatted Diff | Diff
proposed patch (1.75 KB, patch)
2019-11-21 04:15 PST, Tuomas Karkkainen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tuomas Karkkainen 2019-11-21 00:22:34 PST
Add ASSERT_NOT_REACHED_WITH_MESSAGE and RELEASE_ASSERT_NOT_REACHED_WITH_MESSAGE to allow adding a message to code paths not expected to be reached, or to avoid the need to use a dummy assertion of 0 or false for the same effect.
Comment 1 Tuomas Karkkainen 2019-11-21 00:27:50 PST
Created attachment 384033 [details]
proposed patch
Comment 2 Tuomas Karkkainen 2019-11-21 03:56:09 PST
Created attachment 384043 [details]
proposed patch

address issues brought up in review.
Comment 3 Antti Koivisto 2019-11-21 04:01:31 PST
Comment on attachment 384043 [details]
proposed patch

View in context: https://bugs.webkit.org/attachment.cgi?id=384043&action=review

> Source/WTF/wtf/Assertions.h:315
> +#define ASSERT_NOT_REACHED_WITH_MESSAGE(...) ((void)0)

This too should be inside #ifdef __cplusplus for consistency.
Comment 4 Tuomas Karkkainen 2019-11-21 04:15:51 PST
Created attachment 384044 [details]
proposed patch

cleanup
Comment 5 WebKit Commit Bot 2019-11-21 04:59:18 PST
Comment on attachment 384044 [details]
proposed patch

Clearing flags on attachment: 384044

Committed r252731: <https://trac.webkit.org/changeset/252731>
Comment 6 WebKit Commit Bot 2019-11-21 04:59:20 PST
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2019-11-21 05:00:26 PST
<rdar://problem/57391975>