Skip to content

Commit

Permalink
deps: patch V8 to 6.7.288.44
Browse files Browse the repository at this point in the history
Refs: v8/v8@6.7.288.43...6.7.288.44

PR-URL: #21146
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
  • Loading branch information
targos committed Jun 7, 2018
1 parent f54a598 commit 6dbd6f6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion deps/v8/include/v8-version.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.)
Expand Down
2 changes: 2 additions & 0 deletions deps/v8/src/builtins/builtins-date.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
14 changes: 7 additions & 7 deletions deps/v8/src/intl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions deps/v8/src/intl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 6dbd6f6

Please sign in to comment.