[INFER] Don't use type barriers when compiling GETELEM on typed arrays, bug 678782.

This commit is contained in:
Brian Hackett
2011-08-17 16:11:38 -07:00
parent db0ac08430
commit 996be48178
6 changed files with 72 additions and 21 deletions

View File

@@ -794,6 +794,11 @@ array_getProperty(JSContext *cx, JSObject *obj, JSObject *receiver, jsid id, Val
}
*vp = obj->getDenseArrayElement(i);
/* Type information for dense array elements must be correct. */
JS_ASSERT_IF(!obj->hasSingletonType(),
js::types::TypeHasProperty(cx, obj->type(), JSID_VOID, *vp));
return JS_TRUE;
}