Author: tkreuzer
Date: Mon Jun 16 13:27:18 2008
New Revision: 33995
URL:
http://svn.reactos.org/svn/reactos?rev=33995&view=rev
Log:
- print out when process takes too much gdi handles
- GDIOBJ_FreeObjByHandly: unlock handle table entry when object to delete was locked
- REGION_AllocRgnWithHandle: unlock region before trying to delete it on failure
Now gdi32_winetest clipping doesn't freeze ros anymore
Modified:
trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c
trunk/reactos/subsystems/win32/win32k/objects/region.c
Modified: trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c [iso-8859-1] Mon Jun 16
13:27:18 2008
@@ -323,7 +323,11 @@
/* HACK HACK HACK: simplest-possible quota implementation - don't allow a
process
to take too many GDI objects, itself. */
if (W32Process && W32Process->GDIObjects >= 0x2710)
+ {
+ DPRINT1("Too many objects for process!!!\n");
+ GDIDBG_DUMPHANDLETABLE();
return NULL;
+ }
ASSERT(ObjectType != GDI_OBJECT_TYPE_DONTCARE);
@@ -539,6 +543,7 @@
DPRINT1("Object->cExclusiveLock = %d\n",
Object->cExclusiveLock);
GDIDBG_TRACECALLER();
GDIDBG_TRACELOCKER(GDI_HANDLE_GET_INDEX(hObj));
+ (void)_InterlockedExchangePointer((PVOID*)&Entry->ProcessId,
PrevProcId);
/* do not assert here for it will call again from dxg.sys it being call
twice */
//ASSERT(FALSE);
}
Modified: trunk/reactos/subsystems/win32/win32k/objects/region.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/region.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/region.c [iso-8859-1] Mon Jun 16
13:27:18 2008
@@ -2053,6 +2053,7 @@
pReg->Buffer = ExAllocatePoolWithTag(PagedPool, nReg * sizeof(RECT),
TAG_REGION);
if (!pReg->Buffer)
{
+ REGION_UnlockRgn(pReg);
GDIOBJ_FreeObjByHandle(hReg, GDI_OBJECT_TYPE_REGION);
return NULL;
}