mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
5853ed26e9
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 |
||
---|---|---|
.. | ||
app | ||
chromium | ||
contentproc | ||
glue | ||
ipdl | ||
mscom | ||
testshell | ||
moz.build | ||
pull-chromium.py |