[webkit-reviews] review granted: [Bug 210683] [IPC hardening] Use MESSAGE_CHECK in WebPageProxy::loadRecentSearches() and WebPageProxy::saveRecentSearches() : [Attachment 396830] Patch v1

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Apr 19 12:15:03 PDT 2020


Geoffrey Garen <ggaren at apple.com> has granted David Kilzer (:ddkilzer)
<ddkilzer at webkit.org>'s request for review:
Bug 210683: [IPC hardening] Use MESSAGE_CHECK in
WebPageProxy::loadRecentSearches() and WebPageProxy::saveRecentSearches()
https://bugs.webkit.org/show_bug.cgi?id=210683

Attachment 396830: Patch v1

https://bugs.webkit.org/attachment.cgi?id=396830&action=review




--- Comment #3 from Geoffrey Garen <ggaren at apple.com> ---
Comment on attachment 396830
  --> https://bugs.webkit.org/attachment.cgi?id=396830
Patch v1

r=me

My preference is the "!name.isNull()" style. I think it reads more clearly.
Also, "!!" is kind of mind-bending if you haven't seen it before.

I believe that the "!!" style originated, especially on Windows, to work around
a missing feature in C++ (a safe way to convert to boolean without converting
to integer by accident). You can see vestigial remnants of the same issue in
WebKit's uses of "UnspecifiedBoolType" (which is even more mind-bending). See
also http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2333.html. In the
modern C++ world, where operator bool can be made explicit, I believe there is
no need to use "!!" anymore.


More information about the webkit-reviews mailing list