Move creation of SEH frame into a separate funcion.For any function that uses SEH, the compiler creates a single EXCEPTION_REGISTRATION record at the function prolog (even if the function has nested or inside condition statement __try/__except constructs). When __try block is entered and leaved only the index to the relevant scope table is updated.When the exception occurs the  __except_handler4 may ignore it if there is no scope table set i.e. we are outside __try block.In ChromeFrame when exception happens, the global vectored exception filter walks through the SEH chain and is misled that there is handler/filter installed and therefore skips creation of a crashdump.
BUG=23845
TEST=crashes in ChromeFrame background threads are reported.
Review URL: http://codereview.chromium.org/335011

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30066 0039d316-1c4b-4281-b951-d872f2087c98


CrOS-Libchrome-Original-Commit: aff8a13ec56589a853f73686db770f2adad4ae2f
diff --git a/base/message_loop.cc b/base/message_loop.cc
index bf5256a..ddca7db 100644
--- a/base/message_loop.cc
+++ b/base/message_loop.cc
@@ -169,18 +169,24 @@
 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() {