Example #1
0
bool
js::InternNonIntElementId(JSContext *cx, JSObject *obj, const Value &idval,
                          typename MaybeRooted<jsid, allowGC>::MutableHandleType idp,
                          typename MaybeRooted<Value, allowGC>::MutableHandleType vp)
{
    JSAtom *atom = ToAtom<allowGC>(cx, idval);
    if (!atom)
        return false;

    idp.set(AtomToId(atom));
    vp.setString(atom);
    return true;
}