Update MESSAGE_CHECK macros used in WebProcessProxy::didCreateSleepDisabler/WebProcessProxy::didDestroySleepDisabler. <rdar://problem/61237674>
Created attachment 395402 [details] Patch v1
Comment on attachment 395402 [details] Patch v1 So decoding always checks for both invalid hash table values for identifiers?
Comment on attachment 395402 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=395402&action=review > Source/WebKit/ChangeLog:12 > + - Remove MESSAGE_CHECK for `identifier` since decoding detects > + invalid values. Both the empty and deleted values for identifiers as hash table keys are prohibited/checked?
Committed r259505: <https://trac.webkit.org/changeset/259505> All reviewed patches have been landed. Closing bug and clearing flags on attachment 395402 [details].
> > Source/WebKit/ChangeLog:12 > > + - Remove MESSAGE_CHECK for `identifier` since decoding detects > > + invalid values. > > Both the empty and deleted values for identifiers as hash table keys are > prohibited/checked? Looks like it: template<typename Decoder> static Optional<ObjectIdentifier> decode(Decoder& decoder) { Optional<uint64_t> identifier; decoder >> identifier; if (!identifier || !isValidIdentifier(*identifier)) return WTF::nullopt; return ObjectIdentifier { *identifier }; } static bool isValidIdentifier(uint64_t identifier) { return identifier && identifier != hashTableDeletedValue(); }