Bug 633890 - Assertion failure: prop == (JSProperty*) shape. r=brendan, a=jst.

--HG--
extra : rebase_source : 8b5f7ad67b3119c56700f3a2d50f84d320fbda11
This commit is contained in:
Jason Orendorff 2011-02-18 10:57:42 -06:00
parent d516b40847
commit e44513b843
2 changed files with 11 additions and 3 deletions

View File

@ -0,0 +1,9 @@
// |jit-test| error:Error
var p = /./, x = resolver({}, p), y = resolver({lastIndex: 2}, p), v;
var a = [];
for (var i = 0; i < HOTLOOP; i++)
a[i] = x;
a[HOTLOOP] = y;
for (i = 0; i < a.length; i++)
v = a[i].lastIndex;
assertEq(v, 2); // fails due to bug 458271

View File

@ -12852,10 +12852,9 @@ GetPropertyWithNativeGetter(JSContext* cx, JSObject* obj, Shape* shape, Value* v
LeaveTraceIfGlobalObject(cx, obj);
#ifdef DEBUG
JSProperty* prop;
JSObject* pobj;
JS_ASSERT(obj->lookupProperty(cx, shape->id, &pobj, &prop));
JS_ASSERT(prop == (JSProperty*) shape);
const Shape* shape2;
JS_ASSERT_IF(SafeLookup(cx, obj, shape->id, &pobj, &shape2), shape == shape2);
#endif
// Shape::get contains a special case for With objects. We can elide it