Implement WorkerEventTarget::RegisterShutdownTask and WorkerEventTarget::UnregisterShutdownTask
Categories
(Core :: DOM: Workers, task, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox110 | --- | fixed |
People
(Reporter: janv, Assigned: janv)
References
Details
Attachments
(1 file)
We need to create a new top level protocol for sync access handles which will bind the child side to WorkerPrivate::ControlEventTarget. The binding currently fails because WorkerEventTarget::RegisterShutdownTask and WorkerEventTarget::UnregisterShutdownTask are not implemented.
Comment 1•3 years ago
•
|
||
If we're going to be using the ControlEventTarget for IPC stuff we should probably make sure to poison[1] the worker global via nsIGlobalObject::StartForbiddingScript/StopForbiddingScript via WorkerGlobalScopeBase::WorkerPrivateSaysForbidScript/WorkerPrivateSaysAllowScript while we're processing control runnables to avoid situations where code might erroneously/accidentally try and call into content from a control runnable.
1: Well, it's not entirely poisoning because we won't crash or anything, but it will make sure we don't call into content. (We will ThrowNotSupportedError though, but only the thing trying to call into content will see that, and frequently those don't do much with it.)
| Assignee | ||
Comment 2•3 years ago
|
||
Depends on D166302
| Assignee | ||
Comment 3•3 years ago
|
||
This is now used in D166344. See the FileSystemSyncAccessHandle::BeginClose method, mControlActor is bound to WorkerPrivate::ControlEventTarget and it's just used for sending the close message to the parent and waiting for a response.
| Assignee | ||
Comment 4•3 years ago
|
||
(In reply to Andrew Sutherland [:asuth] (he/him) from comment #1)
If we're going to be using the ControlEventTarget for IPC stuff we should probably make sure to poison[1] the worker global via nsIGlobalObject::StartForbiddingScript/StopForbiddingScript
I added something like that in https://phabricator.services.mozilla.com/D166344?vs=666165&id=666226#toc
| Assignee | ||
Comment 5•3 years ago
|
||
Comment 7•3 years ago
|
||
| bugherder | ||
Description
•