WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
179640
ServiceWorker Inspector: Add a ServiceWorker domain to get information about an inspected ServiceWorker
https://bugs.webkit.org/show_bug.cgi?id=179640
Summary
ServiceWorker Inspector: Add a ServiceWorker domain to get information about ...
Joseph Pecoraro
Reported
2017-11-13 15:24:59 PST
Add a ServiceWorker domain to get information about an inspected ServiceWorker For now the most important thing that is needed is information about the Main Resource for the ServiceWorker. In much the same way that Page target has Page.getResourceTree, a ServiceWorker target will have ServiceWorker.getInitializationInfo. From this we can determine the URL of the main resource and promote it from a Script the way that we do for Dedicated WebWorkers. Ultimately we can use this domain to get other information or interact with a ServiceWorker. Possible data / events / commands that would fit in this domain: - scope / registration information - registration updates / status changes - clients changes (add / remove) - trigger forcing an update or changing status - unregister / start / stop
Attachments
[PATCH] Proposed Fix
(16.46 KB, patch)
2017-11-13 15:34 PST
,
Joseph Pecoraro
hi
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2017-11-13 15:25:52 PST
<
rdar://problem/35517361
>
Joseph Pecoraro
Comment 2
2017-11-13 15:34:11 PST
Created
attachment 326816
[details]
[PATCH] Proposed Fix
Devin Rousso
Comment 3
2017-11-13 20:41:04 PST
Comment on
attachment 326816
[details]
[PATCH] Proposed Fix View in context:
https://bugs.webkit.org/attachment.cgi?id=326816&action=review
r=me. Some tests would be nice :D
> Source/JavaScriptCore/inspector/protocol/ServiceWorker.json:19 > + "name": "getInitializationInfo",
Do we have the ability to do inspector tests for ServiceWorkers? I'd assume so considering we have instrumentation for regular Workers. Please write a test for this, or include a FIXME/comment explaining why you can't. :)
> Source/WebCore/inspector/agents/worker/ServiceWorkerAgent.h:49 > + // ServiceWorkerBackendDispatcher
What is our usual naming convention for this? I've seen "Called from frontend" and "*BackendDispatcherHandler". I think this should be "ServiceWorkerBackendDispatcherHandler".
Joseph Pecoraro
Comment 4
2017-11-13 23:04:00 PST
Comment on
attachment 326816
[details]
[PATCH] Proposed Fix View in context:
https://bugs.webkit.org/attachment.cgi?id=326816&action=review
>> Source/JavaScriptCore/inspector/protocol/ServiceWorker.json:19 >> + "name": "getInitializationInfo", > > Do we have the ability to do inspector tests for ServiceWorkers? I'd assume so considering we have instrumentation for regular Workers. Please write a test for this, or include a FIXME/comment explaining why you can't. :)
Not yet, but I think we will arrive at that in a few months when adding the ability to debug ServiceWorkers while in a Page Inspector. Right now this is only accessible through the Remote Inspector path, creating a Remote Inspector for a "service-worker" target.
>> Source/WebCore/inspector/agents/worker/ServiceWorkerAgent.h:49 >> + // ServiceWorkerBackendDispatcher > > What is our usual naming convention for this? I've seen "Called from frontend" and "*BackendDispatcherHandler". I think this should be "ServiceWorkerBackendDispatcherHandler".
Err, yeah that was the intent, I must have messed up my copy/paste.
Joseph Pecoraro
Comment 5
2017-11-14 11:44:53 PST
<
https://trac.webkit.org/r224826
>
Blaze Burg
Comment 6
2017-11-14 12:36:37 PST
Comment on
attachment 326816
[details]
[PATCH] Proposed Fix View in context:
https://bugs.webkit.org/attachment.cgi?id=326816&action=review
> Source/JavaScriptCore/inspector/protocol/ServiceWorker.json:7 > + "id": "InitializationInfo",
I don't like this name. What about Configuration? SWConfiguration?
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug