Replace handles that the handle closer closes with dummy Events.

This is because on Windows, we close some handles opened by Windows DLLs to prevent them from leaking into sandboxed processes, and this can cause INVALID_HANDLE_EXCEPTION to be raised if "bad handle detection" gflag is enabled, as it currently is by default on Windows 10.

Only replace File and Event handles at the moment, as File handles are the ones causing the issues on Windows 10.

BUG=452613
TEST=sbox_integration_tests
TEST=Run Chrome on Windows 10 with crash reporting enabled, and check there are no crashes listed in chrome://crashes

Review URL: https://codereview.chromium.org/919893002

Cr-Commit-Position: refs/heads/master@{#317016}
3 files changed