Bug 190721 - [PSON] SuspendedPages do not report meaningful domains in Activity Monitor
Summary: [PSON] SuspendedPages do not report meaningful domains in Activity Monitor
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: 2018-10-18 09:40 PDT by Chris Dumez
Modified: 2018-10-18 14:41 PDT (History)
6 users (show)

See Also:


Attachments
Patch (2.58 KB, patch)
2018-10-18 09:41 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (15.45 KB, patch)
2018-10-18 13:30 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 2018-10-18 09:40:02 PDT
SuspendedPages do not report meaningful domains in Activity Monitor, which makes debugging harder.
Comment 1 Chris Dumez 2018-10-18 09:40:16 PDT
<rdar://problem/45059699>
Comment 2 Chris Dumez 2018-10-18 09:41:46 PDT
Created attachment 352701 [details]
Patch
Comment 3 Alex Christensen 2018-10-18 12:24:41 PDT
Comment on attachment 352701 [details]
Patch

r=me.  Can't this be tested?
Comment 4 Chris Dumez 2018-10-18 12:36:52 PDT
(In reply to Alex Christensen from comment #3)
> Comment on attachment 352701 [details]
> Patch
> 
> r=me.  Can't this be tested?

It will need some infrastructure to ask a WebProcess what origins it reports but I think it is doable. Will look into it now.
Comment 5 Chris Dumez 2018-10-18 13:30:33 PDT
Created attachment 352723 [details]
Patch
Comment 6 Chris Dumez 2018-10-18 13:30:59 PDT
Requesting review again now that I added API testing.
Comment 7 Alex Christensen 2018-10-18 13:54:42 PDT
Comment on attachment 352723 [details]
Patch

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

> Source/WebKit/UIProcess/WebProcessProxy.cpp:1410
> +    sendSync(Messages::WebProcess::GetActivePagesOriginsForTesting(), Messages::WebProcess::GetActivePagesOriginsForTesting::Reply(activeDomains), 0);

tsk tsk tsk, this is what completion handlers are for.

> Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:530
> +    [handler addMappingFromURLString:@"pson://www.google.com/main.html" toData:testBytes];

Is this a URL we can use for testing?
Comment 8 Chris Dumez 2018-10-18 13:56:34 PDT
Comment on attachment 352723 [details]
Patch

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

>> Source/WebKit/UIProcess/WebProcessProxy.cpp:1410
>> +    sendSync(Messages::WebProcess::GetActivePagesOriginsForTesting(), Messages::WebProcess::GetActivePagesOriginsForTesting::Reply(activeDomains), 0);
> 
> tsk tsk tsk, this is what completion handlers are for.

This is only used for testing. If I make this async, then I need to IPC messages right? (one in each direction).

>> Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:530
>> +    [handler addMappingFromURLString:@"pson://www.google.com/main.html" toData:testBytes];
> 
> Is this a URL we can use for testing?

This is using PSON protocol. We use proper domains names in PSON tests so that process-swap on cross-site navigation actually triggers.
Comment 9 Chris Dumez 2018-10-18 13:57:57 PDT
Comment on attachment 352723 [details]
Patch

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

>>> Source/WebKit/UIProcess/WebProcessProxy.cpp:1410
>>> +    sendSync(Messages::WebProcess::GetActivePagesOriginsForTesting(), Messages::WebProcess::GetActivePagesOriginsForTesting::Reply(activeDomains), 0);
>> 
>> tsk tsk tsk, this is what completion handlers are for.
> 
> This is only used for testing. If I make this async, then I need to IPC messages right? (one in each direction).

s/to/two/
Comment 10 WebKit Commit Bot 2018-10-18 14:41:48 PDT
Comment on attachment 352723 [details]
Patch

Clearing flags on attachment: 352723

Committed r237267: <https://trac.webkit.org/changeset/237267>
Comment 11 WebKit Commit Bot 2018-10-18 14:41:50 PDT
All reviewed patches have been landed.  Closing bug.