зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1317844 - Add IPC message constructor flag (r=dvander)
MozReview-Commit-ID: 3eEAN5LqJ6N
This commit is contained in:
Родитель
a8bd0983dc
Коммит
75ee8c1609
|
@ -98,6 +98,14 @@ class Message : public Pickle {
|
|||
}
|
||||
}
|
||||
|
||||
bool is_constructor() const {
|
||||
return (header()->flags & CONSTRUCTOR_BIT) != 0;
|
||||
}
|
||||
|
||||
void set_constructor() {
|
||||
header()->flags |= CONSTRUCTOR_BIT;
|
||||
}
|
||||
|
||||
// True if this is a synchronous message.
|
||||
bool is_sync() const {
|
||||
return (header()->flags & SYNC_BIT) != 0;
|
||||
|
@ -278,6 +286,7 @@ class Message : public Pickle {
|
|||
INTERRUPT_BIT = 0x0040,
|
||||
COMPRESS_BIT = 0x0080,
|
||||
COMPRESSALL_BIT = 0x0100,
|
||||
CONSTRUCTOR_BIT = 0x0200,
|
||||
};
|
||||
|
||||
struct Header : Pickle::Header {
|
||||
|
|
|
@ -4445,6 +4445,10 @@ class _GenerateProtocolActorCode(ipdl.ast.Visitor):
|
|||
stmts.append(StmtExpr(ExprCall(
|
||||
ExprSelect(var, '->', 'set_interrupt'))))
|
||||
|
||||
if md.decl.type.isCtor():
|
||||
stmts.append(StmtExpr(ExprCall(
|
||||
ExprSelect(var, '->', 'set_constructor'))))
|
||||
|
||||
if reply:
|
||||
stmts.append(StmtExpr(ExprCall(
|
||||
ExprSelect(var, '->', 'set_reply'))))
|
||||
|
|
Загрузка…
Ссылка в новой задаче