Back out Bug 711895 for breaking l10n builds.

This commit is contained in:
Kyle Huey
2011-12-29 15:45:51 -05:00
parent f412c5b5f2
commit ee2de04626
12 changed files with 41 additions and 196 deletions

View File

@@ -404,24 +404,11 @@ DoGetElement(JSContext *cx, JSObject *obj, uint32_t index, JSBool *hole, Value *
return true;
}
template<typename IndexType>
static void
AssertGreaterThanZero(IndexType index)
{
JS_ASSERT(index >= 0);
}
template<>
void
AssertGreaterThanZero(jsuint index)
{
}
template<typename IndexType>
static JSBool
GetElement(JSContext *cx, JSObject *obj, IndexType index, JSBool *hole, Value *vp)
{
AssertGreaterThanZero(index);
JS_ASSERT(index >= 0);
if (obj->isDenseArray() && index < obj->getDenseArrayInitializedLength() &&
!(*vp = obj->getDenseArrayElement(uint32_t(index))).isMagic(JS_ARRAY_HOLE)) {
*hole = JS_FALSE;