mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 819280 - Change NS_ASSERTION to MOZ_STATIC_ASSERT r=trev.saunders
This commit is contained in:
parent
99e7001c2d
commit
ceac5eeed6
@ -1562,12 +1562,10 @@ AccessibleWrap::FirePlatformEvent(AccEvent* aEvent)
|
||||
{
|
||||
uint32_t eventType = aEvent->GetEventType();
|
||||
|
||||
NS_ENSURE_TRUE(eventType > 0 &&
|
||||
eventType < nsIAccessibleEvent::EVENT_LAST_ENTRY,
|
||||
NS_ERROR_FAILURE);
|
||||
MOZ_STATIC_ASSERT(sizeof(gWinEventMap)/sizeof(gWinEventMap[0]) == nsIAccessibleEvent::EVENT_LAST_ENTRY,
|
||||
"MSAA event map skewed");
|
||||
|
||||
NS_ASSERTION(gWinEventMap[nsIAccessibleEvent::EVENT_LAST_ENTRY] == kEVENT_LAST_ENTRY,
|
||||
"MSAA event map skewed");
|
||||
NS_ENSURE_TRUE(eventType > 0 && eventType < ArrayLength(gWinEventMap), NS_ERROR_FAILURE);
|
||||
|
||||
uint32_t winEvent = gWinEventMap[eventType];
|
||||
if (!winEvent)
|
||||
|
@ -9,7 +9,6 @@
|
||||
#include "AccessibleEventId.h"
|
||||
|
||||
const uint32_t kEVENT_WIN_UNKNOWN = 0x00000000;
|
||||
const uint32_t kEVENT_LAST_ENTRY = 0xffffffff;
|
||||
|
||||
static const uint32_t gWinEventMap[] = {
|
||||
kEVENT_WIN_UNKNOWN, // nsIAccessibleEvent doesn't have 0 constant
|
||||
@ -98,7 +97,6 @@ static const uint32_t gWinEventMap[] = {
|
||||
IA2_EVENT_HYPERTEXT_CHANGED, // nsIAccessibleEvent::EVENT_HYPERTEXT_CHANGED
|
||||
IA2_EVENT_HYPERTEXT_NLINKS_CHANGED, // nsIAccessibleEvent::EVENT_HYPERTEXT_NLINKS_CHANGED
|
||||
IA2_EVENT_OBJECT_ATTRIBUTE_CHANGED, // nsIAccessibleEvent::EVENT_OBJECT_ATTRIBUTE_CHANGED
|
||||
kEVENT_WIN_UNKNOWN, // nsIAccessibleEvent::EVENT_VIRTUALCURSOR_CHANGED
|
||||
kEVENT_LAST_ENTRY // nsIAccessibleEvent::EVENT_LAST_ENTRY
|
||||
kEVENT_WIN_UNKNOWN // nsIAccessibleEvent::EVENT_VIRTUALCURSOR_CHANGED
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user