diff options
-rw-r--r-- | base/message_loop.cc | 18 | ||||
-rw-r--r-- | base/message_loop.h | 6 |
2 files changed, 17 insertions, 7 deletions
diff --git a/base/message_loop.cc b/base/message_loop.cc index bf5256a..ddca7dbf 100644 --- a/base/message_loop.cc +++ b/base/message_loop.cc @@ -169,18 +169,24 @@ void MessageLoop::RunAllPending() { void MessageLoop::RunHandler() { #if defined(OS_WIN) if (exception_restoration_) { - LPTOP_LEVEL_EXCEPTION_FILTER current_filter = GetTopSEHFilter(); - __try { - RunInternal(); - } __except(SEHFilter(current_filter)) { - } + RunInternalInSEHFrame(); return; } #endif RunInternal(); } - +//------------------------------------------------------------------------------ +#if defined(OS_WIN) +__declspec(noinline) void MessageLoop::RunInternalInSEHFrame() { + LPTOP_LEVEL_EXCEPTION_FILTER current_filter = GetTopSEHFilter(); + __try { + RunInternal(); + } __except(SEHFilter(current_filter)) { + } + return; +} +#endif //------------------------------------------------------------------------------ void MessageLoop::RunInternal() { diff --git a/base/message_loop.h b/base/message_loop.h index d2fcc12..ff4531c 100644 --- a/base/message_loop.h +++ b/base/message_loop.h @@ -303,9 +303,13 @@ class MessageLoop : public base::MessagePump::Delegate { // A function to encapsulate all the exception handling capability in the // stacks around the running of a main message loop. It will run the message // loop in a SEH try block or not depending on the set_SEH_restoration() - // flag. + // flag invoking respectively RunInternalInSEHFrame() or RunInternal(). void RunHandler(); +#if defined(OS_WIN) + __declspec(noinline) void RunInternalInSEHFrame(); +#endif + // A surrounding stack frame around the running of the message loop that // supports all saving and restoring of state, as is needed for any/all (ugly) // recursive calls. |