Bug 209981

Summary: [Cocoa] Update MESSAGE_CHECK macros used in WebProcessProxy::didCreateSleepDisabler/WebProcessProxy::didDestroySleepDisabler
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: WebKit Misc.Assignee: David Kilzer (:ddkilzer) <ddkilzer>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, darin, ggaren, pvollan, useafterfree
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 209676    
Bug Blocks:    
Attachments:
Description Flags
Patch v1 none

David Kilzer (:ddkilzer)
Reported 2020-04-03 12:33:57 PDT
Update MESSAGE_CHECK macros used in WebProcessProxy::didCreateSleepDisabler/WebProcessProxy::didDestroySleepDisabler. <rdar://problem/61237674>
Attachments
Patch v1 (2.11 KB, patch)
2020-04-03 12:38 PDT, David Kilzer (:ddkilzer)
no flags
David Kilzer (:ddkilzer)
Comment 1 2020-04-03 12:38:03 PDT
Created attachment 395402 [details] Patch v1
Darin Adler
Comment 2 2020-04-03 13:10:50 PDT
Comment on attachment 395402 [details] Patch v1 So decoding always checks for both invalid hash table values for identifiers?
Darin Adler
Comment 3 2020-04-03 13:11:32 PDT
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?
EWS
Comment 4 2020-04-03 13:13:46 PDT
Committed r259505: <https://trac.webkit.org/changeset/259505> All reviewed patches have been landed. Closing bug and clearing flags on attachment 395402 [details].
Geoffrey Garen
Comment 5 2020-04-03 13:19:27 PDT
> > 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(); }
Note You need to log in before you can comment on or make changes to this bug.