When compiled with -std=c++17, `u8""` string literals have type `const char[]`. When compiled with -std=c++20, `u8""` strings have type `const char8_t[]`. `JS_ReportErrorUTF8()` has no override for `char8_t` strings, so `u8"Invalid event data property %s"` at https://searchfox.org/mozilla-central/rev/5eedf36dc46f1683af7478c7adaf308ceb42911b/widget/android/EventDispatcher.cpp#132 fails to compile. In this case, there's no reason for `"Invalid event data property %s"` to be a `u8` string because it contains no non-ASCII characters that would be encoded incorrectly. Plus, clang's default character encoding for .cpp files is UTF-8, so `u8` is redundant here.
widget/android/EventDispatcher.cpp:125:7: error: no matching function for call to 'JS_ReportErrorUTF8'
125 | JS_ReportErrorUTF8(
| ^~~~~~~~~~~~~~~~~~
obj-aarch64-unknown-linux-android/dist/include/js/ErrorReport.h:465:27: note: candidate function not viable: no known conversion from 'const char8_t[31]' to 'const char *' for 2nd argument
465 | extern JS_PUBLIC_API void JS_ReportErrorUTF8(JSContext* cx, const char* format,
| ^ ~~~~~~~~~~~~~~~~~~
Differential Revision: https://phabricator.services.mozilla.com/D200553