[Webkit-unassigned] [Bug 180913] [GTK] Fix compilation failures for a Release build with assertions turned on

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 29 07:59:32 PST 2020


https://bugs.webkit.org/show_bug.cgi?id=180913

--- Comment #10 from Michael Catanzaro <mcatanzaro at gnome.org> ---
(In reply to enometh from comment #9)
> (In reply to Darin Adler from comment #8)
> 
> I think NDEBUG is a CMake concept:

Of course not, it's regularly used in Autotools build systems, and meson supports it as well, and glibc checks for it to modify the behavior of its assert() function....

Anyway, WebKit asserts should usually depend on ASSERT_ENABLED, not NDEBUG. But I think an exception might be appropriate for asserts that are particularly slow. Those asserts should -- arguably -- be guarded by NDEBUG instead, because there exists a hypothetical wonderful future where WebKit is less buggy and we can get rid of the RELEASE_ASSERT() macros and use ASSERT_ENABLED for release builds to run all non-slow asserts in production. (I'm convinced having asserts enabled in production is essential to improve quality.) But stuff like asserts that require loops, though, or asserts that show up in profiling, will usually not ever be OK for production.

Anyway, it doesn't matter too much, because that future is not today.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200129/54d85fa4/attachment.htm>


More information about the webkit-unassigned mailing list