From 3bad4315f7d406f195a2a91212456078e456ca1b Mon Sep 17 00:00:00 2001 From: "mkaply%us.ibm.com" Date: Thu, 30 Nov 2000 15:52:24 +0000 Subject: [PATCH] #61587 r=mkaply, a=blizzard Code from jkobal to fix strange random timer trap git-svn-id: svn://10.0.0.236/trunk@83132 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/widget/timer/src/os2/os2TimerGlue.cpp | 8 +------- mozilla/widget/timer/src/os2/os2TimerGlue.h | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/mozilla/widget/timer/src/os2/os2TimerGlue.cpp b/mozilla/widget/timer/src/os2/os2TimerGlue.cpp index b31e3944fd0..a81b0ac4652 100644 --- a/mozilla/widget/timer/src/os2/os2TimerGlue.cpp +++ b/mozilla/widget/timer/src/os2/os2TimerGlue.cpp @@ -153,13 +153,7 @@ UINT os2TimerGlue::SetTimer(HWND hWnd, UINT timerID, UINT aDelay) // of what ID's we've used and what is still open. Hopefully these id's // will be unique enough. IBM-AKR - ULONG ulTimerID = ((ULONG)timerID & TID_USERMAX); - - // Doing this fixer stuff since most values will be double word aligned. - // This will help make it a little more unique by potentially giving us - // 3 times as many values. IBM-AKR - ULONG fixer = ((ULONG)timerID & 0x00018000) >> 15; - ulTimerID = (ulTimerID | fixer); + ULONG ulTimerID = ((ULONG)timerID % (TID_USERMAX - 1)) + 1; ULONG newTimerID = WinStartTimer(NULLHANDLE, timerHWND, ulTimerID, aDelay); return (UINT)newTimerID; diff --git a/mozilla/widget/timer/src/os2/os2TimerGlue.h b/mozilla/widget/timer/src/os2/os2TimerGlue.h index 35c9043f306..56fcdba3d3d 100644 --- a/mozilla/widget/timer/src/os2/os2TimerGlue.h +++ b/mozilla/widget/timer/src/os2/os2TimerGlue.h @@ -60,7 +60,7 @@ extern TID QueryCurrentTID(void); typedef ULONG DWORD; #define HEARTBEATTIMEOUT 50 -#define HEARTBEATTIMERID 0x7ffe +#define HEARTBEATTIMERID TID_USERMAX struct TIDKey : public nsVoidKey {