Summary: | Remove unnecessary debug logging from release builds. | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Mark Lam <mark.lam> | ||||
Component: | JavaScriptCore | Assignee: | Mark Lam <mark.lam> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | benjamin, cdumez, cmarcelo, darin, ews-watchlist, saam, webkit-bug-importer | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Mark Lam
2020-05-19 09:35:59 PDT
Created attachment 399743 [details]
proposed patch.
Committed r261870: <https://trac.webkit.org/changeset/261870> All reviewed patches have been landed. Closing bug and clearing flags on attachment 399743 [details]. Comment on attachment 399743 [details] proposed patch. View in context: https://bugs.webkit.org/attachment.cgi?id=399743&action=review > Source/WTF/wtf/PtrTag.h:115 > #if ASSERT_ENABLED > constexpr bool enablePtrTagDebugAssert = true; > +#define REPORT_BAD_TAG(success, ptr, expectedTag) do { \ > + if (UNLIKELY(!success)) \ > + reportBadTag(reinterpret_cast<const void*>(ptr), expectedTag); \ > + } while (false) > #else > constexpr bool enablePtrTagDebugAssert = false; > +#define REPORT_BAD_TAG(success, ptr, expectedTag) > #endif I like this, but I would like to point out that in this case, this could have been an inline function rather than a macro; an empty inline function would neatly compile down to nothing. |