diff options
author | alexeypa@google.com <alexeypa@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-03 17:30:00 +0000 |
---|---|---|
committer | alexeypa@google.com <alexeypa@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-03 17:30:00 +0000 |
commit | 74b5140e325da133b9bd44a186dd8b793dcc6afb (patch) | |
tree | fdbd19977b3a05e0f6495eb287fbb46bda2a9849 /sandbox | |
parent | d6ed291a876863be3ff8255c9be2b43547ebaf5c (diff) | |
download | chromium_src-74b5140e325da133b9bd44a186dd8b793dcc6afb.zip chromium_src-74b5140e325da133b9bd44a186dd8b793dcc6afb.tar.gz chromium_src-74b5140e325da133b9bd44a186dd8b793dcc6afb.tar.bz2 |
Revert 159850 - Enable handle tracing in Canary, Dev, and all debug builds of Chrome (Windows only).
BUG=131699,153148
Enabling handle tracing for the whole lifetime of a process uncovers to many bugs, causing lots of crashes. A supression or selective enablement mechanism is required to make it work.
Review URL: https://chromiumcodereview.appspot.com/11035012
TBR=alexeypa@chromium.org
Review URL: https://codereview.chromium.org/11043021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159914 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sandbox')
-rw-r--r-- | sandbox/win/src/handle_closer_agent.cc | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/sandbox/win/src/handle_closer_agent.cc b/sandbox/win/src/handle_closer_agent.cc index b7e872c..be262e8 100644 --- a/sandbox/win/src/handle_closer_agent.cc +++ b/sandbox/win/src/handle_closer_agent.cc @@ -10,12 +10,6 @@ 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. @@ -26,13 +20,14 @@ NTSTATUS QueryObjectTypeInformation(HANDLE handle, if (!QueryObject) ResolveNTFunctionPtr("NtQueryObject", &QueryObject); - NTSTATUS exception_code = STATUS_UNSUCCESSFUL; + NTSTATUS status = STATUS_UNSUCCESSFUL; __try { - return QueryObject(handle, ObjectTypeInformation, buffer, *size, size); - } __except(QueryObjectTypeInformationFilter(GetExceptionInformation(), - &exception_code)) { - return exception_code; + status = QueryObject(handle, ObjectTypeInformation, buffer, *size, size); + } __except(GetExceptionCode() == STATUS_INVALID_HANDLE ? + EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH) { + status = STATUS_INVALID_HANDLE; } + return status; } } // namespace |