# HG changeset patch # User Bob Owen # Date 1509027042 -3600 # Thu Oct 26 15:10:42 2017 +0100 # Node ID c4557696d42ef22c6eccfd178b3d739a265e2894 # Parent ec58d9068a540487e67c0eac2c60c53dea31d3c3 Don't compile sandbox::ApplyMitigationsToCurrentThread. r=aklotz This brings in new dependencies via FilePath and we don't currently use it. As far as I can tell Chromium doesn't use it either. diff --git a/security/sandbox/chromium/sandbox/win/src/process_mitigations.cc b/security/sandbox/chromium/sandbox/win/src/process_mitigations.cc --- a/security/sandbox/chromium/sandbox/win/src/process_mitigations.cc +++ b/security/sandbox/chromium/sandbox/win/src/process_mitigations.cc @@ -230,16 +230,19 @@ bool ApplyProcessMitigationsToCurrentPro ERROR_ACCESS_DENIED != ::GetLastError()) { return false; } } return true; } +// This function isn't used yet and adds dependencies for FilePath and +// ScopedNativeLibrary. +#if !defined(MOZ_SANDBOX) bool ApplyMitigationsToCurrentThread(MitigationFlags flags) { if (!CanSetMitigationsPerThread(flags)) return false; base::win::Version version = base::win::GetVersion(); if (version < base::win::VERSION_WIN10_RS1) return true; @@ -263,16 +266,17 @@ bool ApplyMitigationsToCurrentThread(Mit if (!set_thread_info_function(::GetCurrentThread(), ThreadDynamicCodePolicy, &thread_policy, sizeof(thread_policy))) { return false; } } return true; } +#endif void ConvertProcessMitigationsToPolicy(MitigationFlags flags, DWORD64* policy_flags, size_t* size) { base::win::Version version = base::win::GetVersion(); *policy_flags = 0; #if defined(_WIN64)