Bug 674207 - Assertion attempting to convert the value of the 'it' property in the shell to a primitive. r=luke

--HG--
extra : rebase_source : 40334c0f47f4b0dcb30f1f8cf6dadf87b7b29ada
This commit is contained in:
Jeff Walden 2011-07-26 23:33:58 -07:00
parent 5d42be833c
commit 4f15098148
2 changed files with 4 additions and 2 deletions

View File

@ -1187,7 +1187,9 @@ struct JSObject : js::gc::Cell {
bool defaultValue(JSContext *cx, JSType hint, js::Value *vp) {
js::ConvertOp op = getClass()->convert;
return (op == js::ConvertStub ? js::DefaultValue : op)(cx, this, hint, vp);
bool ok = (op == js::ConvertStub ? js::DefaultValue : op)(cx, this, hint, vp);
JS_ASSERT_IF(ok, vp->isPrimitive());
return ok;
}
JSType typeOf(JSContext *cx) {

View File

@ -5150,7 +5150,7 @@ its_convert(JSContext *cx, JSObject *obj, JSType type, jsval *vp)
{
if (its_noisy)
fprintf(gOutFile, "converting it to %s type\n", JS_GetTypeName(cx, type));
return JS_TRUE;
return JS_ConvertStub(cx, obj, type, vp);
}
static void