Bug 956553 - Remove js::IdToJsval in favour of js::IdToValue; r=luke

This commit is contained in:
Ms2ger 2014-01-20 08:58:27 +01:00
parent 9988c0aff8
commit 24d947ef8f
5 changed files with 4 additions and 10 deletions

View File

@ -898,7 +898,7 @@ StructType::layout(JSContext *cx, HandleObject structType, HandleObject fields)
// Check that all the property names are non-numeric strings.
uint32_t unused;
if (!JSID_IS_ATOM(id) || JSID_TO_ATOM(id)->isIndex(&unused)) {
RootedValue idValue(cx, IdToJsval(id));
RootedValue idValue(cx, IdToValue(id));
ReportCannotConvertTo(cx, idValue, "StructType field name");
return false;
}

View File

@ -2239,7 +2239,7 @@ JS_IdToValue(JSContext *cx, jsid id, MutableHandleValue vp)
{
AssertHeapIsIdle(cx);
CHECK_REQUEST(cx);
vp.set(IdToJsval(id));
vp.set(IdToValue(id));
assertSameCompartment(cx, vp);
return true;
}

View File

@ -1766,12 +1766,6 @@ IdToValue(jsid id)
return JS::UndefinedValue();
}
static JS_ALWAYS_INLINE jsval
IdToJsval(jsid id)
{
return IdToValue(id);
}
extern JS_FRIEND_API(bool)
IsReadOnlyDateMethod(JS::IsAcceptableThis test, JS::NativeImpl method);

View File

@ -627,7 +627,7 @@ static bool
GetPropertyDesc(JSContext *cx, JSObject *obj_, HandleShape shape, JSPropertyDesc *pd)
{
assertSameCompartment(cx, obj_);
pd->id = IdToJsval(shape->propid());
pd->id = IdToValue(shape->propid());
RootedObject obj(cx, obj_);

View File

@ -643,7 +643,7 @@ GeneratePropertyOp(JSContext *cx, JS::HandleObject obj, JS::HandleId id, unsigne
JS_SetPrivate(ptrobj, popp);
js::SetFunctionNativeReserved(funobj, 0, OBJECT_TO_JSVAL(ptrobj));
js::SetFunctionNativeReserved(funobj, 1, js::IdToJsval(id));
js::SetFunctionNativeReserved(funobj, 1, js::IdToValue(id));
return funobj;
}