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

Unified Diff: sandbox/win/src/target_services.cc

Issue 891973005: Do not close handles in target process on Windows 10. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « content/common/sandbox_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/win/src/target_services.cc
diff --git a/sandbox/win/src/target_services.cc b/sandbox/win/src/target_services.cc
index 03813c8feb7bf691bd6ffb051c681b7e5d9099ad..518507e95dc8a4ea13f515364d29db73a0239275 100644
--- a/sandbox/win/src/target_services.cc
+++ b/sandbox/win/src/target_services.cc
@@ -7,6 +7,7 @@
#include <process.h>
#include "base/basictypes.h"
+#include "base/win/windows_version.h"
#include "sandbox/win/src/crosscall_client.h"
#include "sandbox/win/src/handle_closer_agent.h"
#include "sandbox/win/src/handle_interception.h"
@@ -45,6 +46,13 @@ bool FlushCachedRegHandles() {
// Checks if we have handle entries pending and runs the closer.
bool CloseOpenHandles() {
+ // Windows 10 has FLG_ENABLE_HANDLE_EXCEPTIONS enabled by default so causes
+ // exceptions to be raised if target process attempts to close a handle that
+ // has already been closed by HandleCloser. Therefore, do not close any
+ // handles on Windows 10 until this flag is removed by MS.
+ // See crbug.com/452613.
+ if (base::win::GetVersion() == base::win::VERSION_WIN10)
+ return true;
if (sandbox::HandleCloserAgent::NeedsHandlesClosed()) {
sandbox::HandleCloserAgent handle_closer;
« no previous file with comments | « content/common/sandbox_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698