зеркало из https://github.com/mozilla/gecko-dev.git
Bug 819791 - Part 9: Use explicit TArray copy constructors in IPDL generated code. r=cjones
This cset makes two nop changes to generated IPDL code. 1) Change an instance of InfallibleTArray<Foo> foo = InfallibleTArray<Foo>(); to InfallibleTArray<Foo> foo; 2) Change an instance of InfallibleTArray<Foo> foo = bar; to InfallibleTArray<Foo> foo(bar);
This commit is contained in:
Родитель
fcaacaf877
Коммит
c621ba81f7
|
@ -3292,7 +3292,7 @@ class _GenerateProtocolActorCode(ipdl.ast.Visitor):
|
|||
indent=1),
|
||||
StmtDecl(
|
||||
Decl(p.managedVarType(managed, self.side), kidsvar.name),
|
||||
init=p.managedVar(managed, self.side)),
|
||||
initargs=[ p.managedVar(managed, self.side) ]),
|
||||
foreachdestroy,
|
||||
])
|
||||
destroysubtree.addstmt(block)
|
||||
|
@ -4401,7 +4401,7 @@ class _GenerateProtocolActorCode(ipdl.ast.Visitor):
|
|||
tmpvar = ExprVar('tmp')
|
||||
ct = c.bareType()
|
||||
readcase.addstmts([
|
||||
StmtDecl(Decl(ct, tmpvar.name), init=c.defaultValue()),
|
||||
StmtDecl(Decl(ct, tmpvar.name)),
|
||||
StmtExpr(ExprAssn(ExprDeref(var), tmpvar)),
|
||||
StmtReturn(self.read(
|
||||
c.ipdltype,
|
||||
|
|
Загрузка…
Ссылка в новой задаче