Bug 914826 - part 5 - provide for cpp-only include files, starting with nsIFile.h and GeckoProfiler.h; r=ehsan
☠☠ backed out by e16e1dae3315 ☠ ☠
authorNathan Froyd <froydnj@mozilla.com>
Tue, 10 Sep 2013 15:45:16 -0400
changeset 160067 d16460fc05182bc4e4ac0f65211c3e5b9feb1b9f
parent 160066 b28cb0ae1853e4ebca6edacb6c1d8e65da117c38
child 160068 a4a029c13179412562f4b770a200d069662bc394
push id2961
push userlsblakk@mozilla.com
push dateMon, 28 Oct 2013 21:59:28 +0000
treeherdermozilla-beta@73ef4f13486f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan
bugs914826
milestone26.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 914826 - part 5 - provide for cpp-only include files, starting with nsIFile.h and GeckoProfiler.h; r=ehsan
ipc/ipdl/ipdl/builtin.py
ipc/ipdl/ipdl/lower.py
--- a/ipc/ipdl/ipdl/builtin.py
+++ b/ipc/ipdl/ipdl/builtin.py
@@ -46,12 +46,15 @@ HeaderIncludes = (
     'base/basictypes.h',
     'prtime.h',
     'nscore.h',
     'IPCMessageStart.h',
     'ipc/IPCMessageUtils.h',
     'nsAutoPtr.h',
     'nsStringGlue.h',
     'nsTArray.h',
+    'mozilla/ipc/ProtocolUtils.h',
+)
+
+CppIncludes = (
     'nsIFile.h',
-    'mozilla/ipc/ProtocolUtils.h',
-    'GeckoProfiler.h'
+    'GeckoProfiler.h',
 )
--- a/ipc/ipdl/ipdl/lower.py
+++ b/ipc/ipdl/ipdl/lower.py
@@ -1,16 +1,17 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 import os, re, sys
 from copy import deepcopy
 
 import ipdl.ast
+import ipdl.builtin
 from ipdl.cxx.ast import *
 from ipdl.type import Actor, ActorType, ProcessGraph, TypeVisitor
 
 # FIXME/cjones: the chromium Message logging code doesn't work on
 # gcc/POSIX, because it wprintf()s across the chromium/mozilla
 # boundary. one side builds with -fshort-wchar, the other doesn't.
 # this code will remain off until the chromium base lib is replaced
 EMIT_LOGGING_CODE = ('win32' == sys.platform)
@@ -2548,23 +2549,28 @@ class _GenerateProtocolActorCode(ipdl.as
              
         if self.protocol.decl.type.isToplevel():
             cf.addthings([
                 CppDirective('ifdef', 'MOZ_CRASHREPORTER'),
                 CppDirective('  include', '"nsXULAppAPI.h"'),
                 CppDirective('endif')
             ])
 
+        cppheaders = [CppDirective('include', '"%s"' % filename)
+                      for filename in ipdl.builtin.CppIncludes]
+
         cf.addthings((
             [ Whitespace.NL ]
             + self.protocolCxxIncludes
             + [ Whitespace.NL ]
             + self.standardTypedefs()
             + tu.protocol.decl.cxxtypedefs
             + self.includedActorUsings
+            + [ Whitespace.NL ]
+            + cppheaders
             + [ Whitespace.NL ]))
 
         cppns = makeNamespace(self.protocol, cf)
         cppns.addstmts([
             Whitespace.NL,
             Whitespace.NL,
             clsdefn,
             Whitespace.NL,