| 1008 | } |
| 1009 | |
| 1010 | GJS_JSAPI_RETURN_CONVENTION |
| 1011 | static bool throw_invalid_interface_argument(JSContext* cx, |
| 1012 | JS::HandleValue value, |
| 1013 | const GI::BaseInfo& interface_info, |
| 1014 | const char* arg_name, |
| 1015 | GjsArgumentType arg_type) { |
| 1016 | Gjs::AutoChar display_name{gjs_argument_display_name(arg_name, arg_type)}; |
| 1017 | |
| 1018 | gjs_throw(cx, "Expected type %s for %s but got type '%s'", |
| 1019 | interface_info.type_string(), display_name.get(), |
| 1020 | JS::InformalValueTypeName(value)); |
| 1021 | return false; |
| 1022 | } |
| 1023 | |
| 1024 | bool gjs_array_to_basic_explicit_array( |
| 1025 | JSContext* cx, JS::HandleValue value, GITypeTag element_tag, |
no test coverage detected