--- parser3/src/targets/isapi/parser3isapi.C 2019/12/25 22:01:03 1.111 +++ parser3/src/targets/isapi/parser3isapi.C 2020/08/13 10:53:15 1.113 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -volatile const char * IDENT_PARSER3ISAPI_C="$Id: parser3isapi.C,v 1.111 2019/12/25 22:01:03 moko Exp $"; +volatile const char * IDENT_PARSER3ISAPI_C="$Id: parser3isapi.C,v 1.113 2020/08/13 10:53:15 moko Exp $"; #ifndef _MSC_VER # error compile ISAPI module with MSVC [no urge for now to make it autoconf-ed (PAF)] @@ -312,12 +312,9 @@ BOOL WINAPI TerminateExtension( void real_parser_handler(SAPI_Info& SAPI_info, bool header_only) { // collect garbage from prev request #ifndef PA_DEBUG_DISABLE_GC - { - int saved=GC_dont_gc; - GC_dont_gc=0; - GC_gcollect(); - GC_dont_gc=saved; - } + GC_dont_gc=0; + GC_gcollect(); + GC_dont_gc=1; #endif SAPI_info.header=new String; @@ -389,10 +386,7 @@ void real_parser_handler(SAPI_Info& SAPI } #ifdef PA_SUPPRESS_SYSTEM_EXCEPTION -static const Exception -call_real_parser_handler__do_PEH_return_it( - SAPI_Info& SAPI_info, bool header_only) -{ +static const Exception call_real_parser_handler__do_PEH_return_it(SAPI_Info& SAPI_info, bool header_only) { try { real_parser_handler(SAPI_info, header_only); } catch(const Exception& e) { @@ -401,33 +395,21 @@ call_real_parser_handler__do_PEH_return_ return Exception(); } -static void call_real_parser_handler__supress_system_exception( - SAPI_Info& SAPI_info, bool header_only) -{ + +static void call_real_parser_handler__supress_system_exception(SAPI_Info& SAPI_info, bool header_only) { Exception parser_exception; LPEXCEPTION_POINTERS system_exception=0; __try { - parser_exception=call_real_parser_handler__do_PEH_return_it( - SAPI_info, header_only); - } __except ( - (system_exception=GetExceptionInformation()), - EXCEPTION_EXECUTE_HANDLER) - { - + parser_exception=call_real_parser_handler__do_PEH_return_it(SAPI_info, header_only); + } __except ( (system_exception=GetExceptionInformation()), EXCEPTION_EXECUTE_HANDLER) { if(system_exception) if(_EXCEPTION_RECORD *er=system_exception->ExceptionRecord) - throw Exception("system", - 0, - "0x%08X at 0x%08X", er->ExceptionCode, er->ExceptionAddress); + throw Exception("system", 0, "0x%08X at 0x%08X", er->ExceptionCode, er->ExceptionAddress); else - throw Exception("system", - 0, - ""); + throw Exception("system", 0, ""); else - throw Exception("system", - 0, - ""); + throw Exception("system", 0, ""); } if(parser_exception)