deps: patch V8 to 6.7.288.44

Refs: https://github.com/v8/v8/compare/6.7.288.43...6.7.288.44

PR-URL: https://github.com/nodejs/node/pull/21146
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
Michaël Zasso 2018-06-05 11:08:12 +02:00
parent f54a598b44
commit 6dbd6f6c7d
No known key found for this signature in database
GPG Key ID: 770F7A9A5AE15600
4 changed files with 14 additions and 11 deletions

View File

@ -11,7 +11,7 @@
#define V8_MAJOR_VERSION 6
#define V8_MINOR_VERSION 7
#define V8_BUILD_NUMBER 288
#define V8_PATCH_LEVEL 43
#define V8_PATCH_LEVEL 44
// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)

View File

@ -166,11 +166,13 @@ void ToDateString(double time_val, Vector<char> str, DateCache* date_cache,
kShortMonths[month], day, year);
return;
case kTimeOnly:
// TODO(842085): str may be silently truncated.
SNPrintF(str, "%02d:%02d:%02d GMT%c%02d%02d (%s)", hour, min, sec,
(timezone_offset < 0) ? '-' : '+', timezone_hour, timezone_min,
local_timezone);
return;
case kDateAndTime:
// TODO(842085): str may be silently truncated.
SNPrintF(str, "%s %s %02d %04d %02d:%02d:%02d GMT%c%02d%02d (%s)",
kShortWeekDays[weekday], kShortMonths[month], day, year, hour,
min, sec, (timezone_offset < 0) ? '-' : '+', timezone_hour,

14
deps/v8/src/intl.cc vendored
View File

@ -358,17 +358,17 @@ ICUTimezoneCache::~ICUTimezoneCache() { Clear(); }
const char* ICUTimezoneCache::LocalTimezone(double time_ms) {
bool is_dst = DaylightSavingsOffset(time_ms) != 0;
char* name = is_dst ? dst_timezone_name_ : timezone_name_;
if (name[0] == '\0') {
std::string* name = is_dst ? &dst_timezone_name_ : &timezone_name_;
if (name->empty()) {
icu::UnicodeString result;
GetTimeZone()->getDisplayName(is_dst, icu::TimeZone::LONG, result);
result += '\0';
icu::CheckedArrayByteSink byte_sink(name, kMaxTimezoneChars);
icu::StringByteSink<std::string> byte_sink(name);
result.toUTF8(byte_sink);
CHECK(!byte_sink.Overflowed());
}
return const_cast<const char*>(name);
DCHECK(!name->empty());
return name->c_str();
}
icu::TimeZone* ICUTimezoneCache::GetTimeZone() {
@ -418,8 +418,8 @@ double ICUTimezoneCache::LocalTimeOffset(double time_ms, bool is_utc) {
void ICUTimezoneCache::Clear() {
delete timezone_;
timezone_ = nullptr;
timezone_name_[0] = '\0';
dst_timezone_name_[0] = '\0';
timezone_name_.clear();
dst_timezone_name_.clear();
}
} // namespace internal

7
deps/v8/src/intl.h vendored
View File

@ -9,6 +9,8 @@
#ifndef V8_INTL_H_
#define V8_INTL_H_
#include <string>
#include "src/base/timezone-cache.h"
#include "src/objects.h"
#include "src/objects/string.h"
@ -64,9 +66,8 @@ class ICUTimezoneCache : public base::TimezoneCache {
icu::TimeZone* timezone_;
static const int32_t kMaxTimezoneChars = 100;
char timezone_name_[kMaxTimezoneChars];
char dst_timezone_name_[kMaxTimezoneChars];
std::string timezone_name_;
std::string dst_timezone_name_;
};
} // namespace internal