| 1219 | } |
| 1220 | |
| 1221 | bool Function::get_name(JSContext* cx, unsigned argc, JS::Value* vp) { |
| 1222 | GJS_CHECK_WRAPPER_PRIV(cx, argc, vp, rec, this_obj, Function, priv); |
| 1223 | |
| 1224 | if (auto func_info = priv->m_info.as<GI::InfoTag::FUNCTION>()) |
| 1225 | return gjs_string_from_utf8(cx, func_info->symbol(), rec.rval()); |
| 1226 | |
| 1227 | return gjs_string_from_utf8(cx, priv->format_name().c_str(), rec.rval()); |
| 1228 | } |
| 1229 | |
| 1230 | bool Function::to_string(JSContext* cx, unsigned argc, JS::Value* vp) { |
| 1231 | GJS_CHECK_WRAPPER_PRIV(cx, argc, vp, rec, this_obj, Function, priv); |
nothing calls this directly
no test coverage detected