Author: akhaldi
Date: Sat Oct 29 17:57:53 2016
New Revision: 73063
URL:
http://svn.reactos.org/svn/reactos?rev=73063&view=rev
Log:
[WIN32SS/USER32] Mask exceptions from WndProc, essentially reverting r72495. CORE-11915
Removed:
branches/ros-branch-0_4_3/reactos/win32ss/user/user32/windows/wndproc_fixup.S
Modified:
branches/ros-branch-0_4_3/reactos/win32ss/user/user32/CMakeLists.txt
branches/ros-branch-0_4_3/reactos/win32ss/user/user32/windows/message.c
Modified: branches/ros-branch-0_4_3/reactos/win32ss/user/user32/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_3/reactos/win32s…
==============================================================================
--- branches/ros-branch-0_4_3/reactos/win32ss/user/user32/CMakeLists.txt [iso-8859-1]
(original)
+++ branches/ros-branch-0_4_3/reactos/win32ss/user/user32/CMakeLists.txt [iso-8859-1] Sat
Oct 29 17:57:53 2016
@@ -64,16 +64,8 @@
${CMAKE_CURRENT_BINARY_DIR}/user32_stubs.c
include/user32.h)
-if(ARCH STREQUAL "i386")
- list(APPEND ASM_SOURCE
- windows/wndproc_fixup.S)
-endif()
-
-add_asm_files(user32_asm ${ASM_SOURCE})
-
add_library(user32 SHARED
${SOURCE}
- ${user32_asm}
user32.rc
${CMAKE_CURRENT_BINARY_DIR}/user32.def)
Modified: branches/ros-branch-0_4_3/reactos/win32ss/user/user32/windows/message.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_3/reactos/win32s…
==============================================================================
--- branches/ros-branch-0_4_3/reactos/win32ss/user/user32/windows/message.c [iso-8859-1]
(original)
+++ branches/ros-branch-0_4_3/reactos/win32ss/user/user32/windows/message.c [iso-8859-1]
Sat Oct 29 17:57:53 2016
@@ -13,21 +13,6 @@
#include <wine/debug.h>
WINE_DEFAULT_DEBUG_CHANNEL(user32);
-
-#ifdef __i386__
-/* For bad applications which provide bad (non stdcall) WndProc */
-extern
-LRESULT
-__cdecl
-CALL_EXTERN_WNDPROC(
- WNDPROC WndProc,
- HWND hWnd,
- UINT Msg,
- WPARAM wParam,
- LPARAM lParam);
-#else
-# define CALL_EXTERN_WNDPROC(proc, h, m, w, l) proc(h, m, w, l)
-#endif
/* From wine: */
/* flag for messages that contain pointers */
@@ -1463,7 +1448,15 @@
if (PreResult) goto Exit;
- Result = CALL_EXTERN_WNDPROC(WndProc, AnsiMsg.hwnd, AnsiMsg.message,
AnsiMsg.wParam, AnsiMsg.lParam);
+ _SEH2_TRY // wine does this.
+ {
+ Result = WndProc(AnsiMsg.hwnd, AnsiMsg.message, AnsiMsg.wParam,
AnsiMsg.lParam);
+ }
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ ERR("Exception when calling Ansi WndProc %p Msg %d pti %p Wndpti
%p\n",WndProc,Msg,GetW32ThreadInfo(),pWnd->head.pti);
+ }
+ _SEH2_END;
if (Hook && MsgOverride)
{
@@ -1504,7 +1497,15 @@
if (PreResult) goto Exit;
- Result = CALL_EXTERN_WNDPROC(WndProc, hWnd, Msg, wParam, lParam);
+ _SEH2_TRY
+ {
+ Result = WndProc(hWnd, Msg, wParam, lParam);
+ }
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ ERR("Exception when calling unicode WndProc %p Msg %d pti %p Wndpti
%p\n",WndProc, Msg,GetW32ThreadInfo(),pWnd->head.pti);
+ }
+ _SEH2_END;
if (Hook && MsgOverride)
{
@@ -1584,7 +1585,15 @@
if (PreResult) goto Exit;
- Result = CALL_EXTERN_WNDPROC(WndProc, hWnd, Msg, wParam, lParam);
+ _SEH2_TRY
+ {
+ Result = WndProc(hWnd, Msg, wParam, lParam);
+ }
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ ERR("Exception when calling Ansi WndProc %p Msg %d pti %p Wndpti
%p\n",WndProc,Msg,GetW32ThreadInfo(),pWnd->head.pti);
+ }
+ _SEH2_END;
if (Hook && MsgOverride)
{
@@ -1632,7 +1641,16 @@
if (PreResult) goto Exit;
- Result = CALL_EXTERN_WNDPROC(WndProc, UnicodeMsg.hwnd, UnicodeMsg.message,
UnicodeMsg.wParam, UnicodeMsg.lParam);
+ _SEH2_TRY
+ {
+ Result = WndProc(UnicodeMsg.hwnd, UnicodeMsg.message,
+ UnicodeMsg.wParam, UnicodeMsg.lParam);
+ }
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ ERR("Exception when calling unicode WndProc %p Msg %d pti %p Wndpti
%p\n",WndProc, Msg,GetW32ThreadInfo(),pWnd->head.pti);
+ }
+ _SEH2_END;
if (Hook && MsgOverride)
{
Removed: branches/ros-branch-0_4_3/reactos/win32ss/user/user32/windows/wndproc_fixup.S
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_3/reactos/win32s…
==============================================================================
---
branches/ros-branch-0_4_3/reactos/win32ss/user/user32/windows/wndproc_fixup.S [iso-8859-1]
(original)
+++
branches/ros-branch-0_4_3/reactos/win32ss/user/user32/windows/wndproc_fixup.S (removed)
@@ -1,58 +0,0 @@
-/*
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS user32.dll
- * FILE: win32ss/user/user32/windows/wndproc_fixup.S
- * PURPOSE: Messages
- * PROGRAMMER: Jérôme Gardou jerome.gardou(a)reactos.org
- * LICENCE : LGPL, copyright Alexandre Julliard
- */
-
-#include <asm.inc>
-#include <ks386.inc>
-
-/* Some applications provide invalid callbacks which don't follow the stdcall
convention */
-
-.code
-
-/*
- * LRESULT
- * __cdecl
- * CALL_EXTERN_WNDPROC(
- * WNDPROC WndProc,
- * HWND hWnd,
- * UINT Msg,
- * WPARAM wParam,
- * LPARAM lParam);
- */
-PUBLIC _CALL_EXTERN_WNDPROC
-FUNC _CALL_EXTERN_WNDPROC
- FPO 0, 0, 0, 0, 0, FRAME_FPO
-
- push ebp
- mov ebp, esp
-
- push edi
- push esi
- push ebp
-
- sub esp, 12
-
- push dword ptr [ebp + 24]
- push dword ptr [ebp + 20]
- push dword ptr [ebp + 16]
- push dword ptr [ebp + 12]
- mov eax, dword ptr [ebp + 8]
-
- call eax
-
- lea esp, dword ptr [ebp - 12]
- pop ebx
- pop esi
- pop edi
-
- leave
- ret
-
-ENDFUNC
-
-END