Closed
Bug 1231218
Opened 9 years ago
Closed 6 years ago
remove child process pointers like nsIDocument from ServiceWorkerManager
Categories
(Core :: DOM: Service Workers, defect, P2)
Core
DOM: Service Workers
Tracking
()
RESOLVED
FIXED
People
(Reporter: bkelly, Assigned: bkelly)
References
(Blocks 1 open bug)
Details
(Whiteboard: [e10s-multi:M3], SW-MUST)
Currently service worker manager directly references nsIDocument in many places. This needs to be abstracted to a client interface so we can deal with clients in a remote process. It also lets us handle clients that are not documents, like workers.
Updated•9 years ago
|
Assignee: nobody → ehsan
Updated•8 years ago
|
Assignee: ehsan → amarchesini
Updated•8 years ago
|
Whiteboard: [e10s-multi:M1]
Updated•8 years ago
|
Whiteboard: [e10s-multi:M1] → [e10s-multi:M3]
Assignee | ||
Comment 1•8 years ago
|
||
I'm going to do this as a follow-on to my Client infrastructure work.
Assignee: amarchesini → bkelly
Depends on: 1293277
Assignee | ||
Updated•8 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•8 years ago
|
||
Note to self: Test document.open() behavior on a page that is controlled by a service worker. The spec suggests we should stop being controlled. We probably get this for free by controlling documents, but it could be easily regressed if we shift to controlling nsGlobalWindow.
Assignee | ||
Comment 3•7 years ago
|
||
Bug 1293277 is close to completion. I plan to start this next. My current thought is to find all uses of nsIDocument and replace them with ClientHandle.
I expect to have to implement two new features in ClientHandle:
1. A console reporting mechanism that sends the message to the ClientSource to report. This is necessary for the various "ReportToAll*()" methods in SWM. At first I thought perhaps I could just expose the windowId and report locally, but that doesn't work for all clients. For example, a SharedWorker ClientSource probably will want to send the console report to all owning document windows, etc.
2. A callback or MozPromise mechanism to find out when a ClientHandle's IPC is detached. This will allow the ServiceWorkerManager to know when all the controlled clients are gone and the active worker can move to redundant.
Note, even after this change we will still have ServiceWorkerManager in the child processes. These changes are not sufficient to move the parent process. To complete the move we will still need:
a. IPC-backed implementations of DOM objects like ServiceWorker, ServiceWorkerRegistration, and ServiceWorkerContainer.
b. Necko integration that supports parent-side SWM in some way. Ideally this is interception in the parent, but we may have to do an IPC mechanism at first.
Assignee | ||
Comment 4•7 years ago
|
||
I think I'm going to treat this as a meta-bug.
Assignee | ||
Comment 5•7 years ago
|
||
Morphing this into a meta more about removing more child process interface pointers from ServiceWorkerManager.
Summary: replace nsIDocument in service worker manager with a client interface → remove child process pointers like nsIDocument from ServiceWorkerManager
Updated•7 years ago
|
Priority: -- → P2
Updated•6 years ago
|
Whiteboard: [e10s-multi:M3] → [e10s-multi:M3], SW-MUST
Assignee | ||
Updated•6 years ago
|
Assignee: ben → nobody
Status: ASSIGNED → NEW
Comment 6•6 years ago
|
||
This is all but done. There are two more references to nsIDocument/nsPIDOMWindow in ServiceWorkerManager. I'll file a bug to remove them and mark this fixed.
Assignee: nobody → ben
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•