Bug 589371 - Prevent FatalError from being inlined for better error reporting. r=josh a2.0=blocking2.0:betaN

This commit is contained in:
Benoit Girard 2010-09-11 10:03:29 -07:00
parent 344df4887f
commit 4fd9b06f6c

View File

@ -2876,8 +2876,11 @@ class _GenerateProtocolActorCode(ipdl.ast.Visitor):
fatalerror = MethodDefn(MethodDecl( fatalerror = MethodDefn(MethodDecl(
'FatalError', 'FatalError',
params=[ Decl(Type('char', const=1, ptrconst=1), msgvar.name) ], params=[ Decl(Type('char', const=1, ptrconst=1), msgvar.name) ],
const=1)) const=1, virtual=1))
fatalerror.addstmts([ fatalerror.addstmts([
Whitespace('// Virtual method to prevent inlining.\n', indent=1),
Whitespace('// This give us better error reporting.\n', indent=1),
Whitespace('// See bug 589371\n\n', indent=1),
_printErrorMessage('IPDL error:'), _printErrorMessage('IPDL error:'),
_printErrorMessage(msgvar), _printErrorMessage(msgvar),
Whitespace.NL Whitespace.NL