| 541 | } |
| 542 | |
| 543 | GJS_JSAPI_RETURN_CONVENTION |
| 544 | static bool gjs_encode_into(JSContext* cx, unsigned argc, JS::Value* vp) { |
| 545 | JS::CallArgs args = JS::CallArgsFromVp(argc, vp); |
| 546 | JS::RootedString str(cx); |
| 547 | JS::RootedObject uint8array(cx); |
| 548 | if (!gjs_parse_call_args(cx, "encodeInto", args, "So", "string", &str, |
| 549 | "byteArray", &uint8array)) |
| 550 | return false; |
| 551 | |
| 552 | return gjs_encode_into_uint8array(cx, str, uint8array, args.rval()); |
| 553 | } |
| 554 | |
| 555 | static JSFunctionSpec gjs_text_encoding_module_funcs[] = { |
| 556 | JS_FN("decode", gjs_decode, 3, 0), |
nothing calls this directly
no test coverage detected