WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
209981
[Cocoa] Update MESSAGE_CHECK macros used in WebProcessProxy::didCreateSleepDisabler/WebProcessProxy::didDestroySleepDisabler
https://bugs.webkit.org/show_bug.cgi?id=209981
Summary
[Cocoa] Update MESSAGE_CHECK macros used in WebProcessProxy::didCreateSleepDi...
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
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
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.
Top of Page
Format For Printing
XML
Clone This Bug