Skip to content

Commit b2289ee

Browse files
committed
Backed out changeset 9c4ce17422de (bug 1867360) for causing crashes on PRemoteQuotaObjectChild. CLOSED TREE
1 parent a6b3897 commit b2289ee

File tree

198 files changed

+55
-348
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

198 files changed

+55
-348
lines changed

dom/file/ipc/PRemoteLazyInputStream.ipdl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ include IPCStream;
66

77
namespace mozilla {
88

9-
[ChildProc=any]
109
protocol PRemoteLazyInputStream
1110
{
1211
parent:

dom/fs/shared/PFileSystemAccessHandleControl.ipdl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ using struct mozilla::void_t from "mozilla/ipc/IPCCore.h";
77
namespace mozilla {
88
namespace dom {
99

10-
[ChildProc=anydom]
1110
async protocol PFileSystemAccessHandleControl
1211
{
1312
parent:

dom/fs/shared/PFileSystemManager.ipdl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,6 @@ union FileSystemMoveEntryResponse
247247

248248
} // namespace fs
249249

250-
[ChildProc=anydom]
251250
async protocol PFileSystemManager
252251
{
253252
manages PFileSystemAccessHandle;

dom/ipc/PContent.ipdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ union PClipboardReadRequestOrError {
479479
* and a content process. There is exactly one PContentParent/PContentChild pair
480480
* for each content process.
481481
*/
482-
[NestedUpTo=inside_cpow, NeedsOtherPid, ChildProc=Content]
482+
[NestedUpTo=inside_cpow, NeedsOtherPid]
483483
sync protocol PContent
484484
{
485485
manages PBrowser;

dom/ipc/PInProcess.ipdl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ namespace dom {
2121
* `mozilla::dom::InProcess{Parent, Child}::Singleton()` should be used to get
2222
* an instance of this actor.
2323
*/
24-
[ChildProc=Parent]
2524
async protocol PInProcess
2625
{
2726
manages PExtensions;

dom/ipc/PJSOracle.ipdl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ namespace mozilla {
99
namespace dom {
1010

1111
// PJSOracle is a top-level actor which manages PJSValidator
12-
[ChildProc=Utility]
1312
async protocol PJSOracle {
1413
manages PJSValidator;
1514

dom/ipc/PProcessHangMonitor.ipdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ struct SlowScriptData
2323
double duration;
2424
};
2525

26-
[ChildImpl=virtual, ParentImpl=virtual, ChildProc=Content]
26+
[ChildImpl=virtual, ParentImpl=virtual]
2727
protocol PProcessHangMonitor
2828
{
2929
parent:

dom/media/gmp/PGMP.ipdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ using mozilla::dom::NativeThreadId from "mozilla/dom/NativeThreadId.h";
2424
namespace mozilla {
2525
namespace gmp {
2626

27-
[NeedsOtherPid, NestedUpTo=inside_sync, ChildImpl="GMPChild", ParentImpl="GMPParent", ChildProc=GMPlugin]
27+
[NeedsOtherPid, NestedUpTo=inside_sync, ChildImpl="GMPChild", ParentImpl="GMPParent"]
2828
sync protocol PGMP
2929
{
3030
manages PGMPTimer;

dom/media/gmp/PGMPContent.ipdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ include "GMPContentChild.h";
1616
namespace mozilla {
1717
namespace gmp {
1818

19-
[NeedsOtherPid, ChildImpl="GMPContentChild", ParentImpl=virtual, ParentProc=anydom, ChildProc=GMPlugin]
19+
[NeedsOtherPid, ChildImpl="GMPContentChild", ParentImpl=virtual]
2020
sync protocol PGMPContent
2121
{
2222
manages PGMPVideoDecoder;

dom/media/gmp/PGMPService.ipdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ struct GMPLaunchResult {
2323
nsCString errorDescription;
2424
};
2525

26-
[NeedsOtherPid, ChildImpl=virtual, ParentImpl=virtual, ChildProc=Content]
26+
[NeedsOtherPid, ChildImpl=virtual, ParentImpl=virtual]
2727
async protocol PGMPService
2828
{
2929
parent:

dom/media/ipc/PRDD.ipdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ namespace mozilla {
4141
// (RemoteDataDecoder) process. There is one instance of this protocol,
4242
// with the RDDParent living on the main thread of the RDD process and
4343
// the RDDChild living on the main thread of the UI process.
44-
[NeedsOtherPid, ParentProc=RDD, ChildProc=Parent]
44+
[NeedsOtherPid]
4545
protocol PRDD
4646
{
4747
parent:

dom/media/ipc/PRemoteDecoderManager.ipdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ union RemoteDecoderInfoIPDL
3838
VideoDecoderInfoIPDL;
3939
};
4040

41-
[NeedsOtherPid, ParentProc=any, ChildProc=anydom]
41+
[NeedsOtherPid]
4242
sync protocol PRemoteDecoderManager
4343
{
4444
manages PRemoteDecoder;

dom/media/webrtc/PMediaTransport.ipdl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ using mozilla::net::NrIceStunAddrArray from "mozilla/net/PStunAddrsParams.h";
2828
namespace mozilla {
2929
namespace dom {
3030

31-
[ParentProc=Socket, ChildProc=Content]
3231
async protocol PMediaTransport {
3332
#ifdef MOZ_WEBRTC
3433
parent:

dom/midi/PMIDIManager.ipdl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ include MIDITypes;
77
namespace mozilla {
88
namespace dom {
99

10-
[ChildProc=anydom]
1110
async protocol PMIDIManager
1211
{
1312
parent:

dom/midi/PMIDIPort.ipdl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ include MIDITypes;
99
namespace mozilla {
1010
namespace dom {
1111

12-
[ChildProc=anydom]
1312
async protocol PMIDIPort
1413
{
1514
parent:

dom/quota/PRemoteQuotaObject.ipdl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ namespace mozilla {
66
namespace dom {
77
namespace quota {
88

9-
[ChildProc=Content]
109
sync protocol PRemoteQuotaObject
1110
{
1211
parent:

dom/quota/test/gtest/PQuotaTest.ipdl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ namespace mozilla {
66
namespace dom {
77
namespace quota {
88

9-
[ParentProc=any, ChildProc=any]
109
sync protocol PQuotaTest {
1110
parent:
1211
sync Try_Success_CustomErr_QmIpcFail()

dom/system/windows/PWindowsUtils.ipdl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ namespace mozilla {
1010
namespace dom {
1111

1212
// Manager of utility actors that run in the windows utility process.
13-
[ChildProc=Utility]
1413
protocol PWindowsUtils {
1514
manages PWindowsLocation;
1615

dom/webtransport/shared/PWebTransport.ipdl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ union StreamResetOrStopSendingError {
4545
StopSendingError;
4646
};
4747

48-
[ChildProc=anydom]
4948
async protocol PWebTransport
5049
{
5150
parent:

gfx/ipc/PCanvasManager.ipdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ namespace gfx {
2222
* compositor process. This protocol should be used to create accelerated
2323
* canvas instances.
2424
*/
25-
[NeedsOtherPid, ParentProc=compositor, ChildProc=anydom]
25+
[NeedsOtherPid]
2626
sync protocol PCanvasManager
2727
{
2828
manages PCanvas;

gfx/ipc/PGPU.ipdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ struct LayerTreeIdMapping {
5353
// This protocol allows the UI process to talk to the GPU process. There is one
5454
// instance of this protocol, with the GPUParent living on the main thread of
5555
// the GPU process and the GPUChild living on the main thread of the UI process.
56-
[NeedsOtherPid, ParentProc=GPU, ChildProc=Parent]
56+
[NeedsOtherPid]
5757
sync protocol PGPU
5858
{
5959
parent:

gfx/ipc/PVsyncBridge.ipdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ namespace gfx {
1616
// dedicated thread in the UI process to the compositor thread in the
1717
// compositor process. The child side exists in the UI process, and the
1818
// parent side in the GPU process.
19-
[NeedsOtherPid, ParentProc=GPU, ChildProc=Parent]
19+
[NeedsOtherPid]
2020
sync protocol PVsyncBridge
2121
{
2222
parent:

gfx/layers/ipc/PAPZInputBridge.ipdl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ namespace layers {
3333
* The parent side lives on the main thread in the GPU process. If there is no
3434
* GPU process, then this protocol is not instantiated.
3535
*/
36-
[ParentProc=GPU, ChildProc=Parent]
3736
sync protocol PAPZInputBridge
3837
{
3938
parent:

gfx/layers/ipc/PCompositorManager.ipdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ union CompositorBridgeOptions {
5959
* compositor thread for compositor data that is only shared once, rather than
6060
* per PCompositorBridge instance.
6161
*/
62-
[NeedsOtherPid, ParentProc=compositor, ChildProc=anydom]
62+
[NeedsOtherPid]
6363
sync protocol PCompositorManager
6464
{
6565
manages PCompositorBridge;

gfx/layers/ipc/PImageBridge.ipdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace layers {
2626
* frames directly to the compositor thread/process without relying on the main thread
2727
* which might be too busy dealing with content script.
2828
*/
29-
[NeedsOtherPid, ParentProc=compositor, ChildProc=anydom]
29+
[NeedsOtherPid]
3030
sync protocol PImageBridge
3131
{
3232
manages PTexture;

gfx/layers/ipc/PUiCompositorController.ipdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace layers {
2020
* compositor from the UI thread. Primarily used on Android to coordinate registering and
2121
* releasing the surface with the compositor.
2222
*/
23-
[NeedsOtherPid, ParentProc=compositor, ChildProc=Parent]
23+
[NeedsOtherPid]
2424
sync protocol PUiCompositorController
2525
{
2626

gfx/layers/ipc/PVideoBridge.ipdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ namespace layers {
2121
* The PVideoBridge protocol is used to share textures from the video decoders
2222
* to the compositor.
2323
*/
24-
[NeedsOtherPid, ParentProc=compositor, ChildProc=any]
24+
[NeedsOtherPid]
2525
sync protocol PVideoBridge
2626
{
2727
manages PTexture;

gfx/vr/ipc/PVR.ipdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ include protocol PVRGPU;
1818
namespace mozilla {
1919
namespace gfx {
2020

21-
[NeedsOtherPid, ChildImpl="VRChild", ParentImpl="VRParent", ParentProc=VR, ChildProc=Parent]
21+
[NeedsOtherPid, ChildImpl="VRChild", ParentImpl="VRParent"]
2222
async protocol PVR
2323
{
2424
parent:

gfx/vr/ipc/PVRGPU.ipdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace gfx {
1111

1212
// The parent process is the VR process.
1313
// The child process is the GPU process.
14-
[NeedsOtherPid, ChildImpl="VRGPUChild", ParentImpl="VRGPUParent", ParentProc=VR, ChildProc=GPU]
14+
[NeedsOtherPid, ChildImpl="VRGPUChild", ParentImpl="VRGPUParent"]
1515
async protocol PVRGPU
1616
{
1717
parent:

gfx/vr/ipc/PVRManager.ipdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ namespace gfx {
3434
* enumeration and sensor state between the compositor thread and
3535
* content threads/processes.
3636
*/
37-
[NeedsOtherPid, ChildImpl="VRManagerChild", ParentImpl="VRManagerParent", ParentProc=compositor, ChildProc=anydom]
37+
[NeedsOtherPid, ChildImpl="VRManagerChild", ParentImpl="VRManagerParent"]
3838
sync protocol PVRManager
3939
{
4040
manages PVRLayer;

ipc/docs/ipdl.rst

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,6 @@ one in ``PMyManager.ipdl``:
351351

352352
.. code-block:: cpp
353353
354-
[ChildProc=Content]
355354
sync protocol PMyManager {
356355
manages PMyManaged;
357356
@@ -407,12 +406,6 @@ They will be discussed further in `Nested messages`_.
407406
response.
408407
============================== ================================================
409408

410-
In addition, top-level protocols are annotated with which processes each side
411-
should be bound into using the ``[ParentProc=*]`` and ``[ChildProc=*]``
412-
attributes. The ``[ParentProc]`` attribute is optional, and defaults to the
413-
``Parent`` process. The ``[ChildProc]`` attribute is required. See `Process
414-
Type Attributes`_ for possible values.
415-
416409
The ``manages`` clause tells IPDL that ``PMyManager`` manages the
417410
``PMyManaged`` actor that was previously ``include`` d. As with any managed
418411
protocol, it must also be the case that ``PMyManaged.ipdl`` includes
@@ -737,62 +730,7 @@ for use in IPDL files:
737730
``Recv`` methods should be used instead of direct
738731
function calls. *New uses of this attribute are
739732
discouraged.*
740-
``[ChildProc=...]`` Indicates which process the child side of the actor
741-
is expected to be bound in. This will be release
742-
asserted when creating the actor. Required for
743-
top-level actors. See `Process Type Attributes`_
744-
for possible values.
745-
``[ParentProc=...]`` Indicates which process the parent side of the
746-
actor is expected to be bound in. This will be
747-
release asserted when creating the actor.
748-
Defaults to ``Parent`` for top-level actors. See
749-
`Process Type Attributes`_ for possible values.
750-
============================= =================================================
751-
752-
.. _Process Type Attributes:
753-
754-
Process Type Attributes
755-
^^^^^^^^^^^^^^^^^^^^^^^
756-
757-
The following are valid values for the ``[ChildProc=...]`` and
758-
``[ParentProc=...]`` attributes on protocols, each corresponding to a specific
759-
process type:
760-
761733
============================= =================================================
762-
``Parent`` The primary "parent" or "main" process
763-
``Content`` A content process, such as those used to host web
764-
pages, workers, and extensions
765-
``IPDLUnitTest`` Test-only process used in IPDL gtests
766-
``GMPlugin`` Gecko Media Plugin (GMP) process
767-
``GPU`` GPU process
768-
``VR`` VR process
769-
``RDD`` Remote Data Decoder (RDD) process
770-
``Socket`` Socket/Networking process
771-
``RemoteSandboxBroker`` Remote Sandbox Broker process
772-
``ForkServer`` Fork Server process
773-
``Utility`` Utility process
774-
============================= =================================================
775-
776-
The attributes also support some wildcard values, which can be used when an
777-
actor can be bound in multiple processes. If you are adding an actor which
778-
needs a new wildcard value, please reach out to the IPC team, and we can add one
779-
for your use-case. They are as follows:
780-
781-
============================= =================================================
782-
``any`` Any process. If a more specific value is
783-
applicable, it should be preferred where possible.
784-
``anychild`` Any process other than ``Parent``. Often used for
785-
utility actors which are bound on a per-process
786-
basis, such as profiling.
787-
``compositor`` Either the ``GPU`` or ``Parent`` process. Often
788-
used for actors bound to the compositor thread.
789-
``anydom`` Either the ``Parent`` or a ``Content`` process.
790-
Often used for actors used to implement DOM APIs.
791-
============================= =================================================
792-
793-
Note that these assertions do not provide security guarantees, and are primarily
794-
intended for use when auditing and as documentation for how actors are being
795-
used.
796734

797735

798736
The C++ Interface

ipc/glue/PBackground.ipdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ using mozilla::camera::CamerasAccessStatus from "mozilla/media/CamerasTypes.h";
8080
namespace mozilla {
8181
namespace ipc {
8282

83-
[NeedsOtherPid, ChildImpl=virtual, ParentImpl=virtual, ChildProc=anydom]
83+
[NeedsOtherPid, ChildImpl=virtual, ParentImpl=virtual]
8484
sync protocol PBackground
8585
{
8686
manages PBackgroundIDBFactory;

ipc/glue/PBackgroundStarter.ipdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ include protocol PBackground;
77
namespace mozilla {
88
namespace ipc {
99

10-
[NeedsOtherPid, ChildProc=anydom]
10+
[NeedsOtherPid]
1111
async protocol PBackgroundStarter
1212
{
1313
parent:

ipc/glue/PUtilityAudioDecoder.ipdl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ namespace ipc {
2121

2222
// This protocol allows to run media audio decoding infrastructure on top
2323
// of the Utility process
24-
[ParentProc=Utility, ChildProc=Parent]
2524
protocol PUtilityAudioDecoder
2625
{
2726
parent:

ipc/glue/PUtilityProcess.ipdl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ namespace ipc {
4545
// one instance of this protocol, with the UtilityProcessParent living on the main thread
4646
// of the main process and the UtilityProcessChild living on the main thread of the Utility
4747
// process.
48-
[NeedsOtherPid, ChildProc=Utility]
49-
protocol PUtilityProcess
48+
[NeedsOtherPid] protocol PUtilityProcess
5049
{
5150
parent:
5251
async InitCrashReporter(NativeThreadId threadId);

ipc/glue/ProtocolUtils.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,13 +309,17 @@ class IProtocol : public HasResultCodes {
309309

310310
// Called when IPC has acquired its first reference to the actor. This method
311311
// may take references which will later be freed by `ActorDealloc`.
312-
virtual void ActorAlloc() = 0;
312+
virtual void ActorAlloc() {}
313313

314314
// Called when IPC has released its final reference to the actor. It will call
315315
// the dealloc method, causing the actor to be actually freed.
316316
//
317317
// The actor has been freed after this method returns.
318-
virtual void ActorDealloc() = 0;
318+
virtual void ActorDealloc() {
319+
if (Manager()) {
320+
Manager()->DeallocManagee(mProtocolId, this);
321+
}
322+
}
319323

320324
static const int32_t kNullActorId = 0;
321325
static const int32_t kFreedActorId = 1;

0 commit comments

Comments
 (0)