+++ This bug was initially created as a clone of Bug #458491 +++
http://mxr.mozilla.org/mozilla-central/source/content/base/src/nsAttrAndChildArray.cpp#169 167 PRUint32 childCount = ChildCount(); 168 169 NS_ENSURE_TRUE(childCount < ATTRCHILD_ARRAY_MAX_CHILD_COUNT, 170 NS_ERROR_FAILURE);
For future reference... ChildCount() is defined here: http://mxr.mozilla.org/mozilla-central/source/content/base/src/nsAttrAndChildArray.h#83 ATTRCHILD_ARRAY_MAX_CHILD_COUNT here: http://mxr.mozilla.org/mozilla-central/source/content/base/src/nsAttrAndChildArray.h#66
Is this a valid problem? Maybe today the comparison is unneeded with the current value of ATTRCHILD_ARRAY_MAX_CHILD_COUNT. But if that constant changes, it may be necessary to catch it here.
Comment on attachment 620444 [details] [diff] [review] Patch Sorry, I'm not a peer; redirecting to someone who is :-)
Why is this warning at all? childCount is a PRUint32. ATTRCHILD_ARRAY_MAX_CHILD_COUNT should be 0x3fffff. There are certainly values of PRUint32 that are bigger than that! Marco, I assume you reproduced the warning?
Note that back when the bug was filed, a 64-bit build would have warned here. But that should have been fixed in bug 480655.
(In reply to Boris Zbarsky (:bz) from comment #6) > Marco, I assume you reproduced the warning? No, I just assumed it was reproducible. I didn't see the bug was so old.