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:
parent
f54a598b44
commit
6dbd6f6c7d
2
deps/v8/include/v8-version.h
vendored
2
deps/v8/include/v8-version.h
vendored
@ -11,7 +11,7 @@
|
|||||||
#define V8_MAJOR_VERSION 6
|
#define V8_MAJOR_VERSION 6
|
||||||
#define V8_MINOR_VERSION 7
|
#define V8_MINOR_VERSION 7
|
||||||
#define V8_BUILD_NUMBER 288
|
#define V8_BUILD_NUMBER 288
|
||||||
#define V8_PATCH_LEVEL 43
|
#define V8_PATCH_LEVEL 44
|
||||||
|
|
||||||
// Use 1 for candidates and 0 otherwise.
|
// Use 1 for candidates and 0 otherwise.
|
||||||
// (Boolean macro values are not supported by all preprocessors.)
|
// (Boolean macro values are not supported by all preprocessors.)
|
||||||
|
2
deps/v8/src/builtins/builtins-date.cc
vendored
2
deps/v8/src/builtins/builtins-date.cc
vendored
@ -166,11 +166,13 @@ void ToDateString(double time_val, Vector<char> str, DateCache* date_cache,
|
|||||||
kShortMonths[month], day, year);
|
kShortMonths[month], day, year);
|
||||||
return;
|
return;
|
||||||
case kTimeOnly:
|
case kTimeOnly:
|
||||||
|
// TODO(842085): str may be silently truncated.
|
||||||
SNPrintF(str, "%02d:%02d:%02d GMT%c%02d%02d (%s)", hour, min, sec,
|
SNPrintF(str, "%02d:%02d:%02d GMT%c%02d%02d (%s)", hour, min, sec,
|
||||||
(timezone_offset < 0) ? '-' : '+', timezone_hour, timezone_min,
|
(timezone_offset < 0) ? '-' : '+', timezone_hour, timezone_min,
|
||||||
local_timezone);
|
local_timezone);
|
||||||
return;
|
return;
|
||||||
case kDateAndTime:
|
case kDateAndTime:
|
||||||
|
// TODO(842085): str may be silently truncated.
|
||||||
SNPrintF(str, "%s %s %02d %04d %02d:%02d:%02d GMT%c%02d%02d (%s)",
|
SNPrintF(str, "%s %s %02d %04d %02d:%02d:%02d GMT%c%02d%02d (%s)",
|
||||||
kShortWeekDays[weekday], kShortMonths[month], day, year, hour,
|
kShortWeekDays[weekday], kShortMonths[month], day, year, hour,
|
||||||
min, sec, (timezone_offset < 0) ? '-' : '+', timezone_hour,
|
min, sec, (timezone_offset < 0) ? '-' : '+', timezone_hour,
|
||||||
|
14
deps/v8/src/intl.cc
vendored
14
deps/v8/src/intl.cc
vendored
@ -358,17 +358,17 @@ ICUTimezoneCache::~ICUTimezoneCache() { Clear(); }
|
|||||||
|
|
||||||
const char* ICUTimezoneCache::LocalTimezone(double time_ms) {
|
const char* ICUTimezoneCache::LocalTimezone(double time_ms) {
|
||||||
bool is_dst = DaylightSavingsOffset(time_ms) != 0;
|
bool is_dst = DaylightSavingsOffset(time_ms) != 0;
|
||||||
char* name = is_dst ? dst_timezone_name_ : timezone_name_;
|
std::string* name = is_dst ? &dst_timezone_name_ : &timezone_name_;
|
||||||
if (name[0] == '\0') {
|
if (name->empty()) {
|
||||||
icu::UnicodeString result;
|
icu::UnicodeString result;
|
||||||
GetTimeZone()->getDisplayName(is_dst, icu::TimeZone::LONG, result);
|
GetTimeZone()->getDisplayName(is_dst, icu::TimeZone::LONG, result);
|
||||||
result += '\0';
|
result += '\0';
|
||||||
|
|
||||||
icu::CheckedArrayByteSink byte_sink(name, kMaxTimezoneChars);
|
icu::StringByteSink<std::string> byte_sink(name);
|
||||||
result.toUTF8(byte_sink);
|
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() {
|
icu::TimeZone* ICUTimezoneCache::GetTimeZone() {
|
||||||
@ -418,8 +418,8 @@ double ICUTimezoneCache::LocalTimeOffset(double time_ms, bool is_utc) {
|
|||||||
void ICUTimezoneCache::Clear() {
|
void ICUTimezoneCache::Clear() {
|
||||||
delete timezone_;
|
delete timezone_;
|
||||||
timezone_ = nullptr;
|
timezone_ = nullptr;
|
||||||
timezone_name_[0] = '\0';
|
timezone_name_.clear();
|
||||||
dst_timezone_name_[0] = '\0';
|
dst_timezone_name_.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace internal
|
} // namespace internal
|
||||||
|
7
deps/v8/src/intl.h
vendored
7
deps/v8/src/intl.h
vendored
@ -9,6 +9,8 @@
|
|||||||
#ifndef V8_INTL_H_
|
#ifndef V8_INTL_H_
|
||||||
#define V8_INTL_H_
|
#define V8_INTL_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
#include "src/base/timezone-cache.h"
|
#include "src/base/timezone-cache.h"
|
||||||
#include "src/objects.h"
|
#include "src/objects.h"
|
||||||
#include "src/objects/string.h"
|
#include "src/objects/string.h"
|
||||||
@ -64,9 +66,8 @@ class ICUTimezoneCache : public base::TimezoneCache {
|
|||||||
|
|
||||||
icu::TimeZone* timezone_;
|
icu::TimeZone* timezone_;
|
||||||
|
|
||||||
static const int32_t kMaxTimezoneChars = 100;
|
std::string timezone_name_;
|
||||||
char timezone_name_[kMaxTimezoneChars];
|
std::string dst_timezone_name_;
|
||||||
char dst_timezone_name_[kMaxTimezoneChars];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace internal
|
} // namespace internal
|
||||||
|
Loading…
x
Reference in New Issue
Block a user