[webkit-reviews] review granted: [Bug 234991] WebKit::AuthenticatorPresenterCoordinator() constructor falls through ASSERT_NOT_REACHED() : [Attachment 449497] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jan 19 11:08:03 PST 2022
Darin Adler <darin at apple.com> has granted Chris Dumez <cdumez at apple.com>'s
request for review:
Bug 234991: WebKit::AuthenticatorPresenterCoordinator() constructor falls
through ASSERT_NOT_REACHED()
https://bugs.webkit.org/show_bug.cgi?id=234991
Attachment 449497: Patch
https://bugs.webkit.org/attachment.cgi?id=449497&action=review
--- Comment #3 from Darin Adler <darin at apple.com> ---
Comment on attachment 449497
--> https://bugs.webkit.org/attachment.cgi?id=449497
Patch
I guess this is OK.
I never know what we should do for illegal enum values. They are impossible the
same what that a null reference is impossible, but that doesn't mean they can’t
happen if there is some bug elsewhere. So what should our strategy be.
Compilers don’t even agree whether code is "reachable" after a switch statement
that covers all enumeration values. Some consider that dead code, others warn
if that code doesn’t have a return statement of the correct type.
It would be valuable to drop into the debugger if an illegal enum value was
present here. Inelegant to have to write default, annoying that writing default
sacrifices the "unhandled enum value" warning, but definitely a good things if
we detected the bad value.
More information about the webkit-reviews
mailing list