示例#1
0
/* static */ bool
js::ErrorObject::setStack_impl(JSContext* cx, const CallArgs& args)
{
    RootedObject thisObj(cx, &args.thisv().toObject());

    if (!args.requireAtLeast(cx, "(set stack)", 1))
        return false;
    RootedValue val(cx, args[0]);

    return DefineDataProperty(cx, thisObj, cx->names().stack, val);
}