Closed
Bug 1456986
Opened 7 years ago
Closed 7 years ago
Remove binding details from ServiceWorker::Inner::PostMessage()
Categories
(Core :: DOM: Service Workers, enhancement, P2)
Core
DOM: Service Workers
Tracking
()
RESOLVED
FIXED
mozilla62
| Tracking | Status | |
|---|---|---|
| firefox62 | --- | fixed |
People
(Reporter: bkelly, Assigned: bkelly)
References
Details
Attachments
(1 file, 2 obsolete files)
Currently we pass the global and jscontext down into ServiceWorker::Inner::PostMessage(). We need to keep these up in the binding layer and only pass portable types down into the Inner. This probably means doing an IPC serialization of the structured cloneable transferable.
Updated•7 years ago
|
Priority: -- → P2
| Assignee | ||
Comment 1•7 years ago
|
||
| Assignee | ||
Comment 2•7 years ago
|
||
Attachment #8972641 -
Attachment is obsolete: true
| Assignee | ||
Comment 3•7 years ago
|
||
I wrote bug 1458936 to make structured clone utilities easier here.
See Also: → 1458936
| Assignee | ||
Comment 4•7 years ago
|
||
Comment on attachment 8972920 [details] [diff] [review]
Make ServiceWorker::Inner::PostMessage() use StructuredCloneData. r=baku
Andrea, in preparation of remoting the ServiceWorker binding layer across IPC to the parent process this patch makes PostMessage() immediately convert to StructuredCloneData instead of passing the js pointers down into the guts of SWM.
Note, there is some ugly code in ServiceWorkerPrivate to convert from the StructuredCloneData to a StructuredCloneHolder. This is necessary because SCD uses non-threadsafe ref-counting internally. I filed bug 1458936 to make this better in the future.
Attachment #8972920 -
Flags: review?(amarchesini)
Comment 5•7 years ago
|
||
Comment on attachment 8972920 [details] [diff] [review]
Make ServiceWorker::Inner::PostMessage() use StructuredCloneData. r=baku
Review of attachment 8972920 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/serviceworkers/ServiceWorker.cpp
@@ +16,5 @@
> #include "mozilla/dom/ClientState.h"
> #include "mozilla/dom/Promise.h"
> #include "mozilla/dom/ServiceWorkerGlobalScopeBinding.h"
> #include "mozilla/dom/WorkerPrivate.h"
> +#include "mozilla/dom/ipc/StructuredCloneData.h"
Ok, I still don't understand how sort 'subdir' headers in alphabetic order...
Attachment #8972920 -
Flags: review?(amarchesini) → review+
Pushed by bkelly@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/509957c7a9f9
Make ServiceWorker::Inner::PostMessage() use StructuredCloneData. r=baku
Comment 7•7 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox61:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
| Assignee | ||
Comment 8•7 years ago
|
||
Backing out for various issues:
https://hg.mozilla.org/integration/mozilla-inbound/rev/7cd5006f1365420afb922ced1a1c07feaa27c951
https://hg.mozilla.org/releases/mozilla-beta/rev/10812be17bab3794c4f6d97b2128f6a0d8e156ea
Status: RESOLVED → REOPENED
status-firefox61:
fixed → ---
Resolution: FIXED → ---
Target Milestone: mozilla61 → ---
| Assignee | ||
Comment 9•7 years ago
|
||
Attachment #8972920 -
Attachment is obsolete: true
Comment 10•7 years ago
|
||
Merge of backout:
https://hg.mozilla.org/mozilla-central/rev/7cd5006f1365
Status: REOPENED → ASSIGNED
Comment 11•7 years ago
|
||
Pushed by bkelly@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/ee57d9bde7cb
Make ServiceWorker::Inner::PostMessage() use StructuredCloneData. r=baku
Comment 12•7 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 7 years ago → 7 years ago
status-firefox62:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
You need to log in
before you can comment on or make changes to this bug.
Description
•