Hi all, In the last month I have worked on the refactoring of PBlob code and today I'm very excited to announce that the first block of patches (20~) is finally in nightly. Everywhere in gecko, PBlob has been converted to IPCBlob, except for 2 components: FileHandle and IndexedDb. The former has patches in review, the latter, patches are in testing.
The reason why I started this refactoring are mainly 3: 1. PBlob code has/had sync IPC calls for retrieving remote inputStreams (bug 1350644) PBlob has also other sync IPC calls, and all of them have been removed in the refactoring: https://dxr.mozilla.org/mozilla-central/source/ipc/ipdl/sync-messages.ini#810-817 2. A consequence of point one is not just a performance issue, but we have bugs where those IPC calls cause deadlocks when those are executed on the main-thread, during a sync event loop of a workers, on a PBlob generated in workers (super racy but still possible). 3. PBlob code is hard to maintain, it doesn't have enough comments and it has some open issues such as: bug 1304056 and bug 1272078 4. We have crashs in the use of remoteInputStream in PBlob: bug 1349685 The new source code gets rid of PBlob completely. A good description of how it works can be found here: https://dxr.mozilla.org/mozilla-central/source/dom/file/ipc/IPCBlobUtils.h#12 If you need to pass Blobs via IPC, please, use IPCBlob. There are useful methods in mozilla/dom/IPCBlobUtils.h for serializing and deserializing blobs into/from IPCBlob. Cheers, b _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform