Changeset 231896 in webkit


Ignore:
Timestamp:
May 17, 2018 7:29:46 AM (6 years ago)
Author:
Alan Bujtas
Message:

Add ASSERT_NOT_IMPLEMENTED_YET() macro
https://bugs.webkit.org/show_bug.cgi?id=185713

Reviewed by Antti Koivisto.

To mark unimplemented code paths.

  • wtf/Assertions.cpp:
  • wtf/Assertions.h:
Location:
trunk/Source/WTF
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r231867 r231896  
     12018-05-17  Zalan Bujtas  <zalan@apple.com>
     2
     3        Add ASSERT_NOT_IMPLEMENTED_YET() macro
     4        https://bugs.webkit.org/show_bug.cgi?id=185713
     5
     6        Reviewed by Antti Koivisto.
     7
     8        To mark unimplemented code paths.
     9
     10        * wtf/Assertions.cpp:
     11        * wtf/Assertions.h:
     12
    1132018-05-16  Andy VanWagoner  <andy@vanwagoner.family>
    214
  • trunk/Source/WTF/wtf/Assertions.cpp

    r230589 r231896  
    200200}
    201201
     202void WTFReportNotImplementedYet(const char* file, int line, const char* function)
     203{
     204    printf_stderr_common("NOT IMPLEMENTED YET\n");
     205    printCallSite(file, line, function);
     206}
     207
    202208void WTFReportAssertionFailure(const char* file, int line, const char* function, const char* assertion)
    203209{
  • trunk/Source/WTF/wtf/Assertions.h

    r231130 r231896  
    181181#endif
    182182
     183WTF_EXPORT_PRIVATE void WTFReportNotImplementedYet(const char* file, int line, const char* function);
    183184WTF_EXPORT_PRIVATE void WTFReportAssertionFailure(const char* file, int line, const char* function, const char* assertion);
    184185WTF_EXPORT_PRIVATE void WTFReportAssertionFailureWithMessage(const char* file, int line, const char* function, const char* assertion, const char* format, ...) WTF_ATTRIBUTE_PRINTF(5, 6);
     
    278279#define ASSERT_AT(assertion, file, line, function) ((void)0)
    279280#define ASSERT_NOT_REACHED() ((void)0)
     281#define ASSERT_NOT_IMPLEMENTED_YET() ((void)0)
    280282#define ASSERT_IMPLIES(condition, assertion) ((void)0)
    281283#define NO_RETURN_DUE_TO_ASSERT
     
    314316#define ASSERT_NOT_REACHED() do { \
    315317    WTFReportAssertionFailure(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, 0); \
     318    CRASH(); \
     319} while (0)
     320
     321#define ASSERT_NOT_IMPLEMENTED_YET() do { \
     322    WTFReportNotImplementedYet(__FILE__, __LINE__, WTF_PRETTY_FUNCTION); \
    316323    CRASH(); \
    317324} while (0)
Note: See TracChangeset for help on using the changeset viewer.