Skip to content

Digital Credentials: improve c++ safeness#56812

Merged
webkit-commit-queue merged 1 commit into
WebKit:mainfrom
marcoscaceres:eng/Digital-Credentials-improve-c-safeness
Jan 19, 2026
Merged

Digital Credentials: improve c++ safeness#56812
webkit-commit-queue merged 1 commit into
WebKit:mainfrom
marcoscaceres:eng/Digital-Credentials-improve-c-safeness

Conversation

@marcoscaceres

@marcoscaceres marcoscaceres commented Jan 19, 2026

Copy link
Copy Markdown
Contributor

fd556bc

Digital Credentials: improve c++ safeness
rdar://168427091
https://bugs.webkit.org/show_bug.cgi?id=305750

Reviewed by Anne van Kesteren.

Addresses some small c++ safeness issues in Digital Credentials code.

Relies on existing tests.

* Source/WebKit/UIProcess/DigitalCredentials/WKDigitalCredentialsPicker.mm:
(-[WKDigitalCredentialsPicker performRequest:]): missing adoptNS() wrapper.
* Source/WebKit/WebProcess/DigitalCredentials/DigitalCredentialsCoordinator.cpp: use std:exchange to clear m_rawRequests after passing it to the completion handler. Was moving it then clearing it, which could lead to use-after-move issues.
(WebKit::DigitalCredentialsCoordinator::provideRawDigitalCredentialRequests):
* Source/WebKit/WebProcess/DigitalCredentials/DigitalCredentialsCoordinator.h: made explicit constructor private.

Canonical link: https://commits.webkit.org/305822@main

cf9b3c6

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows Apple Internal
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 win ✅ 🛠 ios-apple
✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2 ✅ 🧪 win-tests ✅ 🛠 mac-apple
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe ✅ 🛠 vision-apple
✅ 🧪 ios-wk2-wpt ✅ 🧪 api-mac-debug ✅ 🛠 wpe-cairo-libwebrtc
✅ 🧪 api-ios ✅ 🛠 gtk
✅ 🛠 vision ✅ 🧪 mac-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 vision-sim ✅ 🧪 mac-AS-debug-wk2 ✅ 🧪 api-gtk
✅ 🧪 vision-wk2 ✅ 🧪 mac-wk2-stress ✅ 🛠 playstation
✅ 🛠 🧪 unsafe-merge ✅ 🛠 tv ✅ 🧪 mac-intel-wk2
✅ 🛠 tv-sim ✅ 🛠 mac-safer-cpp
✅ 🛠 watch
✅ 🛠 watch-sim

@marcoscaceres marcoscaceres self-assigned this Jan 19, 2026
@marcoscaceres marcoscaceres added the safe-merge-queue Applied to automatically send a pull-request to merge-queue after passing EWS checks label Jan 19, 2026
@marcoscaceres marcoscaceres force-pushed the eng/Digital-Credentials-improve-c-safeness branch from 250f1ed to cf9b3c6 Compare January 19, 2026 08:36
@annevk annevk added the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Jan 19, 2026
rdar://168427091
https://bugs.webkit.org/show_bug.cgi?id=305750

Reviewed by Anne van Kesteren.

Addresses some small c++ safeness issues in Digital Credentials code.

Relies on existing tests.

* Source/WebKit/UIProcess/DigitalCredentials/WKDigitalCredentialsPicker.mm:
(-[WKDigitalCredentialsPicker performRequest:]): missing adoptNS() wrapper.
* Source/WebKit/WebProcess/DigitalCredentials/DigitalCredentialsCoordinator.cpp: use std:exchange to clear m_rawRequests after passing it to the completion handler. Was moving it then clearing it, which could lead to use-after-move issues.
(WebKit::DigitalCredentialsCoordinator::provideRawDigitalCredentialRequests):
* Source/WebKit/WebProcess/DigitalCredentials/DigitalCredentialsCoordinator.h: made explicit constructor private.

Canonical link: https://commits.webkit.org/305822@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/Digital-Credentials-improve-c-safeness branch from cf9b3c6 to fd556bc Compare January 19, 2026 13:18
@webkit-commit-queue

Copy link
Copy Markdown
Collaborator

Committed 305822@main (fd556bc): https://commits.webkit.org/305822@main

Reviewed commits have been landed. Closing PR #56812 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit fd556bc into WebKit:main Jan 19, 2026
@webkit-commit-queue webkit-commit-queue removed unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing safe-merge-queue Applied to automatically send a pull-request to merge-queue after passing EWS checks labels Jan 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants