Bug 912099 - Part f: Make sure CPP_SOURCES only points to existing files in toolkit/crashreporter; r=mshal
authorMs2ger <ms2ger@gmail.com>
Thu, 03 Oct 2013 09:10:01 +0200
changeset 149664 5e91fd0e187da6309614c4bfe737b9cf377b8acc
parent 149663 f5ff5837edd559a3e74a69eebb46b5c6afbdad34
child 149665 c2625a33e8f0088e09a9f869d0552817ed136fdd
push idunknown
push userunknown
push dateunknown
reviewersmshal
bugs912099
milestone27.0a1
Bug 912099 - Part f: Make sure CPP_SOURCES only points to existing files in toolkit/crashreporter; r=mshal
python/mozbuild/mozbuild/frontend/emitter.py
toolkit/crashreporter/breakpad-windows-libxul/Makefile.in
toolkit/crashreporter/breakpad-windows-libxul/moz.build
toolkit/crashreporter/breakpad-windows-standalone/Makefile.in
toolkit/crashreporter/breakpad-windows-standalone/moz.build
toolkit/crashreporter/google-breakpad/src/client/linux/handler/moz.build
toolkit/crashreporter/test/moz.build
--- a/python/mozbuild/mozbuild/frontend/emitter.py
+++ b/python/mozbuild/mozbuild/frontend/emitter.py
@@ -121,19 +121,17 @@ class TreeMetadataEmitter(LoggingMixin):
             self.log(logging.WARN, 'mozbuild_warning', dict(
                 path=sandbox.main_path),
                 '{path}: NO_DIST_INSTALL has no effect on XPIDL_SOURCES.')
 
         for idl in sandbox['XPIDL_SOURCES']:
             yield XPIDLFile(sandbox, mozpath.join(sandbox['SRCDIR'], idl),
                 xpidl_module)
 
-        exclusions = ('toolkit/crashreporter')
-
-        if sandbox['CPP_SOURCES'] and not sandbox['RELATIVEDIR'].startswith(exclusions) and os.path.join('js', 'src') not in sandbox.main_path:
+        if sandbox['CPP_SOURCES'] and os.path.join('js', 'src') not in sandbox.main_path:
             for src in sandbox['CPP_SOURCES']:
                 if not os.path.exists(os.path.join(sandbox['SRCDIR'], src)):
                     raise SandboxValidationError('Reference to a file that '
                         'doesn\'t exist in CPP_SOURCES (%s) in %s'
                         % (src, sandbox['RELATIVEDIR']))
 
         # Proxy some variables as-is until we have richer classes to represent
         # them. We should aim to keep this set small because it violates the
--- a/toolkit/crashreporter/breakpad-windows-libxul/Makefile.in
+++ b/toolkit/crashreporter/breakpad-windows-libxul/Makefile.in
@@ -16,8 +16,15 @@ include $(topsrcdir)/toolkit/crashreport
 VPATH += \
   $(topsrcdir)/toolkit/crashreporter/google-breakpad/src/common/windows \
   $(topsrcdir)/toolkit/crashreporter/google-breakpad/src/client/windows/handler \
   $(topsrcdir)/toolkit/crashreporter/google-breakpad/src/client/windows/sender \
   $(topsrcdir)/toolkit/crashreporter/google-breakpad/src/client/windows/crash_generation \
   $(NULL)
 
 DEFINES += -DUNICODE -DUNICODE_ -DBREAKPAD_NO_TERMINATE_THREAD -DNOMINMAX
+
+CPPSRCS += \
+  $(objs_common) \
+  $(objs_crash_generation) \
+  $(objs_handler) \
+  $(objs_sender) \
+  $(NULL)
--- a/toolkit/crashreporter/breakpad-windows-libxul/moz.build
+++ b/toolkit/crashreporter/breakpad-windows-libxul/moz.build
@@ -1,16 +1,12 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # 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/.
 
 CPP_SOURCES += [
-    '$(objs_common)',
-    '$(objs_crash_generation)',
-    '$(objs_handler)',
-    '$(objs_sender)',
-    'http_upload.cc',
+    '../google-breakpad/src/common/windows/http_upload.cc',
 ]
 
 LIBRARY_NAME = 'google_breakpad_libxul_s'
 
--- a/toolkit/crashreporter/breakpad-windows-standalone/Makefile.in
+++ b/toolkit/crashreporter/breakpad-windows-standalone/Makefile.in
@@ -16,8 +16,14 @@ include $(topsrcdir)/toolkit/crashreport
 
 VPATH += \
   $(topsrcdir)/toolkit/crashreporter/google-breakpad/src/common/windows \
   $(topsrcdir)/toolkit/crashreporter/google-breakpad/src/client/windows/handler \
   $(topsrcdir)/toolkit/crashreporter/google-breakpad/src/client/windows/crash_generation \
   $(NULL)
 
 DEFINES += -DUNICODE -DUNICODE_ -DBREAKPAD_NO_TERMINATE_THREAD -DNOMINMAX
+
+CPPSRCS += \
+  $(objs_common) \
+  $(objs_crash_generation) \
+  $(objs_handler) \
+  $(NULL)
--- a/toolkit/crashreporter/breakpad-windows-standalone/moz.build
+++ b/toolkit/crashreporter/breakpad-windows-standalone/moz.build
@@ -1,14 +1,8 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # 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/.
 
-CPP_SOURCES += [
-    '$(objs_common)',
-    '$(objs_crash_generation)',
-    '$(objs_handler)',
-]
-
 LIBRARY_NAME = 'google_breakpad_standalone_s'
 
--- a/toolkit/crashreporter/google-breakpad/src/client/linux/handler/moz.build
+++ b/toolkit/crashreporter/google-breakpad/src/client/linux/handler/moz.build
@@ -3,14 +3,14 @@
 # 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/.
 
 MODULE = 'handler'
 
 CPP_SOURCES += [
     'exception_handler.cc',
-    'log.cc',
+    '../log/log.cc',
     'minidump_descriptor.cc',
 ]
 
 LIBRARY_NAME = 'exception_handler_s'
 
--- a/toolkit/crashreporter/test/moz.build
+++ b/toolkit/crashreporter/test/moz.build
@@ -5,21 +5,21 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'crashreporter_test'
 NO_DIST_INSTALL = True
 
 XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini', 'unit_ipc/xpcshell.ini']
 
 CPP_SOURCES += [
-    'basic_code_modules.cc',
+    '../google-breakpad/src/processor/basic_code_modules.cc',
     'dumputils.cpp',
-    'logging.cc',
-    'minidump.cc',
+    '../google-breakpad/src/common/logging.cc',
+    '../google-breakpad/src/processor/minidump.cc',
     'nsTestCrasher.cpp',
-    'pathname_stripper.cc',
+    '../google-breakpad/src/common/pathname_stripper.cc',
 ]
 
 LIBRARY_NAME = 'testcrasher'
 
 EXTRA_JS_MODULES += [
     'CrashTestUtils.jsm',
 ]