mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 12:51:06 +00:00
Backed out changeset 9c4ce17422de (bug 1867360) for causing crashes on PRemoteQuotaObjectChild. CLOSED TREE
This commit is contained in:
parent
a6b389737b
commit
b2289eef93
@ -6,7 +6,6 @@ include IPCStream;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
[ChildProc=any]
|
||||
protocol PRemoteLazyInputStream
|
||||
{
|
||||
parent:
|
||||
|
@ -7,7 +7,6 @@ using struct mozilla::void_t from "mozilla/ipc/IPCCore.h";
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
[ChildProc=anydom]
|
||||
async protocol PFileSystemAccessHandleControl
|
||||
{
|
||||
parent:
|
||||
|
@ -247,7 +247,6 @@ union FileSystemMoveEntryResponse
|
||||
|
||||
} // namespace fs
|
||||
|
||||
[ChildProc=anydom]
|
||||
async protocol PFileSystemManager
|
||||
{
|
||||
manages PFileSystemAccessHandle;
|
||||
|
@ -479,7 +479,7 @@ union PClipboardReadRequestOrError {
|
||||
* and a content process. There is exactly one PContentParent/PContentChild pair
|
||||
* for each content process.
|
||||
*/
|
||||
[NestedUpTo=inside_cpow, NeedsOtherPid, ChildProc=Content]
|
||||
[NestedUpTo=inside_cpow, NeedsOtherPid]
|
||||
sync protocol PContent
|
||||
{
|
||||
manages PBrowser;
|
||||
|
@ -21,7 +21,6 @@ namespace dom {
|
||||
* `mozilla::dom::InProcess{Parent, Child}::Singleton()` should be used to get
|
||||
* an instance of this actor.
|
||||
*/
|
||||
[ChildProc=Parent]
|
||||
async protocol PInProcess
|
||||
{
|
||||
manages PExtensions;
|
||||
|
@ -9,7 +9,6 @@ namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
// PJSOracle is a top-level actor which manages PJSValidator
|
||||
[ChildProc=Utility]
|
||||
async protocol PJSOracle {
|
||||
manages PJSValidator;
|
||||
|
||||
|
@ -23,7 +23,7 @@ struct SlowScriptData
|
||||
double duration;
|
||||
};
|
||||
|
||||
[ChildImpl=virtual, ParentImpl=virtual, ChildProc=Content]
|
||||
[ChildImpl=virtual, ParentImpl=virtual]
|
||||
protocol PProcessHangMonitor
|
||||
{
|
||||
parent:
|
||||
|
@ -24,7 +24,7 @@ using mozilla::dom::NativeThreadId from "mozilla/dom/NativeThreadId.h";
|
||||
namespace mozilla {
|
||||
namespace gmp {
|
||||
|
||||
[NeedsOtherPid, NestedUpTo=inside_sync, ChildImpl="GMPChild", ParentImpl="GMPParent", ChildProc=GMPlugin]
|
||||
[NeedsOtherPid, NestedUpTo=inside_sync, ChildImpl="GMPChild", ParentImpl="GMPParent"]
|
||||
sync protocol PGMP
|
||||
{
|
||||
manages PGMPTimer;
|
||||
|
@ -16,7 +16,7 @@ include "GMPContentChild.h";
|
||||
namespace mozilla {
|
||||
namespace gmp {
|
||||
|
||||
[NeedsOtherPid, ChildImpl="GMPContentChild", ParentImpl=virtual, ParentProc=anydom, ChildProc=GMPlugin]
|
||||
[NeedsOtherPid, ChildImpl="GMPContentChild", ParentImpl=virtual]
|
||||
sync protocol PGMPContent
|
||||
{
|
||||
manages PGMPVideoDecoder;
|
||||
|
@ -23,7 +23,7 @@ struct GMPLaunchResult {
|
||||
nsCString errorDescription;
|
||||
};
|
||||
|
||||
[NeedsOtherPid, ChildImpl=virtual, ParentImpl=virtual, ChildProc=Content]
|
||||
[NeedsOtherPid, ChildImpl=virtual, ParentImpl=virtual]
|
||||
async protocol PGMPService
|
||||
{
|
||||
parent:
|
||||
|
@ -41,7 +41,7 @@ namespace mozilla {
|
||||
// (RemoteDataDecoder) process. There is one instance of this protocol,
|
||||
// with the RDDParent living on the main thread of the RDD process and
|
||||
// the RDDChild living on the main thread of the UI process.
|
||||
[NeedsOtherPid, ParentProc=RDD, ChildProc=Parent]
|
||||
[NeedsOtherPid]
|
||||
protocol PRDD
|
||||
{
|
||||
parent:
|
||||
|
@ -38,7 +38,7 @@ union RemoteDecoderInfoIPDL
|
||||
VideoDecoderInfoIPDL;
|
||||
};
|
||||
|
||||
[NeedsOtherPid, ParentProc=any, ChildProc=anydom]
|
||||
[NeedsOtherPid]
|
||||
sync protocol PRemoteDecoderManager
|
||||
{
|
||||
manages PRemoteDecoder;
|
||||
|
@ -28,7 +28,6 @@ using mozilla::net::NrIceStunAddrArray from "mozilla/net/PStunAddrsParams.h";
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
[ParentProc=Socket, ChildProc=Content]
|
||||
async protocol PMediaTransport {
|
||||
#ifdef MOZ_WEBRTC
|
||||
parent:
|
||||
|
@ -7,7 +7,6 @@ include MIDITypes;
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
[ChildProc=anydom]
|
||||
async protocol PMIDIManager
|
||||
{
|
||||
parent:
|
||||
|
@ -9,7 +9,6 @@ include MIDITypes;
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
[ChildProc=anydom]
|
||||
async protocol PMIDIPort
|
||||
{
|
||||
parent:
|
||||
|
@ -6,7 +6,6 @@ namespace mozilla {
|
||||
namespace dom {
|
||||
namespace quota {
|
||||
|
||||
[ChildProc=Content]
|
||||
sync protocol PRemoteQuotaObject
|
||||
{
|
||||
parent:
|
||||
|
@ -6,7 +6,6 @@ namespace mozilla {
|
||||
namespace dom {
|
||||
namespace quota {
|
||||
|
||||
[ParentProc=any, ChildProc=any]
|
||||
sync protocol PQuotaTest {
|
||||
parent:
|
||||
sync Try_Success_CustomErr_QmIpcFail()
|
||||
|
@ -10,7 +10,6 @@ namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
// Manager of utility actors that run in the windows utility process.
|
||||
[ChildProc=Utility]
|
||||
protocol PWindowsUtils {
|
||||
manages PWindowsLocation;
|
||||
|
||||
|
@ -45,7 +45,6 @@ union StreamResetOrStopSendingError {
|
||||
StopSendingError;
|
||||
};
|
||||
|
||||
[ChildProc=anydom]
|
||||
async protocol PWebTransport
|
||||
{
|
||||
parent:
|
||||
|
@ -22,7 +22,7 @@ namespace gfx {
|
||||
* compositor process. This protocol should be used to create accelerated
|
||||
* canvas instances.
|
||||
*/
|
||||
[NeedsOtherPid, ParentProc=compositor, ChildProc=anydom]
|
||||
[NeedsOtherPid]
|
||||
sync protocol PCanvasManager
|
||||
{
|
||||
manages PCanvas;
|
||||
|
@ -53,7 +53,7 @@ struct LayerTreeIdMapping {
|
||||
// This protocol allows the UI process to talk to the GPU process. There is one
|
||||
// instance of this protocol, with the GPUParent living on the main thread of
|
||||
// the GPU process and the GPUChild living on the main thread of the UI process.
|
||||
[NeedsOtherPid, ParentProc=GPU, ChildProc=Parent]
|
||||
[NeedsOtherPid]
|
||||
sync protocol PGPU
|
||||
{
|
||||
parent:
|
||||
|
@ -16,7 +16,7 @@ namespace gfx {
|
||||
// dedicated thread in the UI process to the compositor thread in the
|
||||
// compositor process. The child side exists in the UI process, and the
|
||||
// parent side in the GPU process.
|
||||
[NeedsOtherPid, ParentProc=GPU, ChildProc=Parent]
|
||||
[NeedsOtherPid]
|
||||
sync protocol PVsyncBridge
|
||||
{
|
||||
parent:
|
||||
|
@ -33,7 +33,6 @@ namespace layers {
|
||||
* The parent side lives on the main thread in the GPU process. If there is no
|
||||
* GPU process, then this protocol is not instantiated.
|
||||
*/
|
||||
[ParentProc=GPU, ChildProc=Parent]
|
||||
sync protocol PAPZInputBridge
|
||||
{
|
||||
parent:
|
||||
|
@ -59,7 +59,7 @@ union CompositorBridgeOptions {
|
||||
* compositor thread for compositor data that is only shared once, rather than
|
||||
* per PCompositorBridge instance.
|
||||
*/
|
||||
[NeedsOtherPid, ParentProc=compositor, ChildProc=anydom]
|
||||
[NeedsOtherPid]
|
||||
sync protocol PCompositorManager
|
||||
{
|
||||
manages PCompositorBridge;
|
||||
|
@ -26,7 +26,7 @@ namespace layers {
|
||||
* frames directly to the compositor thread/process without relying on the main thread
|
||||
* which might be too busy dealing with content script.
|
||||
*/
|
||||
[NeedsOtherPid, ParentProc=compositor, ChildProc=anydom]
|
||||
[NeedsOtherPid]
|
||||
sync protocol PImageBridge
|
||||
{
|
||||
manages PTexture;
|
||||
|
@ -20,7 +20,7 @@ namespace layers {
|
||||
* compositor from the UI thread. Primarily used on Android to coordinate registering and
|
||||
* releasing the surface with the compositor.
|
||||
*/
|
||||
[NeedsOtherPid, ParentProc=compositor, ChildProc=Parent]
|
||||
[NeedsOtherPid]
|
||||
sync protocol PUiCompositorController
|
||||
{
|
||||
|
||||
|
@ -21,7 +21,7 @@ namespace layers {
|
||||
* The PVideoBridge protocol is used to share textures from the video decoders
|
||||
* to the compositor.
|
||||
*/
|
||||
[NeedsOtherPid, ParentProc=compositor, ChildProc=any]
|
||||
[NeedsOtherPid]
|
||||
sync protocol PVideoBridge
|
||||
{
|
||||
manages PTexture;
|
||||
|
@ -18,7 +18,7 @@ include protocol PVRGPU;
|
||||
namespace mozilla {
|
||||
namespace gfx {
|
||||
|
||||
[NeedsOtherPid, ChildImpl="VRChild", ParentImpl="VRParent", ParentProc=VR, ChildProc=Parent]
|
||||
[NeedsOtherPid, ChildImpl="VRChild", ParentImpl="VRParent"]
|
||||
async protocol PVR
|
||||
{
|
||||
parent:
|
||||
|
@ -11,7 +11,7 @@ namespace gfx {
|
||||
|
||||
// The parent process is the VR process.
|
||||
// The child process is the GPU process.
|
||||
[NeedsOtherPid, ChildImpl="VRGPUChild", ParentImpl="VRGPUParent", ParentProc=VR, ChildProc=GPU]
|
||||
[NeedsOtherPid, ChildImpl="VRGPUChild", ParentImpl="VRGPUParent"]
|
||||
async protocol PVRGPU
|
||||
{
|
||||
parent:
|
||||
|
@ -34,7 +34,7 @@ namespace gfx {
|
||||
* enumeration and sensor state between the compositor thread and
|
||||
* content threads/processes.
|
||||
*/
|
||||
[NeedsOtherPid, ChildImpl="VRManagerChild", ParentImpl="VRManagerParent", ParentProc=compositor, ChildProc=anydom]
|
||||
[NeedsOtherPid, ChildImpl="VRManagerChild", ParentImpl="VRManagerParent"]
|
||||
sync protocol PVRManager
|
||||
{
|
||||
manages PVRLayer;
|
||||
|
@ -351,7 +351,6 @@ one in ``PMyManager.ipdl``:
|
||||
|
||||
.. code-block:: cpp
|
||||
|
||||
[ChildProc=Content]
|
||||
sync protocol PMyManager {
|
||||
manages PMyManaged;
|
||||
|
||||
@ -407,12 +406,6 @@ They will be discussed further in `Nested messages`_.
|
||||
response.
|
||||
============================== ================================================
|
||||
|
||||
In addition, top-level protocols are annotated with which processes each side
|
||||
should be bound into using the ``[ParentProc=*]`` and ``[ChildProc=*]``
|
||||
attributes. The ``[ParentProc]`` attribute is optional, and defaults to the
|
||||
``Parent`` process. The ``[ChildProc]`` attribute is required. See `Process
|
||||
Type Attributes`_ for possible values.
|
||||
|
||||
The ``manages`` clause tells IPDL that ``PMyManager`` manages the
|
||||
``PMyManaged`` actor that was previously ``include`` d. As with any managed
|
||||
protocol, it must also be the case that ``PMyManaged.ipdl`` includes
|
||||
@ -737,63 +730,8 @@ for use in IPDL files:
|
||||
``Recv`` methods should be used instead of direct
|
||||
function calls. *New uses of this attribute are
|
||||
discouraged.*
|
||||
``[ChildProc=...]`` Indicates which process the child side of the actor
|
||||
is expected to be bound in. This will be release
|
||||
asserted when creating the actor. Required for
|
||||
top-level actors. See `Process Type Attributes`_
|
||||
for possible values.
|
||||
``[ParentProc=...]`` Indicates which process the parent side of the
|
||||
actor is expected to be bound in. This will be
|
||||
release asserted when creating the actor.
|
||||
Defaults to ``Parent`` for top-level actors. See
|
||||
`Process Type Attributes`_ for possible values.
|
||||
============================= =================================================
|
||||
|
||||
.. _Process Type Attributes:
|
||||
|
||||
Process Type Attributes
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
The following are valid values for the ``[ChildProc=...]`` and
|
||||
``[ParentProc=...]`` attributes on protocols, each corresponding to a specific
|
||||
process type:
|
||||
|
||||
============================= =================================================
|
||||
``Parent`` The primary "parent" or "main" process
|
||||
``Content`` A content process, such as those used to host web
|
||||
pages, workers, and extensions
|
||||
``IPDLUnitTest`` Test-only process used in IPDL gtests
|
||||
``GMPlugin`` Gecko Media Plugin (GMP) process
|
||||
``GPU`` GPU process
|
||||
``VR`` VR process
|
||||
``RDD`` Remote Data Decoder (RDD) process
|
||||
``Socket`` Socket/Networking process
|
||||
``RemoteSandboxBroker`` Remote Sandbox Broker process
|
||||
``ForkServer`` Fork Server process
|
||||
``Utility`` Utility process
|
||||
============================= =================================================
|
||||
|
||||
The attributes also support some wildcard values, which can be used when an
|
||||
actor can be bound in multiple processes. If you are adding an actor which
|
||||
needs a new wildcard value, please reach out to the IPC team, and we can add one
|
||||
for your use-case. They are as follows:
|
||||
|
||||
============================= =================================================
|
||||
``any`` Any process. If a more specific value is
|
||||
applicable, it should be preferred where possible.
|
||||
``anychild`` Any process other than ``Parent``. Often used for
|
||||
utility actors which are bound on a per-process
|
||||
basis, such as profiling.
|
||||
``compositor`` Either the ``GPU`` or ``Parent`` process. Often
|
||||
used for actors bound to the compositor thread.
|
||||
``anydom`` Either the ``Parent`` or a ``Content`` process.
|
||||
Often used for actors used to implement DOM APIs.
|
||||
============================= =================================================
|
||||
|
||||
Note that these assertions do not provide security guarantees, and are primarily
|
||||
intended for use when auditing and as documentation for how actors are being
|
||||
used.
|
||||
|
||||
|
||||
The C++ Interface
|
||||
-----------------
|
||||
|
@ -80,7 +80,7 @@ using mozilla::camera::CamerasAccessStatus from "mozilla/media/CamerasTypes.h";
|
||||
namespace mozilla {
|
||||
namespace ipc {
|
||||
|
||||
[NeedsOtherPid, ChildImpl=virtual, ParentImpl=virtual, ChildProc=anydom]
|
||||
[NeedsOtherPid, ChildImpl=virtual, ParentImpl=virtual]
|
||||
sync protocol PBackground
|
||||
{
|
||||
manages PBackgroundIDBFactory;
|
||||
|
@ -7,7 +7,7 @@ include protocol PBackground;
|
||||
namespace mozilla {
|
||||
namespace ipc {
|
||||
|
||||
[NeedsOtherPid, ChildProc=anydom]
|
||||
[NeedsOtherPid]
|
||||
async protocol PBackgroundStarter
|
||||
{
|
||||
parent:
|
||||
|
@ -21,7 +21,6 @@ namespace ipc {
|
||||
|
||||
// This protocol allows to run media audio decoding infrastructure on top
|
||||
// of the Utility process
|
||||
[ParentProc=Utility, ChildProc=Parent]
|
||||
protocol PUtilityAudioDecoder
|
||||
{
|
||||
parent:
|
||||
|
@ -45,8 +45,7 @@ namespace ipc {
|
||||
// one instance of this protocol, with the UtilityProcessParent living on the main thread
|
||||
// of the main process and the UtilityProcessChild living on the main thread of the Utility
|
||||
// process.
|
||||
[NeedsOtherPid, ChildProc=Utility]
|
||||
protocol PUtilityProcess
|
||||
[NeedsOtherPid] protocol PUtilityProcess
|
||||
{
|
||||
parent:
|
||||
async InitCrashReporter(NativeThreadId threadId);
|
||||
|
@ -309,13 +309,17 @@ class IProtocol : public HasResultCodes {
|
||||
|
||||
// Called when IPC has acquired its first reference to the actor. This method
|
||||
// may take references which will later be freed by `ActorDealloc`.
|
||||
virtual void ActorAlloc() = 0;
|
||||
virtual void ActorAlloc() {}
|
||||
|
||||
// Called when IPC has released its final reference to the actor. It will call
|
||||
// the dealloc method, causing the actor to be actually freed.
|
||||
//
|
||||
// The actor has been freed after this method returns.
|
||||
virtual void ActorDealloc() = 0;
|
||||
virtual void ActorDealloc() {
|
||||
if (Manager()) {
|
||||
Manager()->DeallocManagee(mProtocolId, this);
|
||||
}
|
||||
}
|
||||
|
||||
static const int32_t kNullActorId = 0;
|
||||
static const int32_t kFreedActorId = 1;
|
||||
|
@ -316,15 +316,6 @@ class Protocol(NamespacedNode):
|
||||
return attr.value
|
||||
return None
|
||||
|
||||
def procAttribute(self, side):
|
||||
assert side in ("parent", "child")
|
||||
attr = self.attributes.get(side.capitalize() + "Proc")
|
||||
if attr is not None:
|
||||
return attr.value
|
||||
elif side == "parent" and len(self.managers) == 0:
|
||||
return "Parent" # Default for toplevel actors
|
||||
return None
|
||||
|
||||
|
||||
class StructField(Node):
|
||||
def __init__(self, loc, type, name):
|
||||
|
@ -594,7 +594,7 @@ def make_enum(name, members_str):
|
||||
return type(name, (), members_dict)
|
||||
|
||||
|
||||
MethodSpec = make_enum("MethodSpec", "NONE VIRTUAL PURE OVERRIDE STATIC FINAL")
|
||||
MethodSpec = make_enum("MethodSpec", "NONE VIRTUAL PURE OVERRIDE STATIC")
|
||||
|
||||
|
||||
class MethodDecl(Node):
|
||||
|
@ -265,8 +265,6 @@ class CxxCodeGen(CodePrinter, Visitor):
|
||||
|
||||
if md.methodspec == MethodSpec.OVERRIDE:
|
||||
self.write(" override")
|
||||
elif md.methodspec == MethodSpec.FINAL:
|
||||
self.write(" final")
|
||||
elif md.methodspec == MethodSpec.PURE:
|
||||
self.write(" = 0")
|
||||
|
||||
|
@ -3829,27 +3829,6 @@ class _GenerateProtocolActorCode(ipdl.ast.Visitor):
|
||||
|
||||
self.cls.addstmts([dtor, Whitespace.NL])
|
||||
|
||||
# ActorAlloc() and ActorDealloc()
|
||||
actoralloc = MethodDefn(MethodDecl("ActorAlloc", methodspec=MethodSpec.FINAL))
|
||||
actordealloc = MethodDefn(
|
||||
MethodDecl("ActorDealloc", methodspec=MethodSpec.FINAL)
|
||||
)
|
||||
|
||||
# Assert process type in ActorAlloc
|
||||
procattr = p.procAttribute(self.side)
|
||||
if procattr not in ("any", None):
|
||||
if procattr == "anychild":
|
||||
procattr_assertion = "!XRE_IsParentProcess()"
|
||||
elif procattr == "anydom":
|
||||
procattr_assertion = "XRE_IsParentProcess() || XRE_IsContentProcess()"
|
||||
elif procattr == "compositor":
|
||||
procattr_assertion = "XRE_IsParentProcess() || XRE_IsGPUProcess()"
|
||||
else:
|
||||
procattr_assertion = "XRE_Is%sProcess()" % procattr
|
||||
actoralloc.addcode(
|
||||
"MOZ_RELEASE_ASSERT(${assertion});\n", assertion=procattr_assertion
|
||||
)
|
||||
|
||||
if ptype.isRefcounted():
|
||||
if not ptype.isToplevel():
|
||||
self.cls.addcode(
|
||||
@ -3857,23 +3836,14 @@ class _GenerateProtocolActorCode(ipdl.ast.Visitor):
|
||||
NS_INLINE_DECL_PURE_VIRTUAL_REFCOUNTING
|
||||
"""
|
||||
)
|
||||
# Perform AddRef/Release in ActorAlloc/ActorDealloc if refcounted.
|
||||
actoralloc.addcode("AddRef();\n")
|
||||
actordealloc.addcode("Release();\n")
|
||||
elif not ptype.isToplevel():
|
||||
# If we're a managed actor with [ManualDealloc], use DeallocManagee
|
||||
# to invoke the relevant Dealloc method.
|
||||
actordealloc.addcode(
|
||||
self.cls.addstmt(Label.PROTECTED)
|
||||
self.cls.addcode(
|
||||
"""
|
||||
void ActorAlloc() final { AddRef(); }
|
||||
void ActorDealloc() final { Release(); }
|
||||
"""
|
||||
if (Manager()) {
|
||||
Manager()->DeallocManagee(${protocolId}, this);
|
||||
}
|
||||
""",
|
||||
protocolId=_protocolId(ptype),
|
||||
)
|
||||
|
||||
self.cls.addstmts([Label.PROTECTED, actoralloc, actordealloc])
|
||||
|
||||
self.cls.addstmt(Label.PUBLIC)
|
||||
if ptype.hasOtherPid():
|
||||
otherpidmeth = MethodDefn(
|
||||
|
@ -15,10 +15,6 @@ from ipdl.ast import priorityList
|
||||
import ipdl.builtin as builtin
|
||||
from ipdl.util import hash_str
|
||||
|
||||
# Used to get the list of Gecko process types
|
||||
# xpcom/geckoprocesstypes_generator/geckoprocesstypes/__init__.py
|
||||
import geckoprocesstypes
|
||||
|
||||
_DELETE_MSG = "__delete__"
|
||||
|
||||
|
||||
@ -985,13 +981,6 @@ class GatherDecls(TcheckVisitor):
|
||||
|
||||
p = tu.protocol
|
||||
|
||||
proc_options = [
|
||||
"any",
|
||||
"anychild", # non-Parent process
|
||||
"anydom", # Parent or Content process
|
||||
"compositor", # Parent or GPU process
|
||||
] + [p.proc_typename for p in geckoprocesstypes.process_types]
|
||||
|
||||
self.checkAttributes(
|
||||
p.attributes,
|
||||
{
|
||||
@ -1000,8 +989,6 @@ class GatherDecls(TcheckVisitor):
|
||||
"NeedsOtherPid": None,
|
||||
"ChildImpl": ("virtual", StringLiteral),
|
||||
"ParentImpl": ("virtual", StringLiteral),
|
||||
"ChildProc": proc_options,
|
||||
"ParentProc": proc_options,
|
||||
},
|
||||
)
|
||||
|
||||
@ -1288,13 +1275,9 @@ class GatherDecls(TcheckVisitor):
|
||||
if not p.decl.type.isToplevel() and p.decl.type.needsotherpid:
|
||||
self.error(p.loc, "[NeedsOtherPid] only applies to toplevel protocols")
|
||||
|
||||
if p.decl.type.isToplevel():
|
||||
if not p.decl.type.isRefcounted():
|
||||
if p.decl.type.isToplevel() and not p.decl.type.isRefcounted():
|
||||
self.error(p.loc, "Toplevel protocols cannot be [ManualDealloc]")
|
||||
|
||||
if "ChildProc" not in p.attributes:
|
||||
self.error(p.loc, "Toplevel protocols must specify [ChildProc]")
|
||||
|
||||
# FIXME/cjones declare all the little C++ thingies that will
|
||||
# be generated. they're not relevant to IPDL itself, but
|
||||
# those ("invisible") symbols can clash with others in the
|
||||
|
@ -20,8 +20,7 @@ struct TestPartResult {
|
||||
};
|
||||
|
||||
// Primary actor for the IPDLUnitTest process and thread.
|
||||
[NeedsOtherPid, ChildProc=any]
|
||||
async protocol PIPDLUnitTest {
|
||||
[NeedsOtherPid] async protocol PIPDLUnitTest {
|
||||
child:
|
||||
async Start(nsCString name, ScopedPort port, nsID channelId);
|
||||
|
||||
|
@ -5,7 +5,6 @@
|
||||
namespace mozilla {
|
||||
namespace _ipdltest {
|
||||
|
||||
[ChildProc=any]
|
||||
async protocol PTestBasic {
|
||||
child:
|
||||
async Hello();
|
||||
|
@ -7,7 +7,7 @@
|
||||
namespace mozilla {
|
||||
namespace _ipdltest {
|
||||
|
||||
[ParentImpl=virtual, ChildImpl=virtual, ChildProc=any]
|
||||
[ParentImpl=virtual, ChildImpl=virtual]
|
||||
async protocol PTestCrossProcessSemaphore {
|
||||
child:
|
||||
async CrossProcessSemaphore(CrossProcessSemaphoreHandle aSem);
|
||||
|
@ -5,7 +5,7 @@
|
||||
namespace mozilla {
|
||||
namespace _ipdltest {
|
||||
|
||||
[ParentImpl=virtual, ChildImpl=virtual, ChildProc=any]
|
||||
[ParentImpl=virtual, ChildImpl=virtual]
|
||||
async protocol PTestInduceConnectionError {
|
||||
child:
|
||||
async Begin();
|
||||
|
@ -5,7 +5,7 @@
|
||||
namespace mozilla {
|
||||
namespace _ipdltest {
|
||||
|
||||
[ParentImpl=virtual, ChildImpl=virtual, ChildProc=any]
|
||||
[ParentImpl=virtual, ChildImpl=virtual]
|
||||
async protocol PTestManyHandles {
|
||||
child:
|
||||
async ManyHandles(FileDescriptor[] descrs);
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
include protocol AsyncCtorReturnsManagee;
|
||||
|
||||
[ChildProc=any]
|
||||
protocol AsyncCtorReturns {
|
||||
manages AsyncCtorReturnsManagee;
|
||||
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
include protocol AsyncCtorReturns;
|
||||
|
||||
[ChildProc=any]
|
||||
protocol AsyncCtorReturnsManagee {
|
||||
manager AsyncCtorReturns;
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
//error: inside_sync nested messages must be sync (here, message `Msg' in protocol `AsyncInsideSync')
|
||||
//error: message `Msg' requires more powerful send semantics than its protocol `AsyncInsideSync' provides
|
||||
|
||||
[ChildProc=any]
|
||||
protocol AsyncInsideSync {
|
||||
child:
|
||||
[Nested=inside_sync] async Msg();
|
||||
|
@ -1,6 +1,5 @@
|
||||
//error: invalid value for attribute `Nested', expected one of: not, inside_sync, inside_cpow
|
||||
|
||||
[ChildProc=any]
|
||||
protocol ExtendedAttrInvalidNestedValue {
|
||||
child:
|
||||
[Nested=invalid] async __delete__();
|
||||
|
@ -1,6 +1,5 @@
|
||||
//error: invalid value for attribute `Priority', expected one of: normal, input, vsync, mediumhigh, control
|
||||
|
||||
[ChildProc=any]
|
||||
protocol ExtendedAttrInvalidPriorityValue {
|
||||
child:
|
||||
[Priority=invalid] async __delete__();
|
||||
|
@ -4,7 +4,6 @@ include protocol ManageeForgot;
|
||||
|
||||
// ManageeForgot should have this protocol as its manager.
|
||||
|
||||
[ChildProc=any]
|
||||
protocol ForgottenManager {
|
||||
manages ManageeForgot;
|
||||
child:
|
||||
|
@ -3,7 +3,6 @@
|
||||
//error: inside_cpow nested parent-to-child messages are verboten (here, message `Msg' in protocol `InsideCpowToChild')
|
||||
//error: message `Msg' requires more powerful send semantics than its protocol `InsideCpowToChild' provides
|
||||
|
||||
[ChildProc=any]
|
||||
protocol InsideCpowToChild {
|
||||
child:
|
||||
[Nested=inside_cpow] sync Msg();
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
include protocol IntrAsyncManagee;
|
||||
|
||||
[ChildProc=any]
|
||||
async protocol IntrAsyncManager {
|
||||
manages IntrAsyncManagee;
|
||||
parent:
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
include protocol IntrSyncManagee;
|
||||
|
||||
[ChildProc=any]
|
||||
sync protocol IntrSyncManager {
|
||||
manages IntrSyncManagee;
|
||||
parent:
|
||||
|
@ -5,7 +5,6 @@ include protocol ForgottenManager;
|
||||
// See ForgottenManager. This includes ForgottenManager to ensure that
|
||||
// loading this file fails.
|
||||
|
||||
[ChildProc=any]
|
||||
protocol ManageeForgot {
|
||||
child:
|
||||
async __delete__();
|
||||
|
@ -5,7 +5,6 @@ include protocol ForgottenManagee;
|
||||
// See ForgottenManagee.ipdl. This includes ForgottenManagee to
|
||||
// ensure that loading this file fails.
|
||||
|
||||
[ChildProc=any]
|
||||
protocol ManagerForgot {
|
||||
child:
|
||||
async Msg();
|
||||
|
@ -1,6 +1,5 @@
|
||||
//error: `nullable' qualifier for type `int' is unsupported
|
||||
|
||||
[ChildProc=any]
|
||||
protocol PNullable {
|
||||
child:
|
||||
async Msg(nullable int i);
|
||||
|
@ -4,7 +4,6 @@ union Union {
|
||||
nullable int;
|
||||
};
|
||||
|
||||
[ChildProc=any]
|
||||
protocol Nullable2 {
|
||||
child:
|
||||
async Msg(Union i);
|
||||
|
@ -1,6 +1,5 @@
|
||||
//error: argument typename `X' of message `Test' has not been declared
|
||||
|
||||
[ChildProc=any]
|
||||
protocol PBadArrayBase {
|
||||
child:
|
||||
async Test(X[] x);
|
||||
|
@ -2,8 +2,7 @@
|
||||
|
||||
include protocol PBadNestedManager;
|
||||
|
||||
[NestedUpTo=inside_sync, ChildProc=any]
|
||||
async protocol PBadNestedManagee {
|
||||
[NestedUpTo=inside_sync] async protocol PBadNestedManagee {
|
||||
manager PBadNestedManager;
|
||||
child:
|
||||
async __delete__();
|
||||
|
@ -2,8 +2,7 @@
|
||||
|
||||
include protocol PBadNestedManagee;
|
||||
|
||||
[NestedUpTo=not, ChildProc=any]
|
||||
async protocol PBadNestedManager {
|
||||
[NestedUpTo=not] async protocol PBadNestedManager {
|
||||
manages PBadNestedManagee;
|
||||
parent:
|
||||
async PBadNestedManagee();
|
||||
|
@ -1,7 +1,7 @@
|
||||
//error: invalid value for attribute `ParentImpl', expected one of: virtual, StringLiteral
|
||||
//error: invalid value for attribute `ChildImpl', expected one of: virtual, StringLiteral
|
||||
|
||||
[ParentImpl=NotQuoted, ChildImpl, ChildProc=any]
|
||||
[ParentImpl=NotQuoted, ChildImpl]
|
||||
async protocol PBadSideImpl {
|
||||
parent:
|
||||
async __delete__();
|
||||
|
@ -1,6 +1,5 @@
|
||||
//error: argument typename `UndeclaredType' of message `Test' has not been declared
|
||||
|
||||
[ChildProc=any]
|
||||
protocol PBadUniquePtrBase {
|
||||
child:
|
||||
async Test(UniquePtr<UndeclaredType> x);
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
include protocol compressCtor;
|
||||
|
||||
[ChildProc=any]
|
||||
async protocol PCompressInvalid {
|
||||
child:
|
||||
[Compress=Invalid] async Message();
|
||||
|
@ -6,7 +6,6 @@
|
||||
// obviously bad.
|
||||
include protocol PDouble;
|
||||
|
||||
[ChildProc=any]
|
||||
protocol PDouble {
|
||||
child: async Msg();
|
||||
};
|
||||
|
@ -1,7 +1,6 @@
|
||||
//error: invalid value for attribute `NestedUpTo', expected one of: not, inside_sync, inside_cpow
|
||||
|
||||
[NestedUpTo=invalid, ChildProc=any]
|
||||
async protocol PExtendedAttrInvalidValue {
|
||||
[NestedUpTo=invalid] async protocol PExtendedAttrInvalidValue {
|
||||
parent:
|
||||
async Msg();
|
||||
};
|
||||
|
@ -1,7 +1,6 @@
|
||||
//error: Repeated extended attribute `RefCounted'
|
||||
|
||||
[RefCounted, RefCounted, ChildProc=any]
|
||||
async protocol PExtendedAttrRepeated {
|
||||
[RefCounted, RefCounted] async protocol PExtendedAttrRepeated {
|
||||
parent:
|
||||
async Msg();
|
||||
};
|
||||
|
@ -1,7 +1,6 @@
|
||||
//error: unexpected value for valueless attribute `ManualDealloc'
|
||||
|
||||
[ManualDealloc=invalid, ChildProc=any]
|
||||
async protocol PExtendedAttrUnexpectedValue {
|
||||
[ManualDealloc=invalid] async protocol PExtendedAttrUnexpectedValue {
|
||||
parent:
|
||||
async Msg();
|
||||
};
|
||||
|
@ -1,7 +1,6 @@
|
||||
//error: unknown attribute `InvalidAttr'
|
||||
|
||||
[InvalidAttr, ChildProc=any]
|
||||
async protocol PExtendedAttrUnknownValue {
|
||||
[InvalidAttr] async protocol PExtendedAttrUnknownValue {
|
||||
parent:
|
||||
async Msg();
|
||||
};
|
||||
|
@ -7,7 +7,6 @@ using class mozilla::ipc::SomeMoveonlyType from "SomeFile.h";
|
||||
[MoveOnly=send] using class mozilla::ipc::SomeMoveonlySendType from "SomeFile.h";
|
||||
[MoveOnly=data] using class mozilla::ipc::SomeMoveonlySendType from "SomeFile.h";
|
||||
|
||||
[ChildProc=any]
|
||||
protocol PInconsistentMoveOnly {
|
||||
child:
|
||||
async SomeMessage();
|
||||
|
@ -1,6 +1,5 @@
|
||||
//error: intr message `Msg' cannot specify [Nested]
|
||||
|
||||
[ChildProc=any]
|
||||
intr protocol PIntrNested {
|
||||
child:
|
||||
[Nested=inside_sync, LegacyIntr] intr Msg();
|
||||
|
@ -1,7 +1,6 @@
|
||||
//error: intr protocol `PIntrNestedProtocol' cannot specify [NestedUpTo]
|
||||
|
||||
[NestedUpTo=inside_sync, ChildProc=any]
|
||||
intr protocol PIntrNestedProtocol {
|
||||
[NestedUpTo=inside_sync] intr protocol PIntrNestedProtocol {
|
||||
child:
|
||||
[LegacyIntr] intr Msg();
|
||||
};
|
||||
|
@ -1,6 +1,5 @@
|
||||
//error: intr message `Msg' cannot specify [Priority]
|
||||
|
||||
[ChildProc=any]
|
||||
intr protocol PIntrPriority {
|
||||
child:
|
||||
[Priority=vsync, LegacyIntr] intr Msg();
|
||||
|
@ -1,6 +1,5 @@
|
||||
//error: unexpected value for valueless attribute `LazySend'
|
||||
|
||||
[ChildProc=any]
|
||||
async protocol PLazySendInvalid {
|
||||
child:
|
||||
[LazySend=Invalid] async Message();
|
||||
|
@ -1,6 +1,5 @@
|
||||
//error: non-async message `Message' cannot specify [LazySend]
|
||||
|
||||
[ChildProc=any]
|
||||
sync protocol PLazySendSync {
|
||||
child:
|
||||
[LazySend] sync Message() returns (bool ok);
|
||||
|
@ -1,6 +0,0 @@
|
||||
//error: Toplevel protocols must specify [ChildProc]
|
||||
|
||||
protocol PMissingProc {
|
||||
parent:
|
||||
async Msg();
|
||||
};
|
@ -1,6 +1,5 @@
|
||||
//error: argument typename `int' of message `foo' has a NoTaint attribute, but the message lacks the Tainted attribute
|
||||
|
||||
[ChildProc=any]
|
||||
intr protocol PNoTaintWithoutTainted {
|
||||
child:
|
||||
async foo([NoTaint=passback] int id);
|
||||
|
@ -1,7 +1,6 @@
|
||||
//error: Toplevel protocols cannot be [ManualDealloc]
|
||||
|
||||
[ManualDealloc, ChildProc=any]
|
||||
async protocol PToplevelManualDealloc {
|
||||
[ManualDealloc] async protocol PToplevelManualDealloc {
|
||||
child:
|
||||
async __delete__();
|
||||
};
|
||||
|
@ -1,6 +1,5 @@
|
||||
//error: bad syntax near `UniquePtr'
|
||||
|
||||
[ChildProc=any]
|
||||
protocol PUniquePtrRecursive {
|
||||
child: async Msg( UniquePtr< UniquePtr<int> > aa);
|
||||
};
|
||||
|
@ -4,7 +4,6 @@ struct X {
|
||||
UniquePtr<X> x;
|
||||
};
|
||||
|
||||
[ChildProc=any]
|
||||
protocol PUniquePtrSelfRecStruct {
|
||||
child: async Msg(UniquePtr<X> aa);
|
||||
};
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
union X { UniquePtr<X>; };
|
||||
|
||||
[ChildProc=any]
|
||||
protocol PUniquePtrSelfRecUnion {
|
||||
child: async Msg(UniquePtr<X> aa);
|
||||
};
|
||||
|
@ -1,7 +0,0 @@
|
||||
//error: invalid value for attribute `ChildProc', expected one of: any, anychild, anydom, compositor, Parent, Content, IPDLUnitTest, GMPlugin, GPU, VR, RDD, Socket, RemoteSandboxBroker, ForkServer, Utility
|
||||
|
||||
[ChildProc=unknowntype]
|
||||
protocol PUnknownProc {
|
||||
parent:
|
||||
async Msg();
|
||||
};
|
@ -1,6 +1,5 @@
|
||||
//error: IPC message PasyncMessageListed::Msg is async, can be delisted
|
||||
|
||||
[ChildProc=any]
|
||||
protocol PasyncMessageListed {
|
||||
parent:
|
||||
async Msg();
|
||||
|
@ -1,6 +1,4 @@
|
||||
//error: non-returns message `NormalPrio' cannot specify [ReplyPriority]
|
||||
|
||||
[ChildProc=any]
|
||||
async protocol ReplyPrioWithoutReturns
|
||||
{
|
||||
child:
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
include protocol SyncAsyncManager;
|
||||
|
||||
[ChildProc=any]
|
||||
sync protocol SyncAsyncManagee {
|
||||
manager SyncAsyncManager;
|
||||
child:
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
include protocol SyncAsyncManagee;
|
||||
|
||||
[ChildProc=any]
|
||||
async protocol SyncAsyncManager {
|
||||
manages SyncAsyncManagee;
|
||||
parent:
|
||||
|
@ -1,6 +1,4 @@
|
||||
//error: non-async message `NormalPrio' cannot specify [ReplyPriority]
|
||||
|
||||
[ChildProc=any]
|
||||
sync protocol SyncPrio
|
||||
{
|
||||
child:
|
||||
|
@ -1,6 +1,5 @@
|
||||
//error: bad syntax near `['
|
||||
|
||||
[ChildProc=any]
|
||||
protocol array_Recursive {
|
||||
child: async Msg(int[][] aa);
|
||||
};
|
||||
|
@ -4,7 +4,6 @@ include protocol IDONTEXIST;
|
||||
|
||||
// error: nonexistent protocol ^^^
|
||||
|
||||
[ChildProc=any]
|
||||
protocol badProtocolInclude {
|
||||
child: async Msg();
|
||||
};
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
include protocol compressCtorManagee;
|
||||
|
||||
[ChildProc=any]
|
||||
intr protocol compressCtor {
|
||||
manages compressCtorManagee;
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
//error: ctor for protocol `conflictProtocolMsg', which is not managed by protocol `conflictProtocolMsg'
|
||||
|
||||
[ChildProc=any]
|
||||
protocol conflictProtocolMsg {
|
||||
|
||||
// it's an error to re-use the protocol name as a message ID; these
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
include protocol cyclecheck_Child;
|
||||
|
||||
[ChildProc=any]
|
||||
protocol cyclecheck_Parent {
|
||||
manages cyclecheck_Child;
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
//error: lexically invalid characters `~SomeMsg();
|
||||
|
||||
[ChildProc=any]
|
||||
protocol dtorReserved {
|
||||
|
||||
// it's an error to use old-style dtor syntax
|
||||
|
@ -3,7 +3,6 @@
|
||||
[RefCounted] using class mozilla::ipc::SomeRefcountedType from "SomeFile.h";
|
||||
using class mozilla::ipc::SomeRefcountedType from "SomeFile.h";
|
||||
|
||||
[ChildProc=any]
|
||||
protocol inconsistentRC {
|
||||
child:
|
||||
async SomeMessage();
|
||||
|
@ -1,7 +1,6 @@
|
||||
//error: message `foo' in protocol `intrMessageCompress' requests compression but is not async
|
||||
//error: message `bar' in protocol `intrMessageCompress' requests compression but is not async
|
||||
|
||||
[ChildProc=any]
|
||||
intr protocol intrMessageCompress {
|
||||
parent:
|
||||
[Compress, LegacyIntr] intr foo();
|
||||
|
@ -1,6 +1,5 @@
|
||||
//error: bad syntax near `?'
|
||||
|
||||
[ChildProc=any]
|
||||
protocol maybe_Recursive {
|
||||
child: async Msg(int?? aa);
|
||||
};
|
||||
|
@ -4,7 +4,6 @@ struct X {
|
||||
X? x;
|
||||
};
|
||||
|
||||
[ChildProc=any]
|
||||
protocol maybe_SelfRecStruct {
|
||||
child: async Msg(X? aa);
|
||||
};
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
union X { X?; };
|
||||
|
||||
[ChildProc=any]
|
||||
protocol maybe_SelfRecUnion {
|
||||
child: async Msg(X? aa);
|
||||
};
|
||||
|
@ -1,6 +1,5 @@
|
||||
//error: missing message direction
|
||||
|
||||
[ChildProc=any]
|
||||
protocol messageNoDirection {
|
||||
async NoDirection();
|
||||
};
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user