diff --git a/builtins/web/blob.cpp b/builtins/web/blob.cpp index 445e5d1..f698db8 100644 --- a/builtins/web/blob.cpp +++ b/builtins/web/blob.cpp @@ -252,10 +252,10 @@ bool Blob::text(JSContext *cx, unsigned argc, JS::Value *vp) { bool had_replacements; auto dst_data = reinterpret_cast(dst.get()); - auto ret = jsencoding::decoder_decode_to_utf16(decoder, src->data(), &src_len, dst_data, &dst_len, - true, &had_replacements); - MOZ_ASSERT(ret == 0); + jsencoding::decoder_decode_to_utf16(decoder, src->data(), &src_len, dst_data, &dst_len, true, + &had_replacements); + JS::RootedString str(cx, JS_NewUCString(cx, std::move(dst), dst_len)); if (!str) {