Bug 1289381 - Don't fail to build sandboxing with --disable-crashreporter r=gcp
authorFabrice Desré <fabrice@mozilla.com>
Tue, 26 Jul 2016 04:35:43 -0700
changeset 306712 4ee7de4773864485b468f6178b4634c7f06ce077
parent 306711 6d182ecbd61eed21483fbbacc2241098ce70793e
child 306713 a477bb461f3c77ef4ee090cbf1701b5e7434e1c4
push id30494
push userkwierso@gmail.com
push dateTue, 26 Jul 2016 23:38:52 +0000
treeherdermozilla-central@c571462b1ff5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgcp
bugs1289381
milestone50.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 1289381 - Don't fail to build sandboxing with --disable-crashreporter r=gcp
security/sandbox/linux/common/SandboxInfo.cpp
security/sandbox/linux/common/SandboxInfo.h
--- a/security/sandbox/linux/common/SandboxInfo.cpp
+++ b/security/sandbox/linux/common/SandboxInfo.cpp
@@ -277,19 +277,21 @@ SandboxInfo::SubmitTelemetry()
   Telemetry::Accumulate(Telemetry::SANDBOX_HAS_USER_NAMESPACES,
                         sandboxInfo.Test(SandboxInfo::kHasUserNamespaces));
   Telemetry::Accumulate(Telemetry::SANDBOX_CONTENT_ENABLED,
                         sandboxInfo.Test(SandboxInfo::kEnabledForContent));
   Telemetry::Accumulate(Telemetry::SANDBOX_MEDIA_ENABLED,
                         sandboxInfo.Test(SandboxInfo::kEnabledForMedia));
 }
 
+#ifdef MOZ_CRASHREPORTER
 void
 SandboxInfo::AnnotateCrashReport() const
 {
   nsAutoCString flagsString;
   flagsString.AppendInt(mFlags);
 
   CrashReporter::AnnotateCrashReport(
     NS_LITERAL_CSTRING("ContentSandboxCapabilities"), flagsString);
 }
+#endif
 
 } // namespace mozilla
--- a/security/sandbox/linux/common/SandboxInfo.h
+++ b/security/sandbox/linux/common/SandboxInfo.h
@@ -52,17 +52,19 @@ public:
   }
 
   // Returns true if SetMediaPluginSandbox may be called.
   bool CanSandboxMedia() const
   {
     return !Test(kEnabledForMedia) || Test(kHasSeccompBPF);
   }
 
+#ifdef MOZ_CRASHREPORTER
   MOZ_EXPORT void AnnotateCrashReport() const;
+#endif
 
   static void SubmitTelemetry();
 
   // For bug 1222500 or anything else like it: On desktop, this is
   // called in the parent process at a point when it should still be
   // single-threaded, to check that the SandboxEarlyInit() call in a
   // child process is early enough to be single-threaded.  If not,
   // kUnexpectedThreads is set and affected flags (user namespaces;