Bug 807035 - Skip guard insertion if there is no proto. r=dvander

This commit is contained in:
Nicolas B. Pierron 2012-10-31 18:32:38 -07:00
parent cb08b981d4
commit ba9899d3fc
2 changed files with 8 additions and 1 deletions

View File

@ -114,7 +114,8 @@ GeneratePrototypeGuards(JSContext *cx, MacroAssembler &masm, JSObject *obj, JSOb
JSObject *pobj = IsCacheableListBase(obj)
? obj->getTaggedProto().toObjectOrNull()
: obj->getProto();
JS_ASSERT(pobj);
if (!pobj)
return;
while (pobj != holder) {
if (pobj->hasUncacheableProto()) {
JS_ASSERT(!pobj->hasSingletonType());

View File

@ -0,0 +1,6 @@
x = [0, 0, 0, 0, 0, 0, 0, 0]
y = ({}).__proto__
x.sort(function() {
y.z
})