Bug 180519

Summary: ServiceWorker Inspector: Use the SW's scope url for the remote inspection target metadata
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Web InspectorAssignee: Joseph Pecoraro <joepeck>
Status: RESOLVED FIXED    
Severity: Normal CC: inspector-bugzilla-changes, joepeck, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
[PATCH] Proposed Fix youennf: review+

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>