summaryrefslogtreecommitdiff
path: root/external/pdfium/windows7.patch.1
blob: 5b793136f023e2076d24b4acf3f9382aae40fc9a (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
diff --git a/third_party/base/win/win_util.cc b/third_party/base/win/win_util.cc
index 9c90b9d62..356eca74d 100644
--- a/third_party/base/win/win_util.cc
+++ b/third_party/base/win/win_util.cc
@@ -12,28 +12,7 @@ namespace base {
 namespace win {
 
 bool IsUser32AndGdi32Available() {
-  static auto is_user32_and_gdi32_available = []() {
-    // If win32k syscalls aren't disabled, then user32 and gdi32 are available.
-
-    typedef decltype(
-        GetProcessMitigationPolicy)* GetProcessMitigationPolicyType;
-    GetProcessMitigationPolicyType get_process_mitigation_policy_func =
-        reinterpret_cast<GetProcessMitigationPolicyType>(GetProcAddress(
-            GetModuleHandle(L"kernel32.dll"), "GetProcessMitigationPolicy"));
-
-    if (!get_process_mitigation_policy_func)
-      return true;
-
-    PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY policy = {};
-    if (get_process_mitigation_policy_func(GetCurrentProcess(),
-                                           ProcessSystemCallDisablePolicy,
-                                           &policy, sizeof(policy))) {
-      return policy.DisallowWin32kSystemCalls == 0;
-    }
-
-    return true;
-  }();
-  return is_user32_and_gdi32_available;
+  return true;
 }
 
 }  // namespace win