Bug 479655 part 1. Add some assertions to catch it if we add too many flags. r=jst

This commit is contained in:
Boris Zbarsky 2010-06-18 12:23:04 -04:00
parent ec64564b48
commit a7fe40c015
3 changed files with 10 additions and 1 deletions

View File

@ -70,6 +70,9 @@
// This bit is set to indicate that the text may be part of a selection.
#define NS_TEXT_IN_SELECTION (1 << (NODE_TYPE_SPECIFIC_BITS_OFFSET + 2))
// Make sure we have enough space for those bits
PR_STATIC_ASSERT(NODE_TYPE_SPECIFIC_BITS_OFFSET + 2 < 32);
class nsIDOMAttr;
class nsIDOMEventListener;
class nsIDOMNodeList;

View File

@ -897,6 +897,9 @@ protected:
// same time, so if it becomes an issue we can probably merge them into the
// same bit. --bz
// Make sure we have enough space for those bits
PR_STATIC_ASSERT(NODE_TYPE_SPECIFIC_BITS_OFFSET + 1 < 32);
//----------------------------------------------------------------------
/**

View File

@ -449,7 +449,10 @@ public:
*/
#define XUL_ELEMENT_TEMPLATE_GENERATED 1 << NODE_TYPE_SPECIFIC_BITS_OFFSET
#define XUL_ELEMENT_TEMPLATE_GENERATED (1 << NODE_TYPE_SPECIFIC_BITS_OFFSET)
// Make sure we have space for our bit
PR_STATIC_ASSERT(NODE_TYPE_SPECIFIC_BITS_OFFSET < 32);
class nsScriptEventHandlerOwnerTearoff;