Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 3fa54a20c8ad6557f1b8646d1c2def82831d493e
https://github.com/WebKit/WebKit/commit/3fa54a20c8ad6557f1b8646d1c2def82831d493e
Author: David Kilzer <[email protected]>
Date: 2026-02-04 (Wed, 04 Feb 2026)
Changed paths:
M Tools/Scripts/webkitpy/style/checkers/cpp.py
M Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py
Log Message:
-----------
check-webkit-style: add checker for protect() in variable initialization
<https://bugs.webkit.org/show_bug.cgi?id=306787>
<rdar://problem/169460205>
Reviewed by Chris Dumez.
Add a new check to warn about using `protect()` function when
assigning to RefPtr/Ref variables, which violates SaferCPP guidelines.
The check uses the existing `safercpp/protected_getter_for_init` category
and complements the existing (deprecated) `protectedFoo()` checks as
WebKit transitions from `protectedFoo()` getters to using `protect()` at
call sites.
* Tools/Scripts/webkitpy/style/checkers/cpp.py:
(check_safer_cpp):
* Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py:
(WebKitStyleTest.test_safer_cpp):
Canonical link: https://commits.webkit.org/306771@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications