зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1890905 - Avoid basic_string_view<unsigned char> from ever being picked as a possibility for NewStringCopy. r=spidermonkey-reviewers,dminor
It's not a valid type. Differential Revision: https://phabricator.services.mozilla.com/D207231
This commit is contained in:
Родитель
b6709d2608
Коммит
860f3e4aa7
|
@ -1737,7 +1737,9 @@ inline JSLinearString* NewStringCopy(
|
|||
}
|
||||
|
||||
/* Copy a counted string and GC-allocate a descriptor for it. */
|
||||
template <js::AllowGC allowGC, typename CharT>
|
||||
template <
|
||||
js::AllowGC allowGC, typename CharT,
|
||||
typename std::enable_if_t<!std::is_same_v<CharT, unsigned char>>* = nullptr>
|
||||
inline JSLinearString* NewStringCopy(
|
||||
JSContext* cx, std::basic_string_view<CharT> s,
|
||||
js::gc::Heap heap = js::gc::Heap::Default) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче