Bug 180519 - ServiceWorker Inspector: Use the SW's scope url for the remote inspection target metadata
Summary: ServiceWorker Inspector: Use the SW's scope url for the remote inspection tar...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Joseph Pecoraro
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-12-06 19:51 PST by Joseph Pecoraro
Modified: 2017-12-07 11:00 PST (History)
4 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (2.52 KB, patch)
2017-12-06 19:52 PST, Joseph Pecoraro
youennf: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2017-12-06 19:51:18 PST
ServiceWorker Inspector: Use the SW's scope url for the remote inspection target metadata

So if there are multiple SW's for a domain they can be distinguished based on their scoping.
Comment 1 Joseph Pecoraro 2017-12-06 19:52:25 PST
Created attachment 328673 [details]
[PATCH] Proposed Fix
Comment 2 youenn fablet 2017-12-06 20:21:55 PST
Comment on attachment 328673 [details]
[PATCH] Proposed Fix

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

> Source/WebCore/workers/service/context/ServiceWorkerDebuggable.h:49
> +    String url() const override { return m_scopeURL; }

Could be final and made private, as should name() probably.

I also wonder whether url() could return a const String&.
Would need to change RemoteInspectionTarget and maybe use emptyString().
Comment 3 Joseph Pecoraro 2017-12-07 10:51:20 PST
(In reply to youenn fablet from comment #2)
> Comment on attachment 328673 [details]
> [PATCH] Proposed Fix
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=328673&action=review
> 
> > Source/WebCore/workers/service/context/ServiceWorkerDebuggable.h:49
> > +    String url() const override { return m_scopeURL; }
> 
> Could be final and made private, as should name() probably.
> 
> I also wonder whether url() could return a const String&.
> Would need to change RemoteInspectionTarget and maybe use emptyString().

Good points. I'll do all of these in a follow-up at the same time.
Comment 4 Joseph Pecoraro 2017-12-07 10:55:32 PST
<https://trac.webkit.org/r225633>
Comment 5 Radar WebKit Bug Importer 2017-12-07 11:00:46 PST
<rdar://problem/35913551>