Bug 1317844 - Add IPC message constructor flag (r=dvander)

MozReview-Commit-ID: 3eEAN5LqJ6N
This commit is contained in:
Bill McCloskey 2016-11-03 20:43:33 -07:00
Родитель a8bd0983dc
Коммит 75ee8c1609
2 изменённых файлов: 13 добавлений и 0 удалений

Просмотреть файл

@ -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'))))