Approach:
-
The service worker manager will send a message to constellation with, its sender and a pipeline id, and a scope_url.
-
The constellation on receiving the message will find the pipeline and send a message to its containing script thread passing the SW manager sender.
-
The
script_thread
on receiving the message will query its TLSServiceWorkerRegistration
(byscope_url
) and retrieve theTrusted<ServiceWorker>
by callingget_trusted_worker()
onServiceWorkerRegistration
object , and send theTrusted<ServiceWorker>
to the SW manager using the sender which it gets from the constellation.
So is this approach going in right direction ?
The idea is plausible, but there are two main problems:
Trusted<ServiceWorker>
contains a bunch of members that cannot be serializednavigator.serviceWorker.controller
at all, but the worker will still be active