gecko-dev/ipc
Nika Layzell 5853ed26e9 Bug 1550560 - Part 2: Generate logic for refcounted IPDL actors, r=mccr8
This takes the approach of directly tying the `AddRef()` and `Release()` calls
on the underlying actor object to the lifecycle of the ActorLifecycleProxy
object, by adding another virtual `ActorAlloc()` method as the counterpart to
`ActorDealloc()`.

The changes to the methods called from C++ are relatively minimal:

1. The `SendPFooConstructor(...)` methods have the same signature, but now will
   AddRef() internally (through `ActorAlloc()`), so an `do_AddRef(foo).take()`
   isn't needed. Same with the `{Bind,Open}PFooEndpoint` methods.

   This was done to reduce the number of invasive internal changes in the
   codegen which were required to pipe a passed-in `already_AddRefed` to the
   underlying `ActorLifecycleProxy` which is created by generic code.

2. The `AllocPFoo{Parent,Child}` methods have been modified to return an
   `already_AddRefed` by default, and the callsites will store the result in a
   `RefPtr<T>` if the type is refcounted.

3. No `DeallocPFoo...` method is called anymore. Unfortunately due to
   devirtualization, it won't be an error if an unused method is still present,
   though it won't be called.

Differential Revision: https://phabricator.services.mozilla.com/D39502

--HG--
extra : moz-landing-system : lando
2019-07-29 19:54:16 +00:00
..
app Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan 2019-05-01 08:47:10 +00:00
chromium Bug 1566808 - Add STARTF_FORCEOFFFEEDBACK when launching process on windows r=bobowen 2019-07-29 14:59:27 +00:00
contentproc Bug 1530245 - Launch sandbox from new remote sandbox broker process. r=jld,bobowen 2019-03-13 09:24:52 +00:00
glue Bug 1550560 - Part 2: Generate logic for refcounted IPDL actors, r=mccr8 2019-07-29 19:54:16 +00:00
ipdl Bug 1550560 - Part 2: Generate logic for refcounted IPDL actors, r=mccr8 2019-07-29 19:54:16 +00:00
mscom Bug 1566955: Make EnsureMTA fully thread-safe; r=Jamie 2019-07-18 00:48:41 +00:00
testshell Bug 1561435 - Format ipc/, a=automatic-formatting 2019-07-05 10:48:16 +02:00
moz.build Backed out 15 changesets (bug 1479960, bug 1426526, bug 1534780, bug 1536697) for toolchain bustages on UniquePtrExtensions.h . CLOSED TREE 2019-06-28 22:42:00 +03:00
pull-chromium.py