[webkit-dev] Why does RELEASE_ASSERT not have an error message?
Ryosuke Niwa
rniwa at webkit.org
Wed Feb 22 13:25:03 PST 2017
On Wed, Feb 22, 2017 at 12:41 PM, Mark Lam <mark.lam at apple.com> wrote:
>
> I would like to point out that we might be able to get the best of both worlds. Here’s how we can do it:
>
> define RELEASE_ASSERT(assertion) do { \
> if (UNLIKELY(!(assertion))) { \
> preserveRegisterState(); \
> WTFReportAssertionFailure(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, #assertion); \
> restoreRegisterState(); \
> CRASH(); \
> } \
>
> preserveRegisterState() and restoreRegisterState() will carefully push and pop registers onto / off the stack (like how the JIT probe works).
>
I'm afraid this would bloat the binary size too much. You can test but
I'd be surprised if this didn't negatively impact perf especially in
WebCore code.
- R. Niwa
More information about the webkit-dev
mailing list