Bug 210808 - [iOS] Provide better names for ProcessThrottler process assertions
Summary: [iOS] Provide better names for ProcessThrottler process assertions
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-04-21 11:30 PDT by Chris Dumez
Modified: 2020-04-22 18:02 PDT (History)
4 users (show)

See Also:


Attachments
Patch (12.72 KB, patch)
2020-04-21 11:31 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (12.94 KB, patch)
2020-04-21 13:38 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2020-04-21 11:30:32 PDT
Provide better names for ProcessThrottler process assertions, to facilitate debugging.
Comment 1 Chris Dumez 2020-04-21 11:31:29 PDT
Created attachment 397097 [details]
Patch
Comment 2 Radar WebKit Bug Importer 2020-04-21 11:32:08 PDT
<rdar://problem/62121697>
Comment 3 Sam Weinig 2020-04-21 12:20:02 PDT
Comment on attachment 397097 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=397097&action=review

> Source/WebKit/UIProcess/ProcessThrottler.cpp:105
> +    String typeString;

ASCIILiteral?

> Source/WebKit/UIProcess/ProcessThrottler.cpp:115
> +    case ProcessAssertionType::Foreground:
> +        typeString = "Foreground";
> +        break;
> +    case ProcessAssertionType::Background:
> +        typeString = "Background";
> +        break;
> +    case ProcessAssertionType::Suspended:
> +        typeString = "Suspended";
> +        break;

Why only these three?
Comment 4 Chris Dumez 2020-04-21 12:27:19 PDT
Comment on attachment 397097 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=397097&action=review

>> Source/WebKit/UIProcess/ProcessThrottler.cpp:105
>> +    String typeString;
> 
> ASCIILiteral?

Ok.

>> Source/WebKit/UIProcess/ProcessThrottler.cpp:115
>> +        break;
> 
> Why only these three?

Yes, we only use these 3 in the ProcessThrottler.
Comment 5 Chris Dumez 2020-04-21 12:30:09 PDT
Comment on attachment 397097 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=397097&action=review

>>> Source/WebKit/UIProcess/ProcessThrottler.cpp:115
>>> +        break;
>> 
>> Why only these three?
> 
> Yes, we only use these 3 in the ProcessThrottler.

See ProcessThrottler::expectedAssertionType() above.
Comment 6 Chris Dumez 2020-04-21 13:38:35 PDT
Created attachment 397114 [details]
Patch
Comment 7 Geoffrey Garen 2020-04-21 13:41:06 PDT
Comment on attachment 397114 [details]
Patch

r=me
Comment 8 EWS 2020-04-21 14:22:31 PDT
Committed r260453: <https://trac.webkit.org/changeset/260453>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 397114 [details].
Comment 9 Sam Weinig 2020-04-22 18:02:22 PDT
Comment on attachment 397114 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=397114&action=review

> Source/WebKit/UIProcess/ProcessThrottler.cpp:115
> +        case ProcessAssertionType::UnboundedNetworking:
> +        case ProcessAssertionType::MediaPlayback:
> +        case ProcessAssertionType::DependentProcessLink:

Thumbs up.