Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Unified Diff: content/common/sandbox_win.cc

Issue 872673002: Do not use win32k renderer lockdown if DirectWrite is disabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move IsWin32kRendererLockdownEnabled to content/common Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/common/sandbox_win.cc
diff --git a/content/common/sandbox_win.cc b/content/common/sandbox_win.cc
index a3882d0d1dd709d581f695f2c990e6ee18ab0bbb..c6f6140a34225052f7b5ee6f045d57bfa232c9c7 100644
--- a/content/common/sandbox_win.cc
+++ b/content/common/sandbox_win.cc
@@ -20,6 +20,7 @@
#include "base/win/scoped_handle.h"
#include "base/win/scoped_process_information.h"
#include "base/win/windows_version.h"
+#include "content/common/content_switches_internal.h"
#include "content/public/common/content_client.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/sandbox_init.h"
@@ -620,9 +621,9 @@ base::Process StartSandboxedProcess(
sandbox::MITIGATION_DEP_NO_ATL_THUNK |
sandbox::MITIGATION_SEHOP;
- if (base::win::GetVersion() >= base::win::VERSION_WIN8 &&
- type_str == switches::kRendererProcess &&
- switches::IsWin32kRendererLockdownEnabled()) {
+#if !defined(NACL_WIN64)
+ if (type_str == switches::kRendererProcess &&
+ IsWin32kRendererLockdownEnabled()) {
if (policy->AddRule(sandbox::TargetPolicy::SUBSYS_WIN32K_LOCKDOWN,
sandbox::TargetPolicy::FAKE_USER_GDI_INIT,
NULL) != sandbox::SBOX_ALL_OK) {
@@ -630,6 +631,7 @@ base::Process StartSandboxedProcess(
}
mitigations |= sandbox::MITIGATION_WIN32K_DISABLE;
}
+#endif
if (policy->SetProcessMitigations(mitigations) != sandbox::SBOX_ALL_OK)
return base::Process();

Powered by Google App Engine
This is Rietveld 408576698