Skip to content

Commit

Permalink
Add logging when determining when to crash WebKit XPC service
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=248055
rdar://102375525

Reviewed by Dewei Zhu.

Added some logging to determine what the startup conditions are when testing WebKit
XPC crashing.

* Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::determineIfWeShouldCrashWhenCreatingWebProcess):

Canonical link: https://commits.webkit.org/256820@main
  • Loading branch information
msaboff committed Nov 18, 2022
1 parent 1d5185c commit 4b41ff1
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
Expand Up @@ -307,10 +307,15 @@ static bool determineIfWeShouldCrashWhenCreatingWebProcess()
std::call_once(
onceFlag,
[&] {
if (isInternalBuild()
&& ![[getOSASystemConfigurationClass() automatedDeviceGroup] isEqualToString:@"CanaryExperimentOptOut"]
&& !canaryInBaseState())
shouldCrashResult = true;
if (isInternalBuild()) {
auto resultAutomatedDeviceGroup = [getOSASystemConfigurationClass() automatedDeviceGroup];

RELEASE_LOG(Process, "shouldCrashWhenCreatingWebProcess: automatedDeviceGroup default: %s , canaryInBaseState: %s", resultAutomatedDeviceGroup ? [resultAutomatedDeviceGroup UTF8String] : "[nil]", canaryInBaseState() ? "true" : "false");

if (![resultAutomatedDeviceGroup isEqualToString:@"CanaryExperimentOptOut"]
&& !canaryInBaseState())
shouldCrashResult = true;
}
});

return shouldCrashResult;
Expand Down

0 comments on commit 4b41ff1

Please sign in to comment.