Skip to content

Conversation

@ddkilzer
Copy link
Contributor

@ddkilzer ddkilzer commented Jan 29, 2026

7b803b4

Restrict WebKit1 OS Fault Logging to Internal Builds Only
<https://bugs.webkit.org/show_bug.cgi?id=306482>
<rdar://166773682>

Reviewed by Tim Horton.

The function `shouldOSFaultLogForAppleApplicationUsingWebKit1()` was
logging OS faults for Apple applications using WebKit1 on all builds.
This generates unnecessary logging on customer devices.

The fix adds a static check for internal builds using
`os_variant_allows_internal_security_policies("com.apple.WebKit")`
at the start of the function.  If not running on an internal build,
the function returns false immediately, preventing OS fault logging.

This approach follows existing WebKit patterns used in other functions
like `InspectorFrontendHost::engineeringSettingsAllowed()` and
`RemoteInspectionTarget::allowsInspectionByPolicy()`.

No new tests since this change is not directly testable.

* Source/WTF/wtf/cocoa/RuntimeApplicationChecksCocoa.mm:
(WTF::CocoaApplication::shouldOSFaultLogForAppleApplicationUsingWebKit1):

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

2b62657

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-libwebrtc
✅ 🛠 🧪 jsc ✅ 🧪 api-ios ✅ 🧪 mac-wk1 ✅ 🛠 gtk
✅ 🛠 🧪 jsc-debug-arm64 ✅ 🛠 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 ✅ 🛠 jsc-armv7
✅ 🛠 tv-sim ✅ 🛠 mac-safer-cpp ✅ 🧪 jsc-armv7-tests
✅ 🛠 watch
✅ 🛠 watch-sim

@ddkilzer ddkilzer self-assigned this Jan 29, 2026
@ddkilzer ddkilzer added the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Jan 29, 2026
<https://bugs.webkit.org/show_bug.cgi?id=306482>
<rdar://166773682>

Reviewed by Tim Horton.

The function `shouldOSFaultLogForAppleApplicationUsingWebKit1()` was
logging OS faults for Apple applications using WebKit1 on all builds.
This generates unnecessary logging on customer devices.

The fix adds a static check for internal builds using
`os_variant_allows_internal_security_policies("com.apple.WebKit")`
at the start of the function.  If not running on an internal build,
the function returns false immediately, preventing OS fault logging.

This approach follows existing WebKit patterns used in other functions
like `InspectorFrontendHost::engineeringSettingsAllowed()` and
`RemoteInspectionTarget::allowsInspectionByPolicy()`.

No new tests since this change is not directly testable.

* Source/WTF/wtf/cocoa/RuntimeApplicationChecksCocoa.mm:
(WTF::CocoaApplication::shouldOSFaultLogForAppleApplicationUsingWebKit1):

Canonical link: https://commits.webkit.org/306388@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/Restrict-WebKit1-OS-Fault-Logging-to-Internal-Builds-Only branch from 2b62657 to 7b803b4 Compare January 29, 2026 04:08
@webkit-commit-queue
Copy link
Collaborator

Committed 306388@main (7b803b4): https://commits.webkit.org/306388@main

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

@webkit-commit-queue webkit-commit-queue merged commit 7b803b4 into WebKit:main Jan 29, 2026
@webkit-commit-queue webkit-commit-queue removed the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Jan 29, 2026
@ddkilzer ddkilzer deleted the eng/Restrict-WebKit1-OS-Fault-Logging-to-Internal-Builds-Only branch January 29, 2026 05:45
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