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

Unified Diff: sandbox/win/tests/integration_tests/hooking_dll.cc

Issue 2944493002: [Windows Sandbox Tests] Process Mitigations. (Closed)
Patch Set: Created 3 years, 6 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: sandbox/win/tests/integration_tests/hooking_dll.cc
diff --git a/sandbox/win/tests/integration_tests/hooking_dll.cc b/sandbox/win/tests/integration_tests/hooking_dll.cc
index f275ae6e940208bc65b71ddeced35199cb7827a7..9fe664d8f775833c6a22778ae7eae4e3c4ab1690 100644
--- a/sandbox/win/tests/integration_tests/hooking_dll.cc
+++ b/sandbox/win/tests/integration_tests/hooking_dll.cc
@@ -5,7 +5,6 @@
#include <stdio.h>
#include <windows.h>
-#define _DLL_EXPORTING
#include "integration_tests_common.h"
// This data section creates a common area that is accessible
@@ -54,10 +53,10 @@ BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved) {
if (reason == DLL_PROCESS_ATTACH) {
// The testing process should have set up this named event already
// (if the test needs this event to be signaled).
- event = ::OpenEventW(EVENT_MODIFY_STATE, FALSE, g_hook_event);
+ event = ::OpenEventW(EVENT_MODIFY_STATE, FALSE, sandbox::g_hook_event);
}
- if (reason == DLL_PROCESS_DETACH)
+ if (reason == DLL_PROCESS_DETACH && event != nullptr)
::CloseHandle(event);
return TRUE;

Powered by Google App Engine
This is Rietveld 408576698