Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 26756d0d1bc2ba70bf37bcee6bef36ea10fdb89b
https://github.com/WebKit/WebKit/commit/26756d0d1bc2ba70bf37bcee6bef36ea10fdb89b
Author: Ruthvik Konda <[email protected]>
Date: 2026-05-15 (Fri, 15 May 2026)
Changed paths:
M Source/WebCore/crypto/SubtleCrypto.cpp
M Source/WebCore/history/HistoryItem.cpp
M Source/WebCore/storage/StorageMap.cpp
Log Message:
-----------
Use protect() instead of Ref { } / RefPtr { } in history, crypto, and storage
code
https://bugs.webkit.org/show_bug.cgi?id=314717
rdar://176960510
Reviewed by Anne van Kesteren.
Mechanical migration from brace-initialized smart pointer temporaries to the
protect() free function across three small modules (history, crypto, storage),
aligning with the codebase-wide transition.
In HistoryItem's copy constructor, also simplify the outer wrapper to use
CTAD: `RefPtr<FormData> { ... }` → `RefPtr { ... }`. The outer wrapper is
required because the ternary's other arm is `nullptr` and `Ref<FormData>`
(returned by `copy()`) has no common type with `nullptr_t` without explicit
conversion to `RefPtr<FormData>`.
No new tests needed (no behavioral change, style-only refactor).
* Source/WebCore/crypto/SubtleCrypto.cpp:
(WebCore::SubtleCrypto::wrapKey):
* Source/WebCore/history/HistoryItem.cpp:
(WebCore::HistoryItem::HistoryItem):
* Source/WebCore/storage/StorageMap.cpp:
(WebCore::StorageMap::setItem):
(WebCore::StorageMap::removeItem):
Canonical link: https://commits.webkit.org/313300@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications