RESOLVED FIXED 227731
PCM: Add error logging for CryptoKit operations
https://bugs.webkit.org/show_bug.cgi?id=227731
Summary PCM: Add error logging for CryptoKit operations
John Wilander
Reported 2021-07-06 18:04:30 PDT
There are three FIXMEs for error logging in PCM's CryptoKit operations. We should add the logging.
Attachments
Patch (9.22 KB, patch)
2021-07-06 18:25 PDT, John Wilander
no flags
Patch (13.40 KB, patch)
2021-07-07 18:37 PDT, John Wilander
no flags
Patch for landing (13.54 KB, patch)
2021-07-07 21:23 PDT, John Wilander
no flags
John Wilander
Comment 1 2021-07-06 18:04:55 PDT
John Wilander
Comment 2 2021-07-06 18:25:24 PDT
John Wilander
Comment 3 2021-07-06 18:46:37 PDT
Comment on attachment 432994 [details] Patch Marking as obsolete pending updates to API tests.
John Wilander
Comment 4 2021-07-07 17:15:53 PDT
A failing API test was addressed in a separate patch (Bugzilla related to this one).
John Wilander
Comment 5 2021-07-07 18:37:14 PDT
Brent Fulgham
Comment 6 2021-07-07 19:08:55 PDT
Comment on attachment 433106 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=433106&action=review r=me, but consider my suggestion about the test case. > Tools/TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp:323 > + EXPECT_FALSE(pcm.calculateAndUpdateSourceUnlinkableToken(serverPublicKeyBase64URL)); I think these tests would look better if you asserted EXPECT_FALSE(pcm.calculateAndUpdateSourceUnlinkableToken(serverPublicKeyBase64URL).has_value()); The fact that the return value is an error message (or no-value if successful) isn't obvious from the name, so it looks like we are expecting the calculateAndUpdate to fail.
John Wilander
Comment 7 2021-07-07 21:23:19 PDT
Created attachment 433115 [details] Patch for landing
John Wilander
Comment 8 2021-07-07 21:24:21 PDT
(In reply to Brent Fulgham from comment #6) > Comment on attachment 433106 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=433106&action=review > > r=me, but consider my suggestion about the test case. > > > Tools/TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp:323 > > + EXPECT_FALSE(pcm.calculateAndUpdateSourceUnlinkableToken(serverPublicKeyBase64URL)); > > I think these tests would look better if you asserted > EXPECT_FALSE(pcm. > calculateAndUpdateSourceUnlinkableToken(serverPublicKeyBase64URL). > has_value()); > > The fact that the return value is an error message (or no-value if > successful) isn't obvious from the name, so it looks like we are expecting > the calculateAndUpdate to fail. You're absolutely right. I made the test look like the actually call sites with a local variable errorMessage. Should make it clear. Thanks for the review!
EWS
Comment 9 2021-07-07 22:10:00 PDT
Committed r279710 (239502@main): <https://commits.webkit.org/239502@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 433115 [details].
Note You need to log in before you can comment on or make changes to this bug.