Bug 183913 - Include security origin in the service worker process name
Summary: Include security origin in the service worker process name
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Service Workers (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-03-22 13:04 PDT by Chris Dumez
Modified: 2018-03-22 18:38 PDT (History)
8 users (show)

See Also:


Attachments
Patch (9.74 KB, patch)
2018-03-22 13:06 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-03-22 13:04:21 PDT
Include security origin in the service worker process name to facilitate debugging. This way, we can differentiate which service worker process is used for which origin in activity monitor.
Comment 1 Chris Dumez 2018-03-22 13:06:25 PDT
Created attachment 336298 [details]
Patch
Comment 2 youenn fablet 2018-03-22 13:36:10 PDT
Comment on attachment 336298 [details]
Patch

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

> Source/WebKit/ChangeLog:9
> +        can differentiate which service worker process is used for which origin in activity monitor.

Is there a privacy concern here, like some application running in the device that could easily detect at any time whether the user is browsing to a given origin or not?

> Source/WebCore/English.lproj/Localizable.strings:-120
> -

Do we need all these changes?
Comment 3 Chris Dumez 2018-03-22 13:47:57 PDT
Comment on attachment 336298 [details]
Patch

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

>> Source/WebKit/ChangeLog:9
>> +        can differentiate which service worker process is used for which origin in activity monitor.
> 
> Is there a privacy concern here, like some application running in the device that could easily detect at any time whether the user is browsing to a given origin or not?

We already display the origin for WebProcess so I do not think service workers are any different. That said, I haven't found the code that shows the WebProcess url in activity monitor yet.

>> Source/WebCore/English.lproj/Localizable.strings:-120
>> -
> 
> Do we need all these changes?

I merely ran:
Tools/Scripts/update-webkit-localizable-strings

The file happened to be quite out of date.
Comment 4 Chris Dumez 2018-03-22 13:51:53 PDT
Comment on attachment 336298 [details]
Patch

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

>>> Source/WebKit/ChangeLog:9
>>> +        can differentiate which service worker process is used for which origin in activity monitor.
>> 
>> Is there a privacy concern here, like some application running in the device that could easily detect at any time whether the user is browsing to a given origin or not?
> 
> We already display the origin for WebProcess so I do not think service workers are any different. That said, I haven't found the code that shows the WebProcess url in activity monitor yet.

Looks like it is done slightly differently for WebProcesses via WebProcess::updateActivePages(). I'll see if I can do the same.
Comment 5 Chris Dumez 2018-03-22 14:05:12 PDT
Comment on attachment 336298 [details]
Patch

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

>>>> Source/WebKit/ChangeLog:9
>>>> +        can differentiate which service worker process is used for which origin in activity monitor.
>>> 
>>> Is there a privacy concern here, like some application running in the device that could easily detect at any time whether the user is browsing to a given origin or not?
>> 
>> We already display the origin for WebProcess so I do not think service workers are any different. That said, I haven't found the code that shows the WebProcess url in activity monitor yet.
> 
> Looks like it is done slightly differently for WebProcesses via WebProcess::updateActivePages(). I'll see if I can do the same.

Actually, both seem to call _LSSetApplicationInformationItem(). In the service worker process case, the origin does not change so we can set it right away in initializeProcessName().
Comment 6 WebKit Commit Bot 2018-03-22 18:37:20 PDT
Comment on attachment 336298 [details]
Patch

Clearing flags on attachment: 336298

Committed r229878: <https://trac.webkit.org/changeset/229878>
Comment 7 WebKit Commit Bot 2018-03-22 18:37:21 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Radar WebKit Bug Importer 2018-03-22 18:38:21 PDT
<rdar://problem/38776833>