diff --git a/js/public/CharacterEncoding.h b/js/public/CharacterEncoding.h index 47638161c54..41d7d1e9f4f 100644 --- a/js/public/CharacterEncoding.h +++ b/js/public/CharacterEncoding.h @@ -176,7 +176,7 @@ LossyTwoByteCharsToNewLatin1CharsZ(js::ExclusiveContext* cx, template extern UTF8CharsZ -CharsToNewUTF8CharsZ(js::ExclusiveContext* maybeCx, const mozilla::Range chars); +CharsToNewUTF8CharsZ(js::ExclusiveContext* maybeCx, const mozilla::Range chars); uint32_t Utf8ToOneUcs4Char(const uint8_t* utf8Buffer, int utf8Length); diff --git a/js/src/vm/CharacterEncoding.cpp b/js/src/vm/CharacterEncoding.cpp index cb7bb8ad86f..f8462f3a5b7 100644 --- a/js/src/vm/CharacterEncoding.cpp +++ b/js/src/vm/CharacterEncoding.cpp @@ -134,7 +134,7 @@ JS::DeflateStringToUTF8Buffer(JSFlatString* src, mozilla::RangedPtr dst) template UTF8CharsZ -JS::CharsToNewUTF8CharsZ(js::ExclusiveContext* maybeCx, const mozilla::Range chars) +JS::CharsToNewUTF8CharsZ(js::ExclusiveContext* maybeCx, const mozilla::Range chars) { /* Get required buffer size. */ const CharT* str = chars.start().get(); @@ -156,6 +156,14 @@ JS::CharsToNewUTF8CharsZ(js::ExclusiveContext* maybeCx, const mozilla::Range chars); + +template UTF8CharsZ +JS::CharsToNewUTF8CharsZ(js::ExclusiveContext* maybeCx, + const mozilla::Range chars); + template UTF8CharsZ JS::CharsToNewUTF8CharsZ(js::ExclusiveContext* maybeCx, const mozilla::Range chars);