summaryrefslogtreecommitdiffstats
path: root/mozglue/misc/MozProcessMitigationDynamicCodePolicy.h
blob: c0fd117067379de02f30c74c8c12525f8dcf9049 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* 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/. */

// This file is temporarily needed for bug 1766432. We plan to remove it
// afterwards. Do not add new definitions here.

#ifndef mozglue_misc_MozProcessMitigationDynamicCodePolicy_h__
#define mozglue_misc_MozProcessMitigationDynamicCodePolicy_h__

#include <winnt.h>

// See bug 1766432 comment 4. We currently need to use our own definition
// for PROCESS_MITIGATION_DYNAMIC_CODE_POLICY in MinGW builds.
#if defined(__MINGW32__) || defined(__MINGW64__)

typedef struct _MOZ_PROCESS_MITIGATION_DYNAMIC_CODE_POLICY {
  __C89_NAMELESS union {
    DWORD Flags;
    __C89_NAMELESS struct {
      DWORD ProhibitDynamicCode : 1;
      DWORD AllowThreadOptOut : 1;
      DWORD AllowRemoteDowngrade : 1;
      DWORD ReservedFlags : 29;
    };
  };
} MOZ_PROCESS_MITIGATION_DYNAMIC_CODE_POLICY;

#else

using MOZ_PROCESS_MITIGATION_DYNAMIC_CODE_POLICY =
    PROCESS_MITIGATION_DYNAMIC_CODE_POLICY;

#endif  // defined(__MINGW32__) || defined(__MINGW64__)

#endif  // mozglue_misc_MozProcessMitigationDynamicCodePolicy_h__