Skip to content

Commit 883bf5e

Browse files
abmussermagrin
authored andcommitted
deps: V8: cherry-pick ee2873a6303d
Original commit message: Fix GCC Build Move explicit specializations of Utf8::IsAsciiOneByteString to namespace scope C++ forbids explicit template specializations inside class scope. The specializations for IsAsciiOneByteString<uint8_t> and IsAsciiOneByteString<uint16_t> were defined inside class unibrow::Utf8, riggering "explicit specialization in non-namespace scope" compile errors. Fix type mismatch in EXPECT_EQ comparisons for std::pair values The tests failed because EXPECT_EQ was comparing pairs with mismatched template parameters — std::pair<int, unsigned int> vs. std::pair<unsigned int, unsigned char> — which have no valid operator==. I corrected the expected values to use the same unsigned types as the actual data, ensuring the pair comparison compiles cleanly. Fix build failure on GCC 12 by replacing std::format with ostringstream GCC 12's libstdc++ does not implement <format>, causing compile errors when using std::format. Replaced all std::format calls with equivalent Change-Id: I5c31f91065eccf6f4c14172902ffcd99863ebbb9 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7138905 Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Clemens Backes <clemensb@chromium.org> Commit-Queue: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/main@{#104280} Refs: v8/v8@ee2873a
1 parent f06a098 commit 883bf5e

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

common.gypi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
# Reset this number to 0 on major V8 upgrades.
4040
# Increment by one for each non-official patch applied to deps/v8.
41-
'v8_embedder_string': '-node.13',
41+
'v8_embedder_string': '-node.14',
4242

4343
##### V8 defaults for Node.js #####
4444

deps/v8/src/strings/unicode.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -215,14 +215,6 @@ class V8_EXPORT_PRIVATE Utf8 {
215215
template <typename Char>
216216
static size_t WriteLeadingAscii(const Char* src, char* dest, size_t size);
217217

218-
template <>
219-
size_t WriteLeadingAscii<uint8_t>(const uint8_t* src, char* dest,
220-
size_t size);
221-
222-
template <>
223-
size_t WriteLeadingAscii<uint16_t>(const uint16_t* src, char* dest,
224-
size_t size);
225-
226218
// Encode the given characters as Utf8 into the provided output buffer.
227219
struct EncodingResult {
228220
size_t bytes_written;
@@ -234,6 +226,14 @@ class V8_EXPORT_PRIVATE Utf8 {
234226
bool replace_invalid_utf8);
235227
};
236228

229+
template <>
230+
size_t unibrow::Utf8::WriteLeadingAscii<uint8_t>(const uint8_t* src, char* dest,
231+
size_t size);
232+
233+
template <>
234+
size_t unibrow::Utf8::WriteLeadingAscii<uint16_t>(const uint16_t* src,
235+
char* dest, size_t size);
236+
237237
#if V8_ENABLE_WEBASSEMBLY
238238
class V8_EXPORT_PRIVATE Wtf8 {
239239
public:

0 commit comments

Comments
 (0)