WebKit Bugzilla
Attachment 340554 Details for
Bug 185713
: Add ASSERT_NOT_IMPLEMENTED_YET() macro
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185713-20180516215525.patch (text/plain), 2.97 KB, created by
zalan
on 2018-05-16 21:55:25 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
zalan
Created:
2018-05-16 21:55:25 PDT
Size:
2.97 KB
patch
obsolete
>Subversion Revision: 231864 >diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog >index 0082be531b5b6ffc9648b4cb3d4c4005354927d2..d12356372544fa168361cfe6ffc8906b55461b5b 100644 >--- a/Source/WTF/ChangeLog >+++ b/Source/WTF/ChangeLog >@@ -1,3 +1,15 @@ >+2018-05-16 Zalan Bujtas <zalan@apple.com> >+ >+ Add ASSERT_NOT_IMPLEMENTED_YET() macro >+ https://bugs.webkit.org/show_bug.cgi?id=185713 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ To mark unimplemented code paths. >+ >+ * wtf/Assertions.cpp: >+ * wtf/Assertions.h: >+ > 2018-05-16 Yusuke Suzuki <utatane.tea@gmail.com> > > Unreviewed, follow-up after r231762 >diff --git a/Source/WTF/wtf/Assertions.cpp b/Source/WTF/wtf/Assertions.cpp >index e15a0923b38bd3a7f32f23d5111ca524d72ed75a..6573a209bc0af12c0209a27850e100e242709458 100644 >--- a/Source/WTF/wtf/Assertions.cpp >+++ b/Source/WTF/wtf/Assertions.cpp >@@ -199,6 +199,12 @@ static void printCallSite(const char* file, int line, const char* function) > #endif > } > >+void WTFReportNotImplementedYet(const char* file, int line, const char* function) >+{ >+ printf_stderr_common("NOT IMPLEMENTED YET\n"); >+ printCallSite(file, line, function); >+} >+ > void WTFReportAssertionFailure(const char* file, int line, const char* function, const char* assertion) > { > if (assertion) >diff --git a/Source/WTF/wtf/Assertions.h b/Source/WTF/wtf/Assertions.h >index d823f7c5fe3c82d7e30311d7288a3dcd332cabaa..731a4e1d9b1b0d14297b99e497e59ef0059af8a5 100644 >--- a/Source/WTF/wtf/Assertions.h >+++ b/Source/WTF/wtf/Assertions.h >@@ -180,6 +180,7 @@ typedef struct { > #endif > #endif > >+WTF_EXPORT_PRIVATE void WTFReportNotImplementedYet(const char* file, int line, const char* function); > WTF_EXPORT_PRIVATE void WTFReportAssertionFailure(const char* file, int line, const char* function, const char* assertion); > WTF_EXPORT_PRIVATE void WTFReportAssertionFailureWithMessage(const char* file, int line, const char* function, const char* assertion, const char* format, ...) WTF_ATTRIBUTE_PRINTF(5, 6); > WTF_EXPORT_PRIVATE void WTFReportArgumentAssertionFailure(const char* file, int line, const char* function, const char* argName, const char* assertion); >@@ -277,6 +278,7 @@ WTF_EXPORT_PRIVATE NO_RETURN_DUE_TO_CRASH void WTFCrashWithSecurityImplication(v > #define ASSERT(assertion) ((void)0) > #define ASSERT_AT(assertion, file, line, function) ((void)0) > #define ASSERT_NOT_REACHED() ((void)0) >+#define ASSERT_NOT_IMPLEMENTED_YET() ((void)0) > #define ASSERT_IMPLIES(condition, assertion) ((void)0) > #define NO_RETURN_DUE_TO_ASSERT > >@@ -316,6 +318,11 @@ WTF_EXPORT_PRIVATE NO_RETURN_DUE_TO_CRASH void WTFCrashWithSecurityImplication(v > CRASH(); \ > } while (0) > >+#define ASSERT_NOT_IMPLEMENTED_YET() do { \ >+ WTFReportNotImplementedYet(__FILE__, __LINE__, WTF_PRETTY_FUNCTION); \ >+ CRASH(); \ >+} while (0) >+ > #define ASSERT_IMPLIES(condition, assertion) do { \ > if ((condition) && !(assertion)) { \ > WTFReportAssertionFailure(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, #condition " => " #assertion); \
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185713
: 340554 |
340558