Skip to content

Commit

Permalink
Bug 1736371 - Default new actors to be refcounted, r=alwu,media-playb…
Browse files Browse the repository at this point in the history
…ack-reviewers,mccr8

The changes to ipdl actors were mechanical, and largely automated using
a script.

Differential Revision: https://phabricator.services.mozilla.com/D137237
  • Loading branch information
mystor committed Feb 9, 2022
1 parent 1258eda commit 760a897
Show file tree
Hide file tree
Showing 259 changed files with 267 additions and 236 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ include protocol PDocAccessible;
namespace mozilla {
namespace a11y {

[ManualDealloc]
protocol PDocAccessiblePlatformExt {
manager PDocAccessible;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ struct TextAttributesRun {
};


[NestedUpTo=inside_sync] sync protocol PDocAccessiblePlatformExt {
[ManualDealloc, NestedUpTo=inside_sync] sync protocol PDocAccessiblePlatformExt {
manager PDocAccessible;

child:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ include protocol PDocAccessible;
namespace mozilla {
namespace a11y {

[ManualDealloc]
protocol PDocAccessiblePlatformExt {
manager PDocAccessible;

Expand Down
2 changes: 1 addition & 1 deletion accessible/ipc/other/PDocAccessible.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ struct TextRangeData
int32_t EndOffset;
};

[NestedUpTo=inside_sync, ChildImpl=virtual, ParentImpl=virtual]
[ManualDealloc, NestedUpTo=inside_sync, ChildImpl=virtual, ParentImpl=virtual]
sync protocol PDocAccessible
{
manager PBrowser;
Expand Down
2 changes: 1 addition & 1 deletion accessible/ipc/win/PDocAccessible.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ struct ShowEventData
bool EventSuppressed;
};

[ChildImpl=virtual, ParentImpl=virtual]
[ManualDealloc, ChildImpl=virtual, ParentImpl=virtual]
sync protocol PDocAccessible
{
manager PBrowser;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ union OpenHeapSnapshotTempFileResponse
OpenedFile;
};

[ManualDealloc]
sync protocol PHeapSnapshotTempFileHelper
{
manager PContent;
Expand Down
2 changes: 1 addition & 1 deletion dom/broadcastchannel/PBroadcastChannel.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace mozilla {
namespace dom {

// This protocol is used for the BroadcastChannel API
[ChildImpl=virtual, ParentImpl=virtual]
[ManualDealloc, ChildImpl=virtual, ParentImpl=virtual]
protocol PBroadcastChannel
{
manager PBackground;
Expand Down
1 change: 1 addition & 0 deletions dom/cache/PCache.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ namespace mozilla {
namespace dom {
namespace cache {

[ManualDealloc]
protocol PCache
{
manager PBackground;
Expand Down
1 change: 1 addition & 0 deletions dom/cache/PCacheOp.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ namespace mozilla {
namespace dom {
namespace cache {

[ManualDealloc]
protocol PCacheOp
{
manager PCache or PCacheStorage;
Expand Down
1 change: 1 addition & 0 deletions dom/cache/PCacheStorage.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ namespace mozilla {
namespace dom {
namespace cache {

[ManualDealloc]
protocol PCacheStorage
{
manager PBackground;
Expand Down
2 changes: 1 addition & 1 deletion dom/cache/PCacheStreamControl.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace mozilla {
namespace dom {
namespace cache {

[RefCounted] protocol PCacheStreamControl
protocol PCacheStreamControl
{
manager PBackground;

Expand Down
2 changes: 1 addition & 1 deletion dom/canvas/PWebGL.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace dom {
* command from the content process, and a WebGLParent in the compositor
* process that runs the commands.
*/
[RefCounted] sync protocol PWebGL
sync protocol PWebGL
{
manager PCanvasManager;

Expand Down
2 changes: 1 addition & 1 deletion dom/clients/manager/PClientHandle.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ include "mozilla/ipc/ProtocolMessageUtils.h";
namespace mozilla {
namespace dom {

[ChildImpl=virtual, ParentImpl=virtual]
[ManualDealloc, ChildImpl=virtual, ParentImpl=virtual]
protocol PClientHandle
{
manager PClientManager;
Expand Down
2 changes: 1 addition & 1 deletion dom/clients/manager/PClientHandleOp.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ include ClientIPCTypes;
namespace mozilla {
namespace dom {

[ChildImpl=virtual, ParentImpl=virtual]
[ManualDealloc, ChildImpl=virtual, ParentImpl=virtual]
protocol PClientHandleOp
{
manager PClientHandle;
Expand Down
2 changes: 1 addition & 1 deletion dom/clients/manager/PClientManager.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ include ClientIPCTypes;
namespace mozilla {
namespace dom {

[ChildImpl=virtual, ParentImpl=virtual]
[ManualDealloc, ChildImpl=virtual, ParentImpl=virtual]
sync protocol PClientManager
{
manager PBackground;
Expand Down
2 changes: 1 addition & 1 deletion dom/clients/manager/PClientManagerOp.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ include ClientIPCTypes;
namespace mozilla {
namespace dom {

[ChildImpl=virtual, ParentImpl=virtual]
[ManualDealloc, ChildImpl=virtual, ParentImpl=virtual]
protocol PClientManagerOp
{
manager PClientManager;
Expand Down
2 changes: 1 addition & 1 deletion dom/clients/manager/PClientNavigateOp.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ include ClientIPCTypes;
namespace mozilla {
namespace dom {

[ChildImpl=virtual, ParentImpl=virtual]
[ManualDealloc, ChildImpl=virtual, ParentImpl=virtual]
protocol PClientNavigateOp
{
manager PClientManager;
Expand Down
2 changes: 1 addition & 1 deletion dom/clients/manager/PClientSource.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ include ClientIPCTypes;
namespace mozilla {
namespace dom {

[ChildImpl=virtual, ParentImpl=virtual]
[ManualDealloc, ChildImpl=virtual, ParentImpl=virtual]
sync protocol PClientSource
{
manager PClientManager;
Expand Down
2 changes: 1 addition & 1 deletion dom/clients/manager/PClientSourceOp.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ include ClientIPCTypes;
namespace mozilla {
namespace dom {

[ChildImpl=virtual, ParentImpl=virtual]
[ManualDealloc, ChildImpl=virtual, ParentImpl=virtual]
protocol PClientSourceOp
{
manager PClientSource;
Expand Down
1 change: 1 addition & 0 deletions dom/file/ipc/PFileCreator.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ union FileCreationResult
FileCreationErrorResult;
};

[ManualDealloc]
protocol PFileCreator
{
manager PBackground;
Expand Down
2 changes: 1 addition & 1 deletion dom/file/ipc/PRemoteLazyInputStream.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ include IPCStream;

namespace mozilla {

[RefCounted] protocol PRemoteLazyInputStream
protocol PRemoteLazyInputStream
{
manager PBackground or PContent or PSocketProcess;

Expand Down
1 change: 1 addition & 0 deletions dom/file/ipc/PTemporaryIPCBlob.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ union IPCBlobOrError
nsresult;
};

[ManualDealloc]
protocol PTemporaryIPCBlob
{
manager PBackground;
Expand Down
2 changes: 1 addition & 1 deletion dom/filehandle/PBackgroundFileHandle.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ union FileRequestParams
FileRequestFlushParams;
};

[ChildImpl="indexedDB::BackgroundFileHandleChild", ParentImpl=virtual]
[ManualDealloc, ChildImpl="indexedDB::BackgroundFileHandleChild", ParentImpl=virtual]
protocol PBackgroundFileHandle
{
manager PBackgroundMutableFile;
Expand Down
2 changes: 1 addition & 1 deletion dom/filehandle/PBackgroundFileRequest.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ union FileRequestResponse
FileRequestFlushResponse;
};

[ChildImpl="indexedDB::BackgroundFileRequestChild", ParentImpl=virtual]
[ManualDealloc, ChildImpl="indexedDB::BackgroundFileRequestChild", ParentImpl=virtual]
protocol PBackgroundFileRequest
{
manager PBackgroundFileHandle;
Expand Down
2 changes: 1 addition & 1 deletion dom/filehandle/PBackgroundMutableFile.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ using mozilla::dom::FileMode
namespace mozilla {
namespace dom {

[ChildImpl="indexedDB::BackgroundMutableFileChild", ParentImpl="BackgroundMutableFileParentBase"]
[ManualDealloc, ChildImpl="indexedDB::BackgroundMutableFileChild", ParentImpl="BackgroundMutableFileParentBase"]
sync protocol PBackgroundMutableFile
{
manager PBackgroundIDBDatabase;
Expand Down
2 changes: 1 addition & 1 deletion dom/filesystem/PFileSystemRequest.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ union FileSystemResponseValue
FileSystemErrorResponse;
};

[RefCounted, ChildImpl="FileSystemTaskChildBase"]
[ChildImpl="FileSystemTaskChildBase"]
protocol PFileSystemRequest
{
manager PBackground;
Expand Down
2 changes: 1 addition & 1 deletion dom/gamepad/ipc/PGamepadEventChannel.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ using mozilla::dom::GamepadHandle from "mozilla/dom/GamepadHandle.h";
namespace mozilla {
namespace dom {

[RefCounted] protocol PGamepadEventChannel {
protocol PGamepadEventChannel {
manager PBackground;
parent:
async __delete__();
Expand Down
2 changes: 1 addition & 1 deletion dom/gamepad/ipc/PGamepadTestChannel.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ using mozilla::dom::GamepadHandle from "mozilla/dom/GamepadHandle.h";
namespace mozilla {
namespace dom {

[RefCounted] protocol PGamepadTestChannel {
protocol PGamepadTestChannel {
manager PBackground;
parent:
async GamepadTestEvent(uint32_t aID, GamepadChangeEvent aGamepadEvent);
Expand Down
2 changes: 1 addition & 1 deletion dom/indexedDB/PBackgroundIDBCursor.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ union CursorResponse
IndexKeyCursorResponse[];
};

[RefCounted, ChildImpl="indexedDB::BackgroundCursorChildBase", ParentImpl=virtual]
[ChildImpl="indexedDB::BackgroundCursorChildBase", ParentImpl=virtual]
protocol PBackgroundIDBCursor
{
manager PBackgroundIDBTransaction or PBackgroundIDBVersionChangeTransaction;
Expand Down
2 changes: 1 addition & 1 deletion dom/indexedDB/PBackgroundIDBDatabase.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ union DatabaseRequestParams
CreateFileParams;
};

[ChildImpl="indexedDB::BackgroundDatabaseChild", ParentImpl=virtual]
[ManualDealloc, ChildImpl="indexedDB::BackgroundDatabaseChild", ParentImpl=virtual]
sync protocol PBackgroundIDBDatabase
{
manager PBackgroundIDBFactory;
Expand Down
2 changes: 1 addition & 1 deletion dom/indexedDB/PBackgroundIDBDatabaseFile.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace mozilla {
namespace dom {
namespace indexedDB {

[ChildImpl=virtual, ParentImpl=virtual]
[ManualDealloc, ChildImpl=virtual, ParentImpl=virtual]
protocol PBackgroundIDBDatabaseFile
{
manager PBackgroundIDBDatabase;
Expand Down
2 changes: 1 addition & 1 deletion dom/indexedDB/PBackgroundIDBDatabaseRequest.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ union DatabaseRequestResponse
CreateFileRequestResponse;
};

[ChildImpl="indexedDB::BackgroundDatabaseRequestChild", ParentImpl=virtual]
[ManualDealloc, ChildImpl="indexedDB::BackgroundDatabaseRequestChild", ParentImpl=virtual]
protocol PBackgroundIDBDatabaseRequest
{
manager PBackgroundIDBDatabase;
Expand Down
2 changes: 1 addition & 1 deletion dom/indexedDB/PBackgroundIDBFactory.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ union FactoryRequestParams
DeleteDatabaseRequestParams;
};

[RefCounted, ChildImpl="indexedDB::BackgroundFactoryChild", ParentImpl=virtual]
[ChildImpl="indexedDB::BackgroundFactoryChild", ParentImpl=virtual]
sync protocol PBackgroundIDBFactory
{
manager PBackground;
Expand Down
2 changes: 1 addition & 1 deletion dom/indexedDB/PBackgroundIDBFactoryRequest.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ union FactoryRequestResponse
DeleteDatabaseRequestResponse;
};

[ChildImpl="indexedDB::BackgroundFactoryRequestChild", ParentImpl=virtual]
[ManualDealloc, ChildImpl="indexedDB::BackgroundFactoryRequestChild", ParentImpl=virtual]
protocol PBackgroundIDBFactoryRequest
{
manager PBackgroundIDBFactory;
Expand Down
2 changes: 1 addition & 1 deletion dom/indexedDB/PBackgroundIDBRequest.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ union PreprocessResponse
ObjectStoreGetAllPreprocessResponse;
};

[ChildImpl="indexedDB::BackgroundRequestChild", ParentImpl=virtual]
[ManualDealloc, ChildImpl="indexedDB::BackgroundRequestChild", ParentImpl=virtual]
protocol PBackgroundIDBRequest
{
manager PBackgroundIDBTransaction or PBackgroundIDBVersionChangeTransaction;
Expand Down
2 changes: 1 addition & 1 deletion dom/indexedDB/PBackgroundIDBTransaction.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace mozilla {
namespace dom {
namespace indexedDB {

[RefCounted, ChildImpl="indexedDB::BackgroundTransactionChild", ParentImpl=virtual]
[ChildImpl="indexedDB::BackgroundTransactionChild", ParentImpl=virtual]
protocol PBackgroundIDBTransaction {
manager PBackgroundIDBDatabase;

Expand Down
2 changes: 1 addition & 1 deletion dom/indexedDB/PBackgroundIDBVersionChangeTransaction.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace mozilla {
namespace dom {
namespace indexedDB {

[RefCounted, ChildImpl="indexedDB::BackgroundVersionChangeTransactionChild", ParentImpl=virtual]
[ChildImpl="indexedDB::BackgroundVersionChangeTransactionChild", ParentImpl=virtual]
protocol PBackgroundIDBVersionChangeTransaction {
manager PBackgroundIDBDatabase;

Expand Down
2 changes: 1 addition & 1 deletion dom/indexedDB/PBackgroundIndexedDBUtils.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace mozilla {
namespace dom {
namespace indexedDB {

[ChildImpl="indexedDB::BackgroundUtilsChild", ParentImpl=virtual]
[ManualDealloc, ChildImpl="indexedDB::BackgroundUtilsChild", ParentImpl=virtual]
sync protocol PBackgroundIndexedDBUtils
{
manager PBackground;
Expand Down
2 changes: 1 addition & 1 deletion dom/ipc/PBrowser.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ struct PrintPreviewResultInfo
* See `dom/docs/Fission-IPC-Diagram.svg` for an overview of the DOM IPC
* actors.
*/
[NestedUpTo=inside_cpow, RefCounted] sync protocol PBrowser
[NestedUpTo=inside_cpow] sync protocol PBrowser
{
manager PContent;

Expand Down
2 changes: 1 addition & 1 deletion dom/ipc/PBrowserBridge.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ namespace dom {
* See `dom/docs/Fission-IPC-Diagram.svg` for an overview of the DOM IPC
* actors.
*/
[RefCounted] async protocol PBrowserBridge {
async protocol PBrowserBridge {
manager PBrowser;

child:
Expand Down
2 changes: 1 addition & 1 deletion dom/ipc/PColorPicker.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ include protocol PBrowser;
namespace mozilla {
namespace dom {

[ChildImpl=virtual, ParentImpl=virtual]
[ManualDealloc, ChildImpl=virtual, ParentImpl=virtual]
protocol PColorPicker
{
manager PBrowser;
Expand Down
2 changes: 1 addition & 1 deletion dom/ipc/PContent.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ union BlobURLDataRequestResult
* and a content process. There is exactly one PContentParent/PContentChild pair
* for each content process.
*/
[NestedUpTo=inside_cpow, NeedsOtherPid]
[ManualDealloc, NestedUpTo=inside_cpow, NeedsOtherPid]
sync protocol PContent
{
manages PBrowser;
Expand Down
2 changes: 1 addition & 1 deletion dom/ipc/PContentPermissionRequest.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ include "nsContentPermissionHelper.h";
namespace mozilla {
namespace dom {

[ChildImpl="RemotePermissionRequest", ParentImpl=virtual]
[ManualDealloc, ChildImpl="RemotePermissionRequest", ParentImpl=virtual]
protocol PContentPermissionRequest
{
manager PContent;
Expand Down
2 changes: 1 addition & 1 deletion dom/ipc/PCycleCollectWithLogs.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ include protocol PContent;
namespace mozilla {
namespace dom {

[ChildImpl=virtual, ParentImpl=virtual]
[ManualDealloc, ChildImpl=virtual, ParentImpl=virtual]
protocol PCycleCollectWithLogs {
manager PContent;

Expand Down
2 changes: 1 addition & 1 deletion dom/ipc/PFilePicker.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ union MaybeInputData
void_t;
};

[ChildImpl=virtual]
[ManualDealloc, ChildImpl=virtual]
protocol PFilePicker
{
manager PBrowser;
Expand Down
Loading

0 comments on commit 760a897

Please sign in to comment.