Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1682121 - Add a ToJSValue overload for nsACString. r=hsivonen
I wrote this for bug 1682003, but I split it off it because I don't really _need_ it (I need it on one place where I know I have valid utf-8). I think this is a sensible thing to do though. This throws on invalid utf-8 via: https://searchfox.org/mozilla-central/rev/0bcf81557b89e7757c44e25bb4bc7f4cb8619dc9/js/src/vm/CharacterEncoding.cpp#432 This would allow doing stuff like resolving promises using nsCStrings slightly more conveniently / efficiently than using NS_ConvertUTF*. Differential Revision: https://phabricator.services.mozilla.com/D99589
- Loading branch information