diff options
author | alexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-03 05:59:28 +0000 |
---|---|---|
committer | alexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-03 05:59:28 +0000 |
commit | b441cd2dc59283ae2e356c6c2484cae9655a4193 (patch) | |
tree | 11de90bacc52dc38b649c7f669bb6f211f28aead /sandbox/win | |
parent | 3cbad9287b05ae577a5483d8b822b5ef136d75a3 (diff) | |
download | chromium_src-b441cd2dc59283ae2e356c6c2484cae9655a4193.zip chromium_src-b441cd2dc59283ae2e356c6c2484cae9655a4193.tar.gz chromium_src-b441cd2dc59283ae2e356c6c2484cae9655a4193.tar.bz2 |
Enable handle tracing in Canary, Dev, and all debug builds of Chrome (Windows only).
BUG=131699,153148
Review URL: https://chromiumcodereview.appspot.com/11035012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159850 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sandbox/win')
-rw-r--r-- | sandbox/win/src/handle_closer_agent.cc | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/sandbox/win/src/handle_closer_agent.cc b/sandbox/win/src/handle_closer_agent.cc index be262e8..b7e872c 100644 --- a/sandbox/win/src/handle_closer_agent.cc +++ b/sandbox/win/src/handle_closer_agent.cc @@ -10,6 +10,12 @@ namespace { +int QueryObjectTypeInformationFilter(EXCEPTION_POINTERS* exception_pointers, + NTSTATUS* exception_code) { + *exception_code = exception_pointers->ExceptionRecord->ExceptionCode; + return EXCEPTION_EXECUTE_HANDLER; +} + // Returns type infomation for an NT object. This routine is expected to be // called for invalid handles so it catches STATUS_INVALID_HANDLE exceptions // that can be generated when handle tracing is enabled. @@ -20,14 +26,13 @@ NTSTATUS QueryObjectTypeInformation(HANDLE handle, if (!QueryObject) ResolveNTFunctionPtr("NtQueryObject", &QueryObject); - NTSTATUS status = STATUS_UNSUCCESSFUL; + NTSTATUS exception_code = STATUS_UNSUCCESSFUL; __try { - status = QueryObject(handle, ObjectTypeInformation, buffer, *size, size); - } __except(GetExceptionCode() == STATUS_INVALID_HANDLE ? - EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH) { - status = STATUS_INVALID_HANDLE; + return QueryObject(handle, ObjectTypeInformation, buffer, *size, size); + } __except(QueryObjectTypeInformationFilter(GetExceptionInformation(), + &exception_code)) { + return exception_code; } - return status; } } // namespace |