Skip to content

Commit 03ded94

Browse files
targosevanlucas
authored andcommitted
deps: patch V8 to 6.7.288.44
Refs: v8/v8@6.7.288.43...6.7.288.44 PR-URL: #21146 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent 1bbfe9a commit 03ded94

File tree

4 files changed

+14
-11
lines changed

4 files changed

+14
-11
lines changed

deps/v8/include/v8-version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#define V8_MAJOR_VERSION 6
1212
#define V8_MINOR_VERSION 7
1313
#define V8_BUILD_NUMBER 288
14-
#define V8_PATCH_LEVEL 43
14+
#define V8_PATCH_LEVEL 44
1515

1616
// Use 1 for candidates and 0 otherwise.
1717
// (Boolean macro values are not supported by all preprocessors.)

deps/v8/src/builtins/builtins-date.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,13 @@ void ToDateString(double time_val, Vector<char> str, DateCache* date_cache,
166166
kShortMonths[month], day, year);
167167
return;
168168
case kTimeOnly:
169+
// TODO(842085): str may be silently truncated.
169170
SNPrintF(str, "%02d:%02d:%02d GMT%c%02d%02d (%s)", hour, min, sec,
170171
(timezone_offset < 0) ? '-' : '+', timezone_hour, timezone_min,
171172
local_timezone);
172173
return;
173174
case kDateAndTime:
175+
// TODO(842085): str may be silently truncated.
174176
SNPrintF(str, "%s %s %02d %04d %02d:%02d:%02d GMT%c%02d%02d (%s)",
175177
kShortWeekDays[weekday], kShortMonths[month], day, year, hour,
176178
min, sec, (timezone_offset < 0) ? '-' : '+', timezone_hour,

deps/v8/src/intl.cc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -358,17 +358,17 @@ ICUTimezoneCache::~ICUTimezoneCache() { Clear(); }
358358

359359
const char* ICUTimezoneCache::LocalTimezone(double time_ms) {
360360
bool is_dst = DaylightSavingsOffset(time_ms) != 0;
361-
char* name = is_dst ? dst_timezone_name_ : timezone_name_;
362-
if (name[0] == '\0') {
361+
std::string* name = is_dst ? &dst_timezone_name_ : &timezone_name_;
362+
if (name->empty()) {
363363
icu::UnicodeString result;
364364
GetTimeZone()->getDisplayName(is_dst, icu::TimeZone::LONG, result);
365365
result += '\0';
366366

367-
icu::CheckedArrayByteSink byte_sink(name, kMaxTimezoneChars);
367+
icu::StringByteSink<std::string> byte_sink(name);
368368
result.toUTF8(byte_sink);
369-
CHECK(!byte_sink.Overflowed());
370369
}
371-
return const_cast<const char*>(name);
370+
DCHECK(!name->empty());
371+
return name->c_str();
372372
}
373373

374374
icu::TimeZone* ICUTimezoneCache::GetTimeZone() {
@@ -418,8 +418,8 @@ double ICUTimezoneCache::LocalTimeOffset(double time_ms, bool is_utc) {
418418
void ICUTimezoneCache::Clear() {
419419
delete timezone_;
420420
timezone_ = nullptr;
421-
timezone_name_[0] = '\0';
422-
dst_timezone_name_[0] = '\0';
421+
timezone_name_.clear();
422+
dst_timezone_name_.clear();
423423
}
424424

425425
} // namespace internal

deps/v8/src/intl.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
#ifndef V8_INTL_H_
1010
#define V8_INTL_H_
1111

12+
#include <string>
13+
1214
#include "src/base/timezone-cache.h"
1315
#include "src/objects.h"
1416
#include "src/objects/string.h"
@@ -64,9 +66,8 @@ class ICUTimezoneCache : public base::TimezoneCache {
6466

6567
icu::TimeZone* timezone_;
6668

67-
static const int32_t kMaxTimezoneChars = 100;
68-
char timezone_name_[kMaxTimezoneChars];
69-
char dst_timezone_name_[kMaxTimezoneChars];
69+
std::string timezone_name_;
70+
std::string dst_timezone_name_;
7071
};
7172

7273
} // namespace internal

0 commit comments

Comments
 (0)