mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-24 19:37:15 +00:00
Bug 956553 - Remove js::IdToJsval in favour of js::IdToValue; r=luke
This commit is contained in:
parent
7b4adf5c0f
commit
83cc868202
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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_);
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user