summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElvis Pranskevichus <elvis@magic.io>2017-12-04 11:51:54 -0500
committerPatrice Clement <monsieurp@gentoo.org>2017-12-08 23:22:06 +0100
commit08f69fe500076c4ecd3291a4297eb6b392f69985 (patch)
tree92110252f896c393c6a3eaf3d3919275a6d9fa57 /dev-util/electron/files
parentdev-python/parse-type: remove old. (diff)
downloadgentoo-08f69fe500076c4ecd3291a4297eb6b392f69985.tar.gz
gentoo-08f69fe500076c4ecd3291a4297eb6b392f69985.tar.bz2
gentoo-08f69fe500076c4ecd3291a4297eb6b392f69985.zip
dev-util/electron: version bump to 1.6.15.
Closes: https://bugs.gentoo.org/633720 Closes: https://bugs.gentoo.org/635276 Closes: https://bugs.gentoo.org/638270 Closes: https://bugs.gentoo.org/638992 Closes: https://bugs.gentoo.org/640140 Closes: https://github.com/gentoo/gentoo/pull/6478 Signed-off-by: Elvis Pranskevichus <elvis@magic.io> Package-Manager: Portage-2.3.13, Repoman-2.3.3
Diffstat (limited to 'dev-util/electron/files')
-rw-r--r--dev-util/electron/files/chromium-gcc-7-r0.patch114
-rw-r--r--dev-util/electron/files/chromium-icu-59-r0.patch582
-rw-r--r--dev-util/electron/files/chromium-icu-60-r0.patch66
-rw-r--r--dev-util/electron/files/chromium-python3-compat-r0.patch34
-rw-r--r--dev-util/electron/files/chromium-shared-v8-r2.patch94
-rw-r--r--dev-util/electron/files/chromium-system-icu-r0.patch140
-rw-r--r--dev-util/electron/files/chromium-v8-icu-59-r0.patch83
-rw-r--r--dev-util/electron/files/electron-1.6.11-vendor-libchromiumcontent.patch86
-rw-r--r--dev-util/electron/files/electron-1.6.15-vendor-breakpad.patch223
-rw-r--r--dev-util/electron/files/electron-1.6.15-vendor-brightray.patch (renamed from dev-util/electron/files/electron-1.6.11-vendor-brightray.patch)74
-rw-r--r--dev-util/electron/files/electron-1.6.15-vendor-libchromiumcontent.patch202
-rw-r--r--dev-util/electron/files/electron-1.6.15-vendor-node.patch (renamed from dev-util/electron/files/electron-1.6.11-vendor-node.patch)44
-rw-r--r--dev-util/electron/files/electron-1.6.15.patch (renamed from dev-util/electron/files/electron-1.6.11.patch)124
-rw-r--r--dev-util/electron/files/electron-system-icu-r0.patch34
14 files changed, 1657 insertions, 243 deletions
diff --git a/dev-util/electron/files/chromium-gcc-7-r0.patch b/dev-util/electron/files/chromium-gcc-7-r0.patch
new file mode 100644
index 000000000000..7a7ded275cd0
--- /dev/null
+++ b/dev-util/electron/files/chromium-gcc-7-r0.patch
@@ -0,0 +1,114 @@
+From 19597ff341e55fef78c7fae794574785bfde9acd Mon Sep 17 00:00:00 2001
+From: Elvis Pranskevichus <elvis@magic.io>
+Date: Thu, 7 Dec 2017 09:25:03 -0500
+Subject: [PATCH] GCC-7 compatibility
+
+---
+ .../Source/platform/graphics/gpu/SharedGpuContext.h | 1 +
+ third_party/WebKit/Source/wtf/LinkedHashSet.h | 1 +
+ v8/src/objects-body-descriptors.h | 2 +-
+ v8/src/objects-inl.h | 19 +++++++++++++++++++
+ v8/src/objects.h | 20 ++++----------------
+ 5 files changed, 26 insertions(+), 17 deletions(-)
+
+diff --git a/third_party/WebKit/Source/platform/graphics/gpu/SharedGpuContext.h b/third_party/WebKit/Source/platform/graphics/gpu/SharedGpuContext.h
+index 7c32007346..dd2d637085 100644
+--- a/third_party/WebKit/Source/platform/graphics/gpu/SharedGpuContext.h
++++ b/third_party/WebKit/Source/platform/graphics/gpu/SharedGpuContext.h
+@@ -5,6 +5,7 @@
+ #include "platform/PlatformExport.h"
+ #include "wtf/ThreadSpecific.h"
+
++#include <functional>
+ #include <memory>
+
+ namespace gpu {
+diff --git a/third_party/WebKit/Source/wtf/LinkedHashSet.h b/third_party/WebKit/Source/wtf/LinkedHashSet.h
+index 65f5100a8f..7c6c9fc5d8 100644
+--- a/third_party/WebKit/Source/wtf/LinkedHashSet.h
++++ b/third_party/WebKit/Source/wtf/LinkedHashSet.h
+@@ -630,6 +630,7 @@ inline LinkedHashSet<T, U, V, W>& LinkedHashSet<T, U, V, W>::operator=(
+ return *this;
+ }
+
++inline void swapAnchor(LinkedHashSetNodeBase& a, LinkedHashSetNodeBase& b);
+ template <typename T, typename U, typename V, typename W>
+ inline void LinkedHashSet<T, U, V, W>::swap(LinkedHashSet& other) {
+ m_impl.swap(other.m_impl);
+diff --git a/v8/src/objects-body-descriptors.h b/v8/src/objects-body-descriptors.h
+index 91cb8883be..a1c3634bd7 100644
+--- a/v8/src/objects-body-descriptors.h
++++ b/v8/src/objects-body-descriptors.h
+@@ -99,7 +99,7 @@ class FixedBodyDescriptor final : public BodyDescriptorBase {
+
+ template <typename StaticVisitor>
+ static inline void IterateBody(HeapObject* obj, int object_size) {
+- IterateBody(obj);
++ IterateBody<StaticVisitor>(obj);
+ }
+ };
+
+diff --git a/v8/src/objects-inl.h b/v8/src/objects-inl.h
+index 1a8274cbf1..6c4b13c0d0 100644
+--- a/v8/src/objects-inl.h
++++ b/v8/src/objects-inl.h
+@@ -39,6 +39,25 @@
+ namespace v8 {
+ namespace internal {
+
++template <typename Derived, typename Shape, typename Key>
++uint32_t HashTable<Derived, Shape, Key>::Hash(Key key) {
++ if (Shape::UsesSeed) {
++ return Shape::SeededHash(key, GetHeap()->HashSeed());
++ } else {
++ return Shape::Hash(key);
++ }
++}
++
++template <typename Derived, typename Shape, typename Key>
++uint32_t HashTable<Derived, Shape, Key>::HashForObject(Key key,
++ Object* object) {
++ if (Shape::UsesSeed) {
++ return Shape::SeededHashForObject(key, GetHeap()->HashSeed(), object);
++ } else {
++ return Shape::HashForObject(key, object);
++ }
++}
++
+ PropertyDetails::PropertyDetails(Smi* smi) {
+ value_ = smi->value();
+ }
+diff --git a/v8/src/objects.h b/v8/src/objects.h
+index 747a4f0511..b9279640e2 100644
+--- a/v8/src/objects.h
++++ b/v8/src/objects.h
+@@ -3531,22 +3531,10 @@ class HashTable : public HashTableBase {
+ public:
+ typedef Shape ShapeT;
+
+- // Wrapper methods
+- inline uint32_t Hash(Key key) {
+- if (Shape::UsesSeed) {
+- return Shape::SeededHash(key, GetHeap()->HashSeed());
+- } else {
+- return Shape::Hash(key);
+- }
+- }
+-
+- inline uint32_t HashForObject(Key key, Object* object) {
+- if (Shape::UsesSeed) {
+- return Shape::SeededHashForObject(key, GetHeap()->HashSeed(), object);
+- } else {
+- return Shape::HashForObject(key, object);
+- }
+- }
++ // Wrapper methods. Defined in src/objects-inl.h
++ // to break a cycle with src/heap/heap.h.
++ inline uint32_t Hash(Key key);
++ inline uint32_t HashForObject(Key key, Object* object);
+
+ // Returns a new HashTable object.
+ MUST_USE_RESULT static Handle<Derived> New(
+--
+2.14.3
+
diff --git a/dev-util/electron/files/chromium-icu-59-r0.patch b/dev-util/electron/files/chromium-icu-59-r0.patch
new file mode 100644
index 000000000000..31dd6983592e
--- /dev/null
+++ b/dev-util/electron/files/chromium-icu-59-r0.patch
@@ -0,0 +1,582 @@
+From f041627ec383536d124002b81301c80b7a1757f7 Mon Sep 17 00:00:00 2001
+From: jshin <jshin@chromium.org>
+Date: Thu, 23 Mar 2017 02:57:16 -0700
+Subject: [PATCH] Prepare Chromium and Blink for ICU 59
+
+ICU 59 uses char16_t as UChar instead of {wchar_t, uint16_t}.
+As a result, char16_t is not compatible with char16 any more.
+When constructing string16 from UnicodeString/UChar buffer, we need to
+reinterpret_cast with a barrier (to avoid an anti-aliasing optimzation
+by some compilers).
+
+Add UnicodeStringToString16() to base/i18n that utilizes ICU 59-to-be's
+helper for the casting regardless of anti-aliasing optimization.
+
+And, refactor UnicodeString->string16->UTF8 string to UnicodeString->UTF8
+in a few places.
+
+For ICU C API "clients", UChar will be configured to be {wchar_t, uint16_t}
+so that there's little to be changed.
+
+This was tested with an ICU branch with char16_t as UChar.
+
+http://source.icu-project.org/repos/icu/branches/markus/ucharptr2/
+
+BUG=693640
+TEST=trybots are all green.
+
+Review-Url: https://codereview.chromium.org/2740673002
+Cr-Commit-Position: refs/heads/master@{#459034}
+---
+ ash/common/system/date/date_view.cc | 30 ++------------------
+ base/BUILD.gn | 1 +
+ base/i18n/message_formatter.cc | 5 ++--
+ base/i18n/number_formatting.cc | 5 ++--
+ base/i18n/string_compare.cc | 5 ++--
+ base/i18n/time_formatting.cc | 9 +++---
+ base/i18n/time_formatting_unittest.cc | 3 +-
+ base/i18n/timezone.cc | 4 +--
+ base/i18n/unicodestring.h | 32 ++++++++++++++++++++++
+ chrome/browser/chromeos/system/timezone_util.cc | 6 ++--
+ .../webui/md_downloads/downloads_list_tracker.cc | 4 +--
+ chromeos/settings/timezone_settings.cc | 4 +--
+ .../core/browser/autofill_profile_comparator.cc | 3 +-
+ components/autofill/core/browser/credit_card.cc | 7 +++--
+ .../browser/android/date_time_chooser_android.cc | 4 +--
+ content/renderer/android/email_detector.cc | 4 +--
+ ios/chrome/browser/notification_promo_unittest.cc | 10 ++-----
+ net/ftp/ftp_util.cc | 5 ++--
+ .../Source/core/html/forms/EmailInputType.cpp | 13 +++++++--
+ 19 files changed, 88 insertions(+), 66 deletions(-)
+ create mode 100644 base/i18n/unicodestring.h
+
+diff --git a/ash/common/system/date/date_view.cc b/ash/common/system/date/date_view.cc
+index 41aa1919a980..8d9c416fd392 100644
+--- a/ash/common/system/date/date_view.cc
++++ b/ash/common/system/date/date_view.cc
+@@ -57,43 +57,19 @@ bool UseMd() {
+ return MaterialDesignController::IsSystemTrayMenuMaterial();
+ }
+
+-base::string16 FormatDateWithPattern(const base::Time& time,
+- const char* pattern) {
+- UErrorCode status = U_ZERO_ERROR;
+- std::unique_ptr<icu::DateTimePatternGenerator> generator(
+- icu::DateTimePatternGenerator::createInstance(status));
+- DCHECK(U_SUCCESS(status));
+- icu::UnicodeString generated_pattern =
+- generator->getBestPattern(icu::UnicodeString(pattern), status);
+- DCHECK(U_SUCCESS(status));
+- icu::SimpleDateFormat simple_formatter(generated_pattern, status);
+- DCHECK(U_SUCCESS(status));
+- icu::UnicodeString date_string;
+- simple_formatter.format(static_cast<UDate>(time.ToDoubleT() * 1000),
+- date_string, status);
+- DCHECK(U_SUCCESS(status));
+- return base::string16(date_string.getBuffer(),
+- static_cast<size_t>(date_string.length()));
+-}
+-
+ base::string16 FormatDate(const base::Time& time) {
+ if (UseMd()) {
+ // Use 'short' month format (e.g., "Oct") followed by non-padded day of
+ // month (e.g., "2", "10").
+- return FormatDateWithPattern(time, "LLLd");
++ return base::TimeFormatWithPattern(time, "LLLd");
+ } else {
+- icu::UnicodeString date_string;
+- std::unique_ptr<icu::DateFormat> formatter(
+- icu::DateFormat::createDateInstance(icu::DateFormat::kMedium));
+- formatter->format(static_cast<UDate>(time.ToDoubleT() * 1000), date_string);
+- return base::string16(date_string.getBuffer(),
+- static_cast<size_t>(date_string.length()));
++ return base::TimeFormatShortDate(time);
+ }
+ }
+
+ base::string16 FormatDayOfWeek(const base::Time& time) {
+ // Use 'short' day of week format (e.g., "Wed").
+- return FormatDateWithPattern(time, "EEE");
++ return base::TimeFormatWithPattern(time, "EEE");
+ }
+
+ } // namespace
+diff --git a/base/BUILD.gn b/base/BUILD.gn
+index 3754be5f383f..29a60c1a265f 100644
+--- a/base/BUILD.gn
++++ b/base/BUILD.gn
+@@ -1564,6 +1564,7 @@ component("i18n") {
+ "i18n/time_formatting.h",
+ "i18n/timezone.cc",
+ "i18n/timezone.h",
++ "i18n/unicodestring.h",
+ "i18n/utf8_validator_tables.cc",
+ "i18n/utf8_validator_tables.h",
+ ]
+diff --git a/base/i18n/message_formatter.cc b/base/i18n/message_formatter.cc
+index 702e51b94aaa..6962a2829755 100644
+--- a/base/i18n/message_formatter.cc
++++ b/base/i18n/message_formatter.cc
+@@ -4,6 +4,7 @@
+
+ #include "base/i18n/message_formatter.h"
+
++#include "base/i18n/unicodestring.h"
+ #include "base/logging.h"
+ #include "base/numerics/safe_conversions.h"
+ #include "base/time/time.h"
+@@ -91,7 +92,7 @@ string16 MessageFormatter::FormatWithNumberedArgs(
+ << u_errorName(error);
+ return string16();
+ }
+- return string16(formatted.getBuffer(), formatted.length());
++ return i18n::UnicodeStringToString16(formatted);
+ }
+
+ string16 MessageFormatter::FormatWithNamedArgs(
+@@ -134,7 +135,7 @@ string16 MessageFormatter::FormatWithNamedArgs(
+ << u_errorName(error);
+ return string16();
+ }
+- return string16(formatted.getBuffer(), formatted.length());
++ return i18n::UnicodeStringToString16(formatted);
+ }
+
+ } // namespace i18n
+diff --git a/base/i18n/number_formatting.cc b/base/i18n/number_formatting.cc
+index b51083348460..5a0503f77de1 100644
+--- a/base/i18n/number_formatting.cc
++++ b/base/i18n/number_formatting.cc
+@@ -10,6 +10,7 @@
+
+ #include "base/format_macros.h"
+ #include "base/i18n/message_formatter.h"
++#include "base/i18n/unicodestring.h"
+ #include "base/lazy_instance.h"
+ #include "base/logging.h"
+ #include "base/strings/string_util.h"
+@@ -60,7 +61,7 @@ string16 FormatNumber(int64_t number) {
+ icu::UnicodeString ustr;
+ number_format->format(number, ustr);
+
+- return string16(ustr.getBuffer(), static_cast<size_t>(ustr.length()));
++ return i18n::UnicodeStringToString16(ustr);
+ }
+
+ string16 FormatDouble(double number, int fractional_digits) {
+@@ -76,7 +77,7 @@ string16 FormatDouble(double number, int fractional_digits) {
+ icu::UnicodeString ustr;
+ number_format->format(number, ustr);
+
+- return string16(ustr.getBuffer(), static_cast<size_t>(ustr.length()));
++ return i18n::UnicodeStringToString16(ustr);
+ }
+
+ string16 FormatPercent(int number) {
+diff --git a/base/i18n/string_compare.cc b/base/i18n/string_compare.cc
+index 2851e7d2dce1..649c28119fe3 100644
+--- a/base/i18n/string_compare.cc
++++ b/base/i18n/string_compare.cc
+@@ -6,6 +6,7 @@
+
+ #include "base/logging.h"
+ #include "base/strings/utf_string_conversions.h"
++#include "third_party/icu/source/common/unicode/unistr.h"
+
+ namespace base {
+ namespace i18n {
+@@ -17,8 +18,8 @@ UCollationResult CompareString16WithCollator(const icu::Collator& collator,
+ const string16& rhs) {
+ UErrorCode error = U_ZERO_ERROR;
+ UCollationResult result = collator.compare(
+- static_cast<const UChar*>(lhs.c_str()), static_cast<int>(lhs.length()),
+- static_cast<const UChar*>(rhs.c_str()), static_cast<int>(rhs.length()),
++ icu::UnicodeString(FALSE, lhs.c_str(), static_cast<int>(lhs.length())),
++ icu::UnicodeString(FALSE, rhs.c_str(), static_cast<int>(rhs.length())),
+ error);
+ DCHECK(U_SUCCESS(error));
+ return result;
+diff --git a/base/i18n/time_formatting.cc b/base/i18n/time_formatting.cc
+index 024b86510b5a..ae1c59eb411a 100644
+--- a/base/i18n/time_formatting.cc
++++ b/base/i18n/time_formatting.cc
+@@ -8,6 +8,7 @@
+
+ #include <memory>
+
++#include "base/i18n/unicodestring.h"
+ #include "base/logging.h"
+ #include "base/strings/utf_string_conversions.h"
+ #include "base/time/time.h"
+@@ -26,8 +27,7 @@ string16 TimeFormat(const icu::DateFormat* formatter,
+ icu::UnicodeString date_string;
+
+ formatter->format(static_cast<UDate>(time.ToDoubleT() * 1000), date_string);
+- return string16(date_string.getBuffer(),
+- static_cast<size_t>(date_string.length()));
++ return i18n::UnicodeStringToString16(date_string);
+ }
+
+ string16 TimeFormatWithoutAmPm(const icu::DateFormat* formatter,
+@@ -46,8 +46,7 @@ string16 TimeFormatWithoutAmPm(const icu::DateFormat* formatter,
+ begin--;
+ time_string.removeBetween(begin, ampm_field.getEndIndex());
+ }
+- return string16(time_string.getBuffer(),
+- static_cast<size_t>(time_string.length()));
++ return i18n::UnicodeStringToString16(time_string);
+ }
+
+ icu::SimpleDateFormat CreateSimpleDateFormatter(const char* pattern) {
+@@ -168,7 +167,7 @@ string16 TimeDurationFormat(const TimeDelta& time,
+ icu::UnicodeString formatted;
+ icu::FieldPosition ignore(icu::FieldPosition::DONT_CARE);
+ measure_format.formatMeasures(measures, 2, formatted, ignore, status);
+- return base::string16(formatted.getBuffer(), formatted.length());
++ return i18n::UnicodeStringToString16(formatted);
+ }
+
+ HourClockType GetHourClockType() {
+diff --git a/base/i18n/time_formatting_unittest.cc b/base/i18n/time_formatting_unittest.cc
+index 51a48513aca6..eca8ea2cdaea 100644
+--- a/base/i18n/time_formatting_unittest.cc
++++ b/base/i18n/time_formatting_unittest.cc
+@@ -7,6 +7,7 @@
+ #include <memory>
+
+ #include "base/i18n/rtl.h"
++#include "base/i18n/unicodestring.h"
+ #include "base/strings/utf_string_conversions.h"
+ #include "base/test/icu_test_util.h"
+ #include "base/time/time.h"
+@@ -37,7 +38,7 @@ base::string16 GetShortTimeZone(const Time& time) {
+ zone_formatter->format(UTZFMT_STYLE_SPECIFIC_SHORT, *zone,
+ static_cast<UDate>(time.ToDoubleT() * 1000),
+ name, nullptr);
+- return base::string16(name.getBuffer(), name.length());
++ return i18n::UnicodeStringToString16(name);
+ }
+
+ #if defined(OS_ANDROID)
+diff --git a/base/i18n/timezone.cc b/base/i18n/timezone.cc
+index e881c9d680f8..95e7aee34c4c 100644
+--- a/base/i18n/timezone.cc
++++ b/base/i18n/timezone.cc
+@@ -610,9 +610,9 @@ std::string CountryCodeForCurrentTimezone() {
+ std::unique_ptr<icu::TimeZone> zone(icu::TimeZone::createDefault());
+ icu::UnicodeString id;
+ zone->getID(id);
+- string16 olson_code(id.getBuffer(), id.length());
++ std::string olson_code;
+ return TimezoneMap::GetInstance()->CountryCodeForTimezone(
+- UTF16ToUTF8(olson_code));
++ id.toUTF8String(olson_code));
+ }
+
+ } // namespace base
+diff --git a/base/i18n/unicodestring.h b/base/i18n/unicodestring.h
+new file mode 100644
+index 000000000000..b62c5264deb4
+--- /dev/null
++++ b/base/i18n/unicodestring.h
+@@ -0,0 +1,32 @@
++// Copyright (c) 2017 The Chromium Authors. All rights reserved.
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++#ifndef BASE_I18N_UNICODESTRING_H_
++#define BASE_I18N_UNICODESTRING_H_
++
++#include "base/strings/string16.h"
++#include "third_party/icu/source/common/unicode/unistr.h"
++#include "third_party/icu/source/common/unicode/uvernum.h"
++
++#if U_ICU_VERSION_MAJOR_NUM >= 59
++#include "third_party/icu/source/common/unicode/char16ptr.h"
++#endif
++
++namespace base {
++namespace i18n {
++
++inline string16 UnicodeStringToString16(const icu::UnicodeString& unistr) {
++#if U_ICU_VERSION_MAJOR_NUM >= 59
++ return base::string16(icu::toUCharPtr(unistr.getBuffer()),
++ static_cast<size_t>(unistr.length()));
++#else
++ return base::string16(unistr.getBuffer(),
++ static_cast<size_t>(unistr.length()));
++#endif
++}
++
++} // namespace i18n
++} // namespace base
++
++#endif // BASE_UNICODESTRING_H_
+diff --git a/chrome/browser/chromeos/system/timezone_util.cc b/chrome/browser/chromeos/system/timezone_util.cc
+index 6c41a052197a..d01f60e03b9f 100644
+--- a/chrome/browser/chromeos/system/timezone_util.cc
++++ b/chrome/browser/chromeos/system/timezone_util.cc
+@@ -11,6 +11,7 @@
+ #include <utility>
+
+ #include "base/i18n/rtl.h"
++#include "base/i18n/unicodestring.h"
+ #include "base/lazy_instance.h"
+ #include "base/memory/ptr_util.h"
+ #include "base/strings/string_util.h"
+@@ -77,7 +78,7 @@ base::string16 GetExemplarCity(const icu::TimeZone& zone) {
+ if (!U_FAILURE(status)) {
+ city = icu::ures_getUnicodeStringByKey(zone_item.get(), "ec", &status);
+ if (U_SUCCESS(status))
+- return base::string16(city.getBuffer(), city.length());
++ return base::i18n::UnicodeStringToString16(city);
+ }
+
+ // Fallback case in case of failure.
+@@ -135,8 +136,7 @@ base::string16 GetTimezoneName(const icu::TimeZone& timezone) {
+ }
+ base::string16 result(l10n_util::GetStringFUTF16(
+ IDS_OPTIONS_SETTINGS_TIMEZONE_DISPLAY_TEMPLATE,
+- base::ASCIIToUTF16(offset_str),
+- base::string16(name.getBuffer(), name.length()),
++ base::ASCIIToUTF16(offset_str), base::i18n::UnicodeStringToString16(name),
+ GetExemplarCity(timezone)));
+ base::i18n::AdjustStringForLocaleDirection(&result);
+ return result;
+diff --git a/chrome/browser/ui/webui/md_downloads/downloads_list_tracker.cc b/chrome/browser/ui/webui/md_downloads/downloads_list_tracker.cc
+index caf07f69197c..38ed53586d6a 100644
+--- a/chrome/browser/ui/webui/md_downloads/downloads_list_tracker.cc
++++ b/chrome/browser/ui/webui/md_downloads/downloads_list_tracker.cc
+@@ -9,6 +9,7 @@
+ #include "base/bind.h"
+ #include "base/bind_helpers.h"
+ #include "base/i18n/rtl.h"
++#include "base/i18n/unicodestring.h"
+ #include "base/strings/string16.h"
+ #include "base/strings/string_number_conversions.h"
+ #include "base/time/time.h"
+@@ -74,8 +75,7 @@ base::string16 TimeFormatLongDate(const base::Time& time) {
+ icu::DateFormat::createDateInstance(icu::DateFormat::kLong));
+ icu::UnicodeString date_string;
+ formatter->format(static_cast<UDate>(time.ToDoubleT() * 1000), date_string);
+- return base::string16(date_string.getBuffer(),
+- static_cast<size_t>(date_string.length()));
++ return base::i18n::UnicodeStringToString16(date_string);
+ }
+
+ } // namespace
+diff --git a/chromeos/settings/timezone_settings.cc b/chromeos/settings/timezone_settings.cc
+index 38ea65d653ac..63aa4c02f260 100644
+--- a/chromeos/settings/timezone_settings.cc
++++ b/chromeos/settings/timezone_settings.cc
+@@ -12,6 +12,7 @@
+ #include "base/bind.h"
+ #include "base/files/file_path.h"
+ #include "base/files/file_util.h"
++#include "base/i18n/unicodestring.h"
+ #include "base/location.h"
+ #include "base/logging.h"
+ #include "base/macros.h"
+@@ -478,8 +479,7 @@ TimezoneSettings* TimezoneSettings::GetInstance() {
+ // static
+ base::string16 TimezoneSettings::GetTimezoneID(const icu::TimeZone& timezone) {
+ icu::UnicodeString id;
+- timezone.getID(id);
+- return base::string16(id.getBuffer(), id.length());
++ return base::i18n::UnicodeStringToString16(timezone.getID(id));
+ }
+
+ } // namespace system
+diff --git a/components/autofill/core/browser/autofill_profile_comparator.cc b/components/autofill/core/browser/autofill_profile_comparator.cc
+index edfe2450d679..227a5901c683 100644
+--- a/components/autofill/core/browser/autofill_profile_comparator.cc
++++ b/components/autofill/core/browser/autofill_profile_comparator.cc
+@@ -9,6 +9,7 @@
+
+ #include "base/i18n/case_conversion.h"
+ #include "base/i18n/char_iterator.h"
++#include "base/i18n/unicodestring.h"
+ #include "base/strings/string_piece.h"
+ #include "base/strings/string_split.h"
+ #include "base/strings/string_util.h"
+@@ -128,7 +129,7 @@ base::string16 AutofillProfileComparator::NormalizeForComparison(
+
+ icu::UnicodeString value = icu::UnicodeString(result.data(), result.length());
+ transliterator_->transliterate(value);
+- return base::string16(value.getBuffer(), value.length());
++ return base::i18n::UnicodeStringToString16(value);
+ }
+
+ bool AutofillProfileComparator::AreMergeable(const AutofillProfile& p1,
+diff --git a/components/autofill/core/browser/credit_card.cc b/components/autofill/core/browser/credit_card.cc
+index 75a34c75a260..76867e0391c2 100644
+--- a/components/autofill/core/browser/credit_card.cc
++++ b/components/autofill/core/browser/credit_card.cc
+@@ -12,6 +12,8 @@
+ #include <string>
+
+ #include "base/guid.h"
++#include "base/i18n/time_formatting.h"
++#include "base/i18n/unicodestring.h"
+ #include "base/logging.h"
+ #include "base/macros.h"
+ #include "base/metrics/histogram_macros.h"
+@@ -806,7 +808,8 @@ bool CreditCard::ConvertMonth(const base::string16& month,
+ int32_t num_months;
+ const icu::UnicodeString* months = date_format_symbols.getMonths(num_months);
+ for (int32_t i = 0; i < num_months; ++i) {
+- const base::string16 icu_month(months[i].getBuffer(), months[i].length());
++ const base::string16 icu_month(
++ base::i18n::UnicodeStringToString16(months[i]));
+ if (compare.StringsEqual(icu_month, month)) {
+ *num = i + 1; // Adjust from 0-indexed to 1-indexed.
+ return true;
+@@ -819,7 +822,7 @@ bool CreditCard::ConvertMonth(const base::string16& month,
+ base::string16 trimmed_month;
+ base::TrimString(month, ASCIIToUTF16("."), &trimmed_month);
+ for (int32_t i = 0; i < num_months; ++i) {
+- base::string16 icu_month(months[i].getBuffer(), months[i].length());
++ base::string16 icu_month(base::i18n::UnicodeStringToString16(months[i]));
+ base::TrimString(icu_month, ASCIIToUTF16("."), &icu_month);
+ if (compare.StringsEqual(icu_month, trimmed_month)) {
+ *num = i + 1; // Adjust from 0-indexed to 1-indexed.
+diff --git a/content/browser/android/date_time_chooser_android.cc b/content/browser/android/date_time_chooser_android.cc
+index ba20ad53bd5c..28b6d03344f0 100644
+--- a/content/browser/android/date_time_chooser_android.cc
++++ b/content/browser/android/date_time_chooser_android.cc
+@@ -9,6 +9,7 @@
+ #include "base/android/jni_android.h"
+ #include "base/android/jni_string.h"
+ #include "base/i18n/char_iterator.h"
++#include "base/i18n/unicodestring.h"
+ #include "content/common/date_time_suggestion.h"
+ #include "content/common/view_messages.h"
+ #include "content/public/browser/render_view_host.h"
+@@ -36,8 +37,7 @@ base::string16 SanitizeSuggestionString(const base::string16& string) {
+ sanitized.append(c);
+ sanitized_iterator.Advance();
+ }
+- return base::string16(sanitized.getBuffer(),
+- static_cast<size_t>(sanitized.length()));
++ return base::i18n::UnicodeStringToString16(sanitized);
+ }
+
+ } // namespace
+diff --git a/content/renderer/android/email_detector.cc b/content/renderer/android/email_detector.cc
+index 564f3417305f..1a0db8b07a85 100644
+--- a/content/renderer/android/email_detector.cc
++++ b/content/renderer/android/email_detector.cc
+@@ -62,8 +62,8 @@ bool EmailDetector::FindContent(const base::string16::const_iterator& begin,
+ DCHECK(U_SUCCESS(status));
+ icu::UnicodeString content_ustr(matcher->group(status));
+ DCHECK(U_SUCCESS(status));
+- base::UTF16ToUTF8(content_ustr.getBuffer(), content_ustr.length(),
+- content_text);
++ content_text->clear();
++ content_ustr.toUTF8String(*content_text);
+ return true;
+ }
+
+diff --git a/ios/chrome/browser/notification_promo_unittest.cc b/ios/chrome/browser/notification_promo_unittest.cc
+index 830d9c5f65a0..d5356e8e6dcb 100644
+--- a/ios/chrome/browser/notification_promo_unittest.cc
++++ b/ios/chrome/browser/notification_promo_unittest.cc
+@@ -34,18 +34,14 @@ bool YearFromNow(double* date_epoch, std::string* date_string) {
+ UErrorCode status = U_ZERO_ERROR;
+ icu::SimpleDateFormat simple_formatter(icu::UnicodeString(kDateFormat),
+ icu::Locale("en_US"), status);
+- if (!U_SUCCESS(status))
+- return false;
+-
+ icu::UnicodeString date_unicode_string;
+ simple_formatter.format(static_cast<UDate>(*date_epoch * 1000),
+ date_unicode_string, status);
+- if (!U_SUCCESS(status))
++ if (U_FAILURE(status))
+ return false;
+
+- return base::UTF16ToUTF8(date_unicode_string.getBuffer(),
+- static_cast<size_t>(date_unicode_string.length()),
+- date_string);
++ date_unicode_string.toUTF8String(*date_string);
++ return true;
+ }
+
+ } // namespace
+diff --git a/net/ftp/ftp_util.cc b/net/ftp/ftp_util.cc
+index 00b23b7c10b7..e9331ab3818b 100644
+--- a/net/ftp/ftp_util.cc
++++ b/net/ftp/ftp_util.cc
+@@ -9,6 +9,7 @@
+
+ #include "base/i18n/case_conversion.h"
+ #include "base/i18n/char_iterator.h"
++#include "base/i18n/unicodestring.h"
+ #include "base/logging.h"
+ #include "base/macros.h"
+ #include "base/memory/singleton.h"
+@@ -175,8 +176,8 @@ class AbbreviatedMonthsMap {
+ format_symbols.getShortMonths(months_count);
+
+ for (int32_t month = 0; month < months_count; month++) {
+- base::string16 month_name(months[month].getBuffer(),
+- static_cast<size_t>(months[month].length()));
++ base::string16 month_name(
++ base::i18n::UnicodeStringToString16(months[month]));
+
+ // Ignore the case of the month names. The simplest way to handle that
+ // is to make everything lowercase.
+diff --git a/third_party/WebKit/Source/core/html/forms/EmailInputType.cpp b/third_party/WebKit/Source/core/html/forms/EmailInputType.cpp
+index 07d10a31ffde..4dab06aa19a5 100644
+--- a/third_party/WebKit/Source/core/html/forms/EmailInputType.cpp
++++ b/third_party/WebKit/Source/core/html/forms/EmailInputType.cpp
+@@ -23,6 +23,9 @@
+
+ #include "core/html/forms/EmailInputType.h"
+
++#include <unicode/idna.h>
++#include <unicode/unistr.h>
++#include <unicode/uvernum.h>
+ #include "bindings/core/v8/ScriptRegexp.h"
+ #include "core/InputTypeNames.h"
+ #include "core/html/HTMLInputElement.h"
+@@ -31,8 +34,10 @@
+ #include "platform/text/PlatformLocale.h"
+ #include "public/platform/Platform.h"
+ #include "wtf/text/StringBuilder.h"
+-#include <unicode/idna.h>
+-#include <unicode/unistr.h>
++
++#if U_ICU_VERSION_MAJOR_NUM >= 59
++#include <unicode/char16ptr.h>
++#endif
+
+ namespace blink {
+
+@@ -87,7 +92,11 @@ String EmailInputType::convertEmailAddressToASCII(const ScriptRegexp& regexp,
+
+ StringBuilder builder;
+ builder.append(address, 0, atPosition + 1);
++#if U_ICU_VERSION_MAJOR_NUM >= 59
++ builder.append(icu::toUCharPtr(domainName.getBuffer()), domainName.length());
++#else
+ builder.append(domainName.getBuffer(), domainName.length());
++#endif
+ String asciiEmail = builder.toString();
+ return isValidEmailAddress(regexp, asciiEmail) ? asciiEmail : address;
+ }
+diff --git a/third_party/sfntly/src/cpp/src/sample/chromium/subsetter_impl.cc b/third_party/sfntly/src/cpp/src/sample/chromium/subsetter_impl.cc
+index c53e607..17452e1 100644
+--- a/third_party/sfntly/src/cpp/src/sample/chromium/subsetter_impl.cc
++++ b/third_party/sfntly/src/cpp/src/sample/chromium/subsetter_impl.cc
+@@ -23,6 +23,8 @@
+ #include <map>
+ #include <set>
+
++#include <unicode/unistr.h>
++
+ #include "sfntly/table/bitmap/eblc_table.h"
+ #include "sfntly/table/bitmap/ebdt_table.h"
+ #include "sfntly/table/bitmap/index_sub_table.h"
+--
+2.14.3
diff --git a/dev-util/electron/files/chromium-icu-60-r0.patch b/dev-util/electron/files/chromium-icu-60-r0.patch
new file mode 100644
index 000000000000..f6f98497ba09
--- /dev/null
+++ b/dev-util/electron/files/chromium-icu-60-r0.patch
@@ -0,0 +1,66 @@
+From 020c458932087a7da9b514563c3926be5a406d55 Mon Sep 17 00:00:00 2001
+From: Jungshik Shin <jshin@chromium.org>
+Date: Mon, 4 Dec 2017 09:42:01 -0500
+Subject: [PATCH] Disallow 5 aspirational scripts in IDN display
+
+UTS 31 (http://www.unicode.org/reports/tr31/#Aspirational_Use_Scripts )
+used to list 5 scripts in Table 6 as 'aspirational scripts', but it
+deprecated the category and moved 5 scripts to Table 7 for limited use
+scripts.
+
+Given this, there's no basis to treat those 5 scripts differently from
+other limited use scripts. Note that Mozilla stopped allowding those 5
+scripts in IDN display a while ago.
+
+This is also necessary for updating ICU to version 60.
+---
+ components/url_formatter/url_formatter.cc | 33 -------------------------------
+ 1 file changed, 33 deletions(-)
+
+diff --git a/components/url_formatter/url_formatter.cc b/components/url_formatter/url_formatter.cc
+index a93bf1154c..6b000c3480 100644
+--- a/components/url_formatter/url_formatter.cc
++++ b/components/url_formatter/url_formatter.cc
+@@ -426,39 +426,6 @@ void IDNSpoofChecker::SetAllowedUnicodeSet(UErrorCode* status) {
+ const icu::UnicodeSet* inclusion_set = uspoof_getInclusionUnicodeSet(status);
+ allowed_set.addAll(*inclusion_set);
+
+- // Five aspirational scripts are taken from UTR 31 Table 6 at
+- // http://www.unicode.org/reports/tr31/#Aspirational_Use_Scripts .
+- // Not all the characters of aspirational scripts are suitable for
+- // identifiers. Therefore, only characters belonging to
+- // [:Identifier_Type=Aspirational:] (listed in 'Status/Type=Aspirational'
+- // section at
+- // http://www.unicode.org/Public/security/latest/xidmodifications.txt) are
+- // are added to the allowed set. The list has to be updated when a new
+- // version of Unicode is released. The current version is 9.0.0 and ICU 60
+- // will have Unicode 10.0 data.
+-#if U_ICU_VERSION_MAJOR_NUM < 60
+- const icu::UnicodeSet aspirational_scripts(
+- icu::UnicodeString(
+- // Unified Canadian Syllabics
+- "[\\u1401-\\u166C\\u166F-\\u167F"
+- // Mongolian
+- "\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA"
+- // Unified Canadian Syllabics
+- "\\u18B0-\\u18F5"
+- // Tifinagh
+- "\\u2D30-\\u2D67\\u2D7F"
+- // Yi
+- "\\uA000-\\uA48C"
+- // Miao
+- "\\U00016F00-\\U00016F44\\U00016F50-\\U00016F7E"
+- "\\U00016F8F-\\U00016F9F]",
+- -1, US_INV),
+- *status);
+- allowed_set.addAll(aspirational_scripts);
+-#else
+-#error "Update aspirational_scripts per Unicode 10.0"
+-#endif
+-
+ // U+0338 is included in the recommended set, while U+05F4 and U+2027 are in
+ // the inclusion set. However, they are blacklisted as a part of Mozilla's
+ // IDN blacklist (http://kb.mozillazine.org/Network.IDN.blacklist_chars).
+--
+2.14.3
+
diff --git a/dev-util/electron/files/chromium-python3-compat-r0.patch b/dev-util/electron/files/chromium-python3-compat-r0.patch
new file mode 100644
index 000000000000..d91ea8a4c1b1
--- /dev/null
+++ b/dev-util/electron/files/chromium-python3-compat-r0.patch
@@ -0,0 +1,34 @@
+diff --git a/v8/gypfiles/detect_v8_host_arch.py b/v8/gypfiles/detect_v8_host_arch.py
+index 89e8286..cc61946 100644
+--- a/v8/gypfiles/detect_v8_host_arch.py
++++ b/v8/gypfiles/detect_v8_host_arch.py
+@@ -28,13 +28,15 @@
+
+ """Outputs host CPU architecture in format recognized by gyp."""
+
++from __future__ import print_function
++
+ import platform
+ import re
+ import sys
+
+
+ def main():
+- print DoMain([])
++ print(DoMain([]))
+ return 0
+
+ def DoMain(_):
+diff --git a/v8/gypfiles/toolchain.gypi b/v8/gypfiles/toolchain.gypi
+index 95eb1d9..1ec652a 100644
+--- a/v8/gypfiles/toolchain.gypi
++++ b/v8/gypfiles/toolchain.gypi
+@@ -40,7 +40,7 @@
+ 'has_valgrind%': 0,
+ 'coverage%': 0,
+ 'v8_target_arch%': '<(target_arch)',
+- 'v8_host_byteorder%': '<!(python -c "import sys; print sys.byteorder")',
++ 'v8_host_byteorder%': '<!(python -c "from __future__ import print_function; import sys; print(sys.byteorder)")',
+ 'force_dynamic_crt%': 0,
+
+ # Setting 'v8_can_use_vfp32dregs' to 'true' will cause V8 to use the VFP
diff --git a/dev-util/electron/files/chromium-shared-v8-r2.patch b/dev-util/electron/files/chromium-shared-v8-r2.patch
index 475da8193a92..82d87d48d9fc 100644
--- a/dev-util/electron/files/chromium-shared-v8-r2.patch
+++ b/dev-util/electron/files/chromium-shared-v8-r2.patch
@@ -1,79 +1,19 @@
-diff --git a/v8/BUILD.gn.orig b/v8/BUILD.gn
-index 8587356..4365e03 100644
---- a/v8/BUILD.gn
-+++ b/v8/BUILD.gn
-@@ -113,7 +113,7 @@ config("internal_config") {
-
- include_dirs = [ "." ]
-
-- if (is_component_build) {
-+ if (is_component_build || is_electron_build) {
- defines = [ "BUILDING_V8_SHARED" ]
- }
- }
-@@ -127,14 +127,14 @@ config("internal_config_base") {
- # This config should be applied to code using the libplatform.
- config("libplatform_config") {
- include_dirs = [ "include" ]
-- if (is_component_build) {
-+ if (is_component_build || is_electron_build) {
- defines = [ "USING_V8_PLATFORM_SHARED" ]
- }
+diff --git a/v8/gni/v8.gni.orig b/v8/gni/v8.gni
+index 264c1de..df17239 100644
+--- a/v8/gni/v8.gni.orig
++++ b/v8/gni/v8.gni
+@@ -114,13 +114,7 @@ template("v8_executable") {
}
- # This config should be applied to code using the libbase.
- config("libbase_config") {
-- if (is_component_build) {
-+ if (is_component_build || is_electron_build) {
- defines = [ "USING_V8_BASE_SHARED" ]
- }
- libs = []
-@@ -151,7 +151,7 @@ config("libsampler_config") {
- # This config should only be applied to code using V8 and not any V8 code
- # itself.
- config("external_config") {
-- if (is_component_build) {
-+ if (is_component_build || is_electron_build) {
- defines = [ "USING_V8_SHARED" ]
- }
- include_dirs = [ "include" ]
-@@ -2265,7 +2265,7 @@ v8_component("v8_libbase") {
-
- defines = []
-
-- if (is_component_build) {
-+ if (is_component_build || is_electron_build) {
- defines = [ "BUILDING_V8_BASE_SHARED" ]
- }
-
-@@ -2355,7 +2355,7 @@ v8_component("v8_libplatform") {
-
- configs = [ ":internal_config_base" ]
-
-- if (is_component_build) {
-+ if (is_component_build || is_electron_build) {
- defines = [ "BUILDING_V8_PLATFORM_SHARED" ]
- }
-
-@@ -2498,7 +2498,7 @@ group("gn_all") {
- }
- }
-
--if (is_component_build) {
-+if (is_component_build || is_electron_build) {
- v8_component("v8") {
- sources = [
- "src/v8dll-main.cc",
-diff --git a/v8/src/inspector/BUILD.gn b/v8/src/inspector/BUILD.gn
-index 6ebb91c..b6a2489 100644
---- a/v8/src/inspector/BUILD.gn
-+++ b/v8/src/inspector/BUILD.gn
-@@ -106,7 +106,7 @@ config("inspector_config") {
- "/wd4996", # Deprecated function call.
- ]
- }
-- if (is_component_build) {
-+ if (is_component_build || is_electron_build) {
- defines = [ "BUILDING_V8_SHARED" ]
- }
- }
+ template("v8_component") {
+- if (is_electron_build && !is_component_build &&
+- (target_name == "v8_libbase" || target_name == "v8_libplatform")) {
+- v8_component = "source_set"
+- } else {
+- v8_component = component_electron
+- }
+- target(v8_component, target_name) {
++ component(target_name) {
+ forward_variables_from(invoker, "*", [ "configs" ])
+ configs += invoker.configs
+ configs -= v8_remove_configs
diff --git a/dev-util/electron/files/chromium-system-icu-r0.patch b/dev-util/electron/files/chromium-system-icu-r0.patch
new file mode 100644
index 000000000000..484a1974e812
--- /dev/null
+++ b/dev-util/electron/files/chromium-system-icu-r0.patch
@@ -0,0 +1,140 @@
+From 520c62f2b87a42bf4f8f8820f6bcde15e342fe4a Mon Sep 17 00:00:00 2001
+From: floppymaster <floppymaster@gmail.com>
+Date: Mon, 12 Jun 2017 09:44:54 -0700
+Subject: [PATCH] ICU unbundling fixes
+
+Update instructions to generate ICU header lists
+Update header list for unbundling ICU 59
+
+Bug: https://bugs.gentoo.org/619796#c2
+Review-Url: https://codereview.chromium.org/2935603002
+Cr-Commit-Position: refs/heads/master@{#478662}
+---
+ build/linux/unbundle/icu.gn | 29 +++++++++++++++++------------
+ 1 file changed, 17 insertions(+), 12 deletions(-)
+
+diff --git a/build/linux/unbundle/icu.gn b/build/linux/unbundle/icu.gn
+index f3734b7a01a3..5bdd91555df7 100644
+--- a/build/linux/unbundle/icu.gn
++++ b/build/linux/unbundle/icu.gn
+@@ -16,6 +16,7 @@ config("icu_config") {
+ defines = [
+ "USING_SYSTEM_ICU=1",
+ "ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC",
++ "UCHAR_TYPE=uint16_t",
+ ]
+ }
+
+@@ -50,10 +51,9 @@ source_set("icuuc") {
+ shim_headers("icui18n_shim") {
+ root_path = "source/i18n"
+ headers = [
+- # This list can easily be updated using the command below:
+- # find third_party/icu/source/i18n/unicode \
+- # -iname '*.h' -printf '"%p",\n' | \
+- # sed -e 's|third_party/icu/i18n/common/||' | sort -u
++ # This list can easily be updated using the commands below:
++ # cd third_party/icu/source/i18n
++ # find unicode -iname '*.h' -printf ' "%p",\n' | LC_ALL=C sort -u
+ "unicode/alphaindex.h",
+ "unicode/basictz.h",
+ "unicode/calendar.h",
+@@ -78,7 +78,6 @@ shim_headers("icui18n_shim") {
+ "unicode/fpositer.h",
+ "unicode/gender.h",
+ "unicode/gregocal.h",
+- "unicode/locdspnm.h",
+ "unicode/measfmt.h",
+ "unicode/measunit.h",
+ "unicode/measure.h",
+@@ -113,15 +112,12 @@ shim_headers("icui18n_shim") {
+ "unicode/ucol.h",
+ "unicode/ucoleitr.h",
+ "unicode/ucsdet.h",
+- "unicode/ucurr.h",
+ "unicode/udat.h",
+ "unicode/udateintervalformat.h",
+ "unicode/udatpg.h",
+- "unicode/udisplaycontext.h",
+ "unicode/ufieldpositer.h",
+ "unicode/uformattable.h",
+ "unicode/ugender.h",
+- "unicode/uldnames.h",
+ "unicode/ulocdata.h",
+ "unicode/umsg.h",
+ "unicode/unirepl.h",
+@@ -130,6 +126,7 @@ shim_headers("icui18n_shim") {
+ "unicode/upluralrules.h",
+ "unicode/uregex.h",
+ "unicode/uregion.h",
++ "unicode/ureldatefmt.h",
+ "unicode/usearch.h",
+ "unicode/uspoof.h",
+ "unicode/utmscale.h",
+@@ -141,20 +138,22 @@ shim_headers("icui18n_shim") {
+ shim_headers("icuuc_shim") {
+ root_path = "source/common"
+ headers = [
+- # This list can easily be updated using the command below:
+- # find third_party/icu/source/common/unicode \
+- # -iname '*.h' -printf '"%p",\n' | \
+- # sed -e 's|third_party/icu/source/common/||' | sort -u
++ # This list can easily be updated using the commands below:
++ # cd third_party/icu/source/common
++ # find unicode -iname '*.h' -printf ' "%p",\n' | LC_ALL=C sort -u
+ "unicode/appendable.h",
+ "unicode/brkiter.h",
+ "unicode/bytestream.h",
+ "unicode/bytestrie.h",
+ "unicode/bytestriebuilder.h",
+ "unicode/caniter.h",
++ "unicode/casemap.h",
++ "unicode/char16ptr.h",
+ "unicode/chariter.h",
+ "unicode/dbbi.h",
+ "unicode/docmain.h",
+ "unicode/dtintrv.h",
++ "unicode/edits.h",
+ "unicode/enumset.h",
+ "unicode/errorcode.h",
+ "unicode/filteredbrk.h",
+@@ -163,6 +162,7 @@ shim_headers("icuuc_shim") {
+ "unicode/idna.h",
+ "unicode/listformatter.h",
+ "unicode/localpointer.h",
++ "unicode/locdspnm.h",
+ "unicode/locid.h",
+ "unicode/messagepattern.h",
+ "unicode/normalizer2.h",
+@@ -176,12 +176,14 @@ shim_headers("icuuc_shim") {
+ "unicode/rep.h",
+ "unicode/resbund.h",
+ "unicode/schriter.h",
++ "unicode/simpleformatter.h",
+ "unicode/std_string.h",
+ "unicode/strenum.h",
+ "unicode/stringpiece.h",
+ "unicode/stringtriebuilder.h",
+ "unicode/symtable.h",
+ "unicode/ubidi.h",
++ "unicode/ubiditransform.h",
+ "unicode/ubrk.h",
+ "unicode/ucasemap.h",
+ "unicode/ucat.h",
+@@ -195,10 +197,13 @@ shim_headers("icuuc_shim") {
+ "unicode/ucnv_err.h",
+ "unicode/ucnvsel.h",
+ "unicode/uconfig.h",
++ "unicode/ucurr.h",
+ "unicode/udata.h",
++ "unicode/udisplaycontext.h",
+ "unicode/uenum.h",
+ "unicode/uidna.h",
+ "unicode/uiter.h",
++ "unicode/uldnames.h",
+ "unicode/ulistformatter.h",
+ "unicode/uloc.h",
+ "unicode/umachine.h",
+--
+2.14.3
+
diff --git a/dev-util/electron/files/chromium-v8-icu-59-r0.patch b/dev-util/electron/files/chromium-v8-icu-59-r0.patch
new file mode 100644
index 000000000000..d963db9db93b
--- /dev/null
+++ b/dev-util/electron/files/chromium-v8-icu-59-r0.patch
@@ -0,0 +1,83 @@
+From fd5b3e755df541b44128caed625215017ef59989 Mon Sep 17 00:00:00 2001
+From: jshin <jshin@chromium.org>
+Date: Thu, 9 Mar 2017 12:01:15 -0800
+Subject: [PATCH] Prepare for ICU's switch to char16_t
+
+ICU's UChar was uint16_t (non-Win) or wchar_t (Windows). It's switching
+to char16_t in both C/C++ API. It needs some changes. Fortunately,
+v8 needs only a couple of changes because v8 has been using
+reinterpret_cast in many places calling ICU API.
+
+This change was confirmed to work fine with ICU-59-to-be.
+
+BUG=v8:6062
+TEST=trybot
+
+Review-Url: https://codereview.chromium.org/2738503008
+Cr-Commit-Position: refs/heads/master@{#43707}
+---
+ src/i18n.cc | 12 +++++++++++-
+ src/runtime/runtime-i18n.cc | 10 ++++++----
+ 2 files changed, 17 insertions(+), 5 deletions(-)
+
+diff --git a/v8/src/i18n.cc b/v8/src/i18n.cc
+index d2245ef34a9..7c22871ff5e 100644
+--- a/v8/src/i18n.cc
++++ b/v8/src/i18n.cc
+@@ -30,8 +30,13 @@
+ #include "unicode/ucol.h"
+ #include "unicode/ucurr.h"
+ #include "unicode/unum.h"
++#include "unicode/uvernum.h"
+ #include "unicode/uversion.h"
+
++#if U_ICU_VERSION_MAJOR_NUM >= 59
++#include "unicode/char16ptr.h"
++#endif
++
+ namespace v8 {
+ namespace internal {
+
+@@ -270,8 +275,13 @@ icu::DecimalFormat* CreateICUNumberFormat(
+ }
+
+ UErrorCode status_digits = U_ZERO_ERROR;
++#if U_ICU_VERSION_MAJOR_NUM >= 59
+ uint32_t fraction_digits = ucurr_getDefaultFractionDigits(
+- currency.getTerminatedBuffer(), &status_digits);
++ icu::toUCharPtr(currency.getTerminatedBuffer()), &status_digits);
++#else
++ uint32_t fraction_digits = ucurr_getDefaultFractionDigits(
++ currency.getTerminatedBuffer(), &status_digits);
++#endif
+ if (U_SUCCESS(status_digits)) {
+ number_format->setMinimumFractionDigits(fraction_digits);
+ number_format->setMaximumFractionDigits(fraction_digits);
+diff --git a/v8/src/runtime/runtime-i18n.cc b/v8/src/runtime/runtime-i18n.cc
+index 0b453819146..e89175a37db 100644
+--- a/v8/src/runtime/runtime-i18n.cc
++++ b/v8/src/runtime/runtime-i18n.cc
+@@ -43,6 +43,7 @@
+ #include "unicode/uloc.h"
+ #include "unicode/unistr.h"
+ #include "unicode/unum.h"
++#include "unicode/ustring.h"
+ #include "unicode/uversion.h"
+
+
+@@ -609,10 +610,11 @@ RUNTIME_FUNCTION(Runtime_InternalCompare) {
+ String::FlatContent flat2 = string2->GetFlatContent();
+ std::unique_ptr<uc16[]> sap1;
+ std::unique_ptr<uc16[]> sap2;
+- const UChar* string_val1 = GetUCharBufferFromFlat(flat1, &sap1, length1);
+- const UChar* string_val2 = GetUCharBufferFromFlat(flat2, &sap2, length2);
+- result =
+- collator->compare(string_val1, length1, string_val2, length2, status);
++ icu::UnicodeString string_val1(
++ FALSE, GetUCharBufferFromFlat(flat1, &sap1, length1), length1);
++ icu::UnicodeString string_val2(
++ FALSE, GetUCharBufferFromFlat(flat2, &sap2, length2), length2);
++ result = collator->compare(string_val1, string_val2, status);
+ }
+ if (U_FAILURE(status)) return isolate->ThrowIllegalOperation();
+
diff --git a/dev-util/electron/files/electron-1.6.11-vendor-libchromiumcontent.patch b/dev-util/electron/files/electron-1.6.11-vendor-libchromiumcontent.patch
deleted file mode 100644
index d724e41f1fdb..000000000000
--- a/dev-util/electron/files/electron-1.6.11-vendor-libchromiumcontent.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-From 0a28ad879b544f73f74491ddd58646750335bf1d Mon Sep 17 00:00:00 2001
-From: Elvis Pranskevichus <elvis@magic.io>
-Date: Fri, 28 Apr 2017 17:22:38 -0400
-Subject: [PATCH] Gentoo build fixes
-
----
- chromiumcontent/BUILD.gn | 8 ++------
- chromiumcontent/build_libs.py | 2 +-
- script/create-dist | 4 ----
- script/lib/config.py | 2 +-
- 4 files changed, 4 insertions(+), 12 deletions(-)
-
-diff --git a/chromiumcontent/BUILD.gn b/chromiumcontent/BUILD.gn
-index e4e4166..25be865 100644
---- a/chromiumcontent/BUILD.gn
-+++ b/chromiumcontent/BUILD.gn
-@@ -343,12 +343,8 @@ if (is_electron_build && !is_component_build) {
- }
- }
-
-- static_library("v8") {
-- complete_static_lib = true
-- sources = []
-- if (defined(obj_v8)) {
-- sources += obj_v8
-- }
-+ shared_library("v8") {
-+ deps = [ "//v8:v8", "//v8:v8_libplatform" ]
- }
-
- } else {
-diff --git a/chromiumcontent/build_libs.py b/chromiumcontent/build_libs.py
-index e10f320..716c5f2 100644
---- a/chromiumcontent/build_libs.py
-+++ b/chromiumcontent/build_libs.py
-@@ -82,7 +82,7 @@ with open(args.out, 'w') as out:
- "third_party/usrsctp",
- "third_party/woff2",
- "third_party/zlib",
-- "tools",
-+ "tools/battor_agent",
- "ui",
- "url",
- ])
-diff --git a/script/create-dist b/script/create-dist
-index aec75e5..64c7401 100755
---- a/script/create-dist
-+++ b/script/create-dist
-@@ -45,7 +45,6 @@ COMPONENTS = ['static_library', 'shared_library']
- BINARIES = {
- 'all': [
- 'content_shell.pak',
-- 'icudtl.dat',
- 'natives_blob.bin',
- 'snapshot_blob.bin',
- os.path.join('gen', 'blink', 'public', 'resources', 'blink_image_resources_200_percent.pak'),
-@@ -59,7 +58,6 @@ BINARIES = {
- 'libffmpeg.dylib',
- ],
- 'linux': [
-- 'libffmpeg.so',
- ],
- 'win32': [
- 'd3dcompiler_47.dll',
-@@ -312,8 +310,6 @@ def main():
- copy_generated_sources(target_arch, component)
- copy_locales(target_arch, component)
-
-- copy_ffmpeg(target_arch)
-- copy_sources()
- generate_licenses()
- if not args.no_zip:
- create_zip(create_debug_archive)
-diff --git a/script/lib/config.py b/script/lib/config.py
-index 3455161..195b2a1 100644
---- a/script/lib/config.py
-+++ b/script/lib/config.py
-@@ -4,4 +4,4 @@ import os
-
-
- def get_output_dir(source_root, target_arch, component):
-- return os.path.join(source_root, 'src', 'out-' + target_arch, component)
-+ return os.environ.get('CHROMIUM_BUILD_DIR')
---
-2.13.3
-
diff --git a/dev-util/electron/files/electron-1.6.15-vendor-breakpad.patch b/dev-util/electron/files/electron-1.6.15-vendor-breakpad.patch
new file mode 100644
index 000000000000..15a60c6f1481
--- /dev/null
+++ b/dev-util/electron/files/electron-1.6.15-vendor-breakpad.patch
@@ -0,0 +1,223 @@
+From 6f067da77b786787c6a3c3253198b0516da79904 Mon Sep 17 00:00:00 2001
+From: Elvis Pranskevichus <elvis@magic.io>
+Date: Mon, 27 Nov 2017 17:26:03 -0500
+Subject: [PATCH] glibc-2.26 compatibility fix
+
+---
+ .../linux/dump_writer_common/ucontext_reader.cc | 30 +++++++++++-----------
+ .../linux/dump_writer_common/ucontext_reader.h | 10 ++++----
+ src/client/linux/handler/exception_handler.cc | 10 ++++----
+ src/client/linux/handler/exception_handler.h | 2 +-
+ .../linux/microdump_writer/microdump_writer.cc | 2 +-
+ .../linux/minidump_writer/minidump_writer.cc | 2 +-
+ 6 files changed, 28 insertions(+), 28 deletions(-)
+
+diff --git a/src/client/linux/dump_writer_common/ucontext_reader.cc b/src/client/linux/dump_writer_common/ucontext_reader.cc
+index c80724dd..93b4d9f8 100644
+--- a/src/client/linux/dump_writer_common/ucontext_reader.cc
++++ b/src/client/linux/dump_writer_common/ucontext_reader.cc
+@@ -40,15 +40,15 @@ namespace google_breakpad {
+
+ #if defined(__i386__)
+
+-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) {
+ return uc->uc_mcontext.gregs[REG_ESP];
+ }
+
+-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) {
+ return uc->uc_mcontext.gregs[REG_EIP];
+ }
+
+-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc,
++void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
+ const struct _libc_fpstate* fp) {
+ const greg_t* regs = uc->uc_mcontext.gregs;
+
+@@ -88,15 +88,15 @@ void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc,
+
+ #elif defined(__x86_64)
+
+-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) {
+ return uc->uc_mcontext.gregs[REG_RSP];
+ }
+
+-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) {
+ return uc->uc_mcontext.gregs[REG_RIP];
+ }
+
+-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc,
++void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
+ const struct _libc_fpstate* fpregs) {
+ const greg_t* regs = uc->uc_mcontext.gregs;
+
+@@ -145,15 +145,15 @@ void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc,
+
+ #elif defined(__ARM_EABI__)
+
+-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) {
+ return uc->uc_mcontext.arm_sp;
+ }
+
+-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) {
+ return uc->uc_mcontext.arm_pc;
+ }
+
+-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc) {
++void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc) {
+ out->context_flags = MD_CONTEXT_ARM_FULL;
+
+ out->iregs[0] = uc->uc_mcontext.arm_r0;
+@@ -184,15 +184,15 @@ void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc) {
+
+ #elif defined(__aarch64__)
+
+-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) {
+ return uc->uc_mcontext.sp;
+ }
+
+-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) {
+ return uc->uc_mcontext.pc;
+ }
+
+-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc,
++void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
+ const struct fpsimd_context* fpregs) {
+ out->context_flags = MD_CONTEXT_ARM64_FULL;
+
+@@ -210,15 +210,15 @@ void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc,
+
+ #elif defined(__mips__)
+
+-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) {
+ return uc->uc_mcontext.gregs[MD_CONTEXT_MIPS_REG_SP];
+ }
+
+-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) {
++uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) {
+ return uc->uc_mcontext.pc;
+ }
+
+-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc) {
++void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc) {
+ #if _MIPS_SIM == _ABI64
+ out->context_flags = MD_CONTEXT_MIPS64_FULL;
+ #elif _MIPS_SIM == _ABIO32
+diff --git a/src/client/linux/dump_writer_common/ucontext_reader.h b/src/client/linux/dump_writer_common/ucontext_reader.h
+index b6e77b4b..2369a9ad 100644
+--- a/src/client/linux/dump_writer_common/ucontext_reader.h
++++ b/src/client/linux/dump_writer_common/ucontext_reader.h
+@@ -41,21 +41,21 @@ namespace google_breakpad {
+
+ // Wraps platform-dependent implementations of accessors to ucontext structs.
+ struct UContextReader {
+- static uintptr_t GetStackPointer(const struct ucontext* uc);
++ static uintptr_t GetStackPointer(const ucontext_t* uc);
+
+- static uintptr_t GetInstructionPointer(const struct ucontext* uc);
++ static uintptr_t GetInstructionPointer(const ucontext_t* uc);
+
+ // Juggle a arch-specific ucontext into a minidump format
+ // out: the minidump structure
+ // info: the collection of register structures.
+ #if defined(__i386__) || defined(__x86_64)
+- static void FillCPUContext(RawContextCPU *out, const ucontext *uc,
++ static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
+ const struct _libc_fpstate* fp);
+ #elif defined(__aarch64__)
+- static void FillCPUContext(RawContextCPU *out, const ucontext *uc,
++ static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
+ const struct fpsimd_context* fpregs);
+ #else
+- static void FillCPUContext(RawContextCPU *out, const ucontext *uc);
++ static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc);
+ #endif
+ };
+
+diff --git a/src/client/linux/handler/exception_handler.cc b/src/client/linux/handler/exception_handler.cc
+index 148d61f9..9d53c11e 100644
+--- a/src/client/linux/handler/exception_handler.cc
++++ b/src/client/linux/handler/exception_handler.cc
+@@ -439,9 +439,9 @@ bool ExceptionHandler::HandleSignal(int sig, siginfo_t* info, void* uc) {
+ // Fill in all the holes in the struct to make Valgrind happy.
+ memset(&g_crash_context_, 0, sizeof(g_crash_context_));
+ memcpy(&g_crash_context_.siginfo, info, sizeof(siginfo_t));
+- memcpy(&g_crash_context_.context, uc, sizeof(struct ucontext));
++ memcpy(&g_crash_context_.context, uc, sizeof(ucontext_t));
+ #if defined(__aarch64__)
+- struct ucontext* uc_ptr = (struct ucontext*)uc;
++ ucontext_t* uc_ptr = (ucontext_t*)uc;
+ struct fpsimd_context* fp_ptr =
+ (struct fpsimd_context*)&uc_ptr->uc_mcontext.__reserved;
+ if (fp_ptr->head.magic == FPSIMD_MAGIC) {
+@@ -450,9 +450,9 @@ bool ExceptionHandler::HandleSignal(int sig, siginfo_t* info, void* uc) {
+ }
+ #elif !defined(__ARM_EABI__) && !defined(__mips__)
+ // FP state is not part of user ABI on ARM Linux.
+- // In case of MIPS Linux FP state is already part of struct ucontext
++ // In case of MIPS Linux FP state is already part of ucontext_t
+ // and 'float_state' is not a member of CrashContext.
+- struct ucontext* uc_ptr = (struct ucontext*)uc;
++ ucontext_t* uc_ptr = (ucontext_t*)uc;
+ if (uc_ptr->uc_mcontext.fpregs) {
+ memcpy(&g_crash_context_.float_state, uc_ptr->uc_mcontext.fpregs,
+ sizeof(g_crash_context_.float_state));
+@@ -476,7 +476,7 @@ bool ExceptionHandler::SimulateSignalDelivery(int sig) {
+ // ExceptionHandler::HandleSignal().
+ siginfo.si_code = SI_USER;
+ siginfo.si_pid = getpid();
+- struct ucontext context;
++ ucontext_t context;
+ getcontext(&context);
+ return HandleSignal(sig, &siginfo, &context);
+ }
+diff --git a/src/client/linux/handler/exception_handler.h b/src/client/linux/handler/exception_handler.h
+index 591c3108..846df772 100644
+--- a/src/client/linux/handler/exception_handler.h
++++ b/src/client/linux/handler/exception_handler.h
+@@ -191,7 +191,7 @@ class ExceptionHandler {
+ struct CrashContext {
+ siginfo_t siginfo;
+ pid_t tid; // the crashing thread.
+- struct ucontext context;
++ ucontext_t context;
+ #if !defined(__ARM_EABI__) && !defined(__mips__)
+ // #ifdef this out because FP state is not part of user ABI for Linux ARM.
+ // In case of MIPS Linux FP state is already part of struct
+diff --git a/src/client/linux/microdump_writer/microdump_writer.cc b/src/client/linux/microdump_writer/microdump_writer.cc
+index d459d9ec..759f432e 100644
+--- a/src/client/linux/microdump_writer/microdump_writer.cc
++++ b/src/client/linux/microdump_writer/microdump_writer.cc
+@@ -416,7 +416,7 @@ class MicrodumpWriter {
+
+ void* Alloc(unsigned bytes) { return dumper_->allocator()->Alloc(bytes); }
+
+- const struct ucontext* const ucontext_;
++ const ucontext_t* const ucontext_;
+ #if !defined(__ARM_EABI__) && !defined(__mips__)
+ const google_breakpad::fpstate_t* const float_state_;
+ #endif
+diff --git a/src/client/linux/minidump_writer/minidump_writer.cc b/src/client/linux/minidump_writer/minidump_writer.cc
+index f407caa7..407c1e32 100644
+--- a/src/client/linux/minidump_writer/minidump_writer.cc
++++ b/src/client/linux/minidump_writer/minidump_writer.cc
+@@ -1240,7 +1240,7 @@ class MinidumpWriter {
+ const int fd_; // File descriptor where the minidum should be written.
+ const char* path_; // Path to the file where the minidum should be written.
+
+- const struct ucontext* const ucontext_; // also from the signal handler
++ const ucontext_t* const ucontext_; // also from the signal handler
+ #if !defined(__ARM_EABI__) && !defined(__mips__)
+ const google_breakpad::fpstate_t* const float_state_; // ditto
+ #endif
+--
+2.14.3
+
diff --git a/dev-util/electron/files/electron-1.6.11-vendor-brightray.patch b/dev-util/electron/files/electron-1.6.15-vendor-brightray.patch
index a1a351195d00..6acf412173ec 100644
--- a/dev-util/electron/files/electron-1.6.11-vendor-brightray.patch
+++ b/dev-util/electron/files/electron-1.6.15-vendor-brightray.patch
@@ -1,15 +1,15 @@
-From 610ee2681f9532a13f63edf78aab55b1dcb8abf2 Mon Sep 17 00:00:00 2001
+From 055fb62fc58ef7027b444dd235bc4781effa30d7 Mon Sep 17 00:00:00 2001
From: Elvis Pranskevichus <elvis@magic.io>
-Date: Mon, 8 Feb 2016 15:14:58 -0500
-Subject: [PATCH] brightray build fixes
+Date: Mon, 2 Oct 2017 15:22:51 -0400
+Subject: [PATCH] Gentoo build fixes
---
- brightray.gyp | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++----
- brightray.gypi | 14 ++-----------
- 2 files changed, 64 insertions(+), 16 deletions(-)
+ brightray.gyp | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++-----
+ brightray.gypi | 14 ++-------
+ 2 files changed, 88 insertions(+), 19 deletions(-)
diff --git a/brightray.gyp b/brightray.gyp
-index e60d17a..37e5159 100644
+index e60d17a..79e0618 100644
--- a/brightray.gyp
+++ b/brightray.gyp
@@ -1,7 +1,7 @@
@@ -21,52 +21,59 @@ index e60d17a..37e5159 100644
},
'includes': [
'filenames.gypi',
-@@ -9,6 +9,10 @@
+@@ -9,6 +9,11 @@
'targets': [
{
'target_name': 'brightray',
+ 'dependencies': [
+ 'cups',
+ 'gconf',
++ 'icu',
+ ],
'type': 'static_library',
'include_dirs': [
'.',
-@@ -130,18 +134,30 @@
+@@ -130,18 +135,33 @@
}, {
'link_settings': {
'libraries': [
- # Link with ffmpeg.
- '<(libchromiumcontent_dir)/libffmpeg.so',
# Following libraries are required by libchromiumcontent:
++ '-lFLAC',
'-lasound',
++ '-lavcodec',
++ '-lavformat',
++ '-lavutil',
'-lcap',
- '-lcups',
- '-lrt',
+- '-lrt',
++ '-lcrypto',
'-ldl',
- '-lresolv',
+- '-lresolv',
++ '-lexpat',
'-lfontconfig',
'-lfreetype',
- '-lexpat',
-+ '-lre2',
-+ '-ljpeg',
-+ '-lsnappy',
+- '-lexpat',
+ '-lharfbuzz',
++ '-ljpeg',
++ '-lminizip',
+ '-lpng',
-+ '-lxml2',
-+ '-lxslt',
++ '-lre2',
++ '-lresolv',
++ '-lrt',
++ '-lsnappy',
++ '-lssl',
++ '-lvpx',
+ '-lwebp',
+ '-lwebpdemux',
-+ '-lavcodec',
-+ '-lavformat',
-+ '-lavutil',
-+ '-lvpx',
-+ '-lFLAC',
-+ '-lminizip',
++ '-lxml2',
++ '-lxslt',
++ '-lz',
],
},
}],
-@@ -390,5 +406,47 @@
+@@ -390,5 +410,64 @@
}], # OS=="win"
],
},
@@ -112,6 +119,23 @@ index e60d17a..37e5159 100644
+ }],
+ ],
+ },
++ {
++ 'target_name': 'icu',
++ 'type': 'none',
++ 'conditions': [
++ ['use_system_icu==1', {
++ 'direct_dependent_settings': {
++ 'link_settings': {
++ 'libraries': [
++ '-licui18n',
++ '-licuuc',
++ '-licudata',
++ ],
++ },
++ },
++ }],
++ ],
++ },
],
}
diff --git a/brightray.gypi b/brightray.gypi
@@ -159,5 +183,5 @@ index 064ae1a..95d6f14 100644
],
}], # OS=="linux"
--
-2.13.3
+2.14.3
diff --git a/dev-util/electron/files/electron-1.6.15-vendor-libchromiumcontent.patch b/dev-util/electron/files/electron-1.6.15-vendor-libchromiumcontent.patch
new file mode 100644
index 000000000000..9360646ff681
--- /dev/null
+++ b/dev-util/electron/files/electron-1.6.15-vendor-libchromiumcontent.patch
@@ -0,0 +1,202 @@
+From 0352e8df546c58b85e79714f77c616832c8c72ac Mon Sep 17 00:00:00 2001
+From: Elvis Pranskevichus <elvis@magic.io>
+Date: Fri, 28 Apr 2017 17:22:38 -0400
+Subject: [PATCH] Gentoo build fixes
+
+---
+ chromiumcontent/BUILD.gn | 9 +++------
+ chromiumcontent/build_libs.py | 2 +-
+ script/create-dist | 39 ++++++++++++++++++++++++++-------------
+ script/lib/config.py | 2 +-
+ 4 files changed, 31 insertions(+), 21 deletions(-)
+
+diff --git a/chromiumcontent/BUILD.gn b/chromiumcontent/BUILD.gn
+index e4e4166..f88fab3 100644
+--- a/chromiumcontent/BUILD.gn
++++ b/chromiumcontent/BUILD.gn
+@@ -343,12 +343,9 @@ if (is_electron_build && !is_component_build) {
+ }
+ }
+
+- static_library("v8") {
+- complete_static_lib = true
+- sources = []
+- if (defined(obj_v8)) {
+- sources += obj_v8
+- }
++ shared_library("v8") {
++ deps = [ "//v8:v8", "//v8:v8_libplatform" ]
++ ldflags = [ "-Wl,-rpath=\$ORIGIN/" ]
+ }
+
+ } else {
+diff --git a/chromiumcontent/build_libs.py b/chromiumcontent/build_libs.py
+index e10f320..716c5f2 100644
+--- a/chromiumcontent/build_libs.py
++++ b/chromiumcontent/build_libs.py
+@@ -82,7 +82,7 @@ with open(args.out, 'w') as out:
+ "third_party/usrsctp",
+ "third_party/woff2",
+ "third_party/zlib",
+- "tools",
++ "tools/battor_agent",
+ "ui",
+ "url",
+ ])
+diff --git a/script/create-dist b/script/create-dist
+index aec75e5..cf2f62c 100755
+--- a/script/create-dist
++++ b/script/create-dist
+@@ -45,7 +45,6 @@ COMPONENTS = ['static_library', 'shared_library']
+ BINARIES = {
+ 'all': [
+ 'content_shell.pak',
+- 'icudtl.dat',
+ 'natives_blob.bin',
+ 'snapshot_blob.bin',
+ os.path.join('gen', 'blink', 'public', 'resources', 'blink_image_resources_200_percent.pak'),
+@@ -59,7 +58,6 @@ BINARIES = {
+ 'libffmpeg.dylib',
+ ],
+ 'linux': [
+- 'libffmpeg.so',
+ ],
+ 'win32': [
+ 'd3dcompiler_47.dll',
+@@ -308,12 +306,11 @@ def main():
+
+ for component in COMPONENTS:
+ if args.component == 'all' or args.component == component:
+- copy_binaries(target_arch, component, create_debug_archive)
++ copy_binaries(target_arch, component, create_debug_archive,
++ args.system_icu)
+ copy_generated_sources(target_arch, component)
+ copy_locales(target_arch, component)
+
+- copy_ffmpeg(target_arch)
+- copy_sources()
+ generate_licenses()
+ if not args.no_zip:
+ create_zip(create_debug_archive)
+@@ -331,6 +328,8 @@ def parse_args():
+ help='static_library or shared_library or all')
+ parser.add_argument('--no_zip', action='store_true',
+ help='Do not create zip distribution')
++ parser.add_argument('--system-icu', action='store_true', dest='system_icu',
++ help='Use system icu.')
+ return parser.parse_args()
+
+
+@@ -355,15 +354,17 @@ def check_create_debug_archive(target_arch):
+ def copy_with_blacklist(target_arch, src, dest):
+ if os.path.basename(src) in ARCH_BLACKLIST[target_arch]:
+ return
+- shutil.copy2(src, dest)
++ link_or_copy(src, dest)
+
+
+-def copy_binaries(target_arch, component, create_debug_archive):
++def copy_binaries(target_arch, component, create_debug_archive, system_icu):
+ output_dir = get_output_dir(SOURCE_ROOT, target_arch, component)
+ target_dir = os.path.join(MAIN_DIR, component)
+ mkdir_p(target_dir)
+
+ binaries = BINARIES['all'] + BINARIES[TARGET_PLATFORM]
++ if not system_icu:
++ binaries.append('icudtl.dat')
+ if component == 'shared_library':
+ binaries += BINARIES_SHARED_LIBRARY[TARGET_PLATFORM]
+ for binary in binaries:
+@@ -371,7 +372,7 @@ def copy_binaries(target_arch, component, create_debug_archive):
+
+ # Copy all static libraries from chromiumcontent
+ for library in glob.glob(os.path.join(output_dir, 'obj', 'chromiumcontent', '*.' + STATIC_LIBRARY_SUFFIX)):
+- shutil.copy2(library, target_dir)
++ link_or_copy(library, target_dir)
+
+ if component == 'shared_library':
+ match = '*.{0}'.format(SHARED_LIBRARY_SUFFIX)
+@@ -396,7 +397,7 @@ def copy_binaries(target_arch, component, create_debug_archive):
+ for root, _, filenames in os.walk(output_dir):
+ for pdb in filenames:
+ if pdb.endswith('.pdb'):
+- shutil.copy2(os.path.join(root, pdb), target_dir)
++ link_or_copy(os.path.join(root, pdb), target_dir)
+
+ if TARGET_PLATFORM == 'linux':
+ if component == 'shared_library':
+@@ -433,7 +434,7 @@ def copy_binaries(target_arch, component, create_debug_archive):
+
+ ffmpeg_output_dir = get_output_dir(SOURCE_ROOT, target_arch, 'ffmpeg')
+ for binary in binaries:
+- shutil.copy2(os.path.join(ffmpeg_output_dir, binary), target_dir)
++ link_or_copy(os.path.join(ffmpeg_output_dir, binary), target_dir)
+
+
+ def copy_generated_sources(target_arch, component):
+@@ -452,7 +453,7 @@ def copy_locales(target_arch, component):
+ for src_file in glob.glob(os.path.join(src_dir, 'content_strings_*.pak')):
+ filename = os.path.basename(src_file)
+ new_name = re.sub('content_strings_', '', filename)
+- shutil.copy2(src_file, os.path.join(target_dir, new_name))
++ link_or_copy(src_file, os.path.join(target_dir, new_name))
+
+ def copy_sources():
+ for include_path in INCLUDE_DIRS:
+@@ -477,7 +478,7 @@ def copy_ffmpeg(target_arch):
+
+ target_dir = os.path.join(MAIN_DIR, 'ffmpeg')
+ mkdir_p(target_dir)
+- shutil.copy2(os.path.join(output_dir, binary), target_dir)
++ link_or_copy(os.path.join(output_dir, binary), target_dir)
+
+
+
+@@ -494,7 +495,7 @@ def copy_source_file(absolute_path, relative_to, destination):
+ relative_path = os.path.relpath(absolute_path, start=relative_to)
+ final_path = os.path.join(destination, relative_path)
+ mkdir_p(os.path.dirname(final_path))
+- shutil.copy2(absolute_path, final_path)
++ link_or_copy(absolute_path, final_path)
+
+
+ def copy_dir(relative_path, relative_to, destination):
+@@ -531,6 +532,7 @@ def link_binary_to_debug_file(objcopy, binfile, symfile, dirname):
+ def run_strip(target_arch, filename, create_debug_archive):
+ # Static libraries are not stripped because it would remove
+ # all the symbols in it.
++ return
+ if filename.endswith('.a'):
+ return
+
+@@ -620,6 +622,17 @@ def rm_rf(path):
+ raise
+
+
++def link_or_copy(src, dst):
++ if os.path.isfile(src):
++ if os.path.isdir(dst):
++ dst = os.path.join(dst, os.path.basename(src))
++ try:
++ os.link(src, dst)
++ except OSError:
++ shutil.copy2(src, dst)
++ else:
++ shutil.copy2(src, dst)
++
+ def safe_unlink(path):
+ try:
+ os.unlink(path)
+diff --git a/script/lib/config.py b/script/lib/config.py
+index 3455161..195b2a1 100644
+--- a/script/lib/config.py
++++ b/script/lib/config.py
+@@ -4,4 +4,4 @@ import os
+
+
+ def get_output_dir(source_root, target_arch, component):
+- return os.path.join(source_root, 'src', 'out-' + target_arch, component)
++ return os.environ.get('CHROMIUM_BUILD_DIR')
+--
+2.13.6
+
diff --git a/dev-util/electron/files/electron-1.6.11-vendor-node.patch b/dev-util/electron/files/electron-1.6.15-vendor-node.patch
index 2f931771f91a..43e7c098f3bf 100644
--- a/dev-util/electron/files/electron-1.6.11-vendor-node.patch
+++ b/dev-util/electron/files/electron-1.6.15-vendor-node.patch
@@ -1,30 +1,30 @@
-From fc6ba3a74ffa88b22435531d6522d934a52187e5 Mon Sep 17 00:00:00 2001
+From 672445004bafb94ea14cbb89c12c205c731eb288 Mon Sep 17 00:00:00 2001
From: Elvis Pranskevichus <elvis@magic.io>
Date: Wed, 10 Feb 2016 14:45:13 -0500
Subject: [PATCH] Build fixes
---
- lib/internal/bootstrap_node.js | 2 ++
- node.gyp | 9 +++++++++
- src/node_main.cc | 2 ++
- 3 files changed, 13 insertions(+)
+ lib/internal/bootstrap_node.js | 2 ++
+ node.gyp | 14 +++++++++-----
+ src/node_main.cc | 4 ++++
+ 3 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/lib/internal/bootstrap_node.js b/lib/internal/bootstrap_node.js
-index 085ea00fd0..cb49fc87a7 100644
+index aee7261f23..b921843643 100644
--- a/lib/internal/bootstrap_node.js
+++ b/lib/internal/bootstrap_node.js
-@@ -40,7 +40,9 @@
+@@ -39,7 +39,9 @@
setupGlobalConsole();
}
-+ if (!process.env.ELECTRON_NODE_DISABLE_ASAR_SUPPORT) {
++ if (!process.env._ELECTRON_BUILD_NO_ASAR) {
setupAsarSupport();
+ }
const _process = NativeModule.require('internal/process');
diff --git a/node.gyp b/node.gyp
-index 95f24933fc..1434904324 100644
+index c0bc2d7d4c..e5920f6a33 100644
--- a/node.gyp
+++ b/node.gyp
@@ -17,6 +17,7 @@
@@ -35,7 +35,7 @@ index 95f24933fc..1434904324 100644
'node_v8_options%': '',
'node_enable_v8_vtunejit%': 'false',
'node_core_target_name%': 'node',
-@@ -133,6 +134,7 @@
+@@ -146,6 +147,7 @@
],
'include_dirs': [
@@ -43,7 +43,7 @@ index 95f24933fc..1434904324 100644
'src',
'tools/msvs/genfiles',
'deps/uv/src/ares',
-@@ -238,6 +240,13 @@
+@@ -261,6 +263,13 @@
'V8_DEPRECATION_WARNINGS=1',
],
@@ -57,11 +57,23 @@ index 95f24933fc..1434904324 100644
'conditions': [
[ 'node_shared=="false"', {
+@@ -950,11 +959,6 @@
+ }]
+ ]
+ }],
+- [ 'node_use_v8_platform=="true"', {
+- 'dependencies': [
+- 'deps/v8/src/v8.gyp:v8_libplatform',
+- ],
+- }],
+ [ 'node_use_bundled_v8=="true"', {
+ 'dependencies': [
+ 'deps/v8/src/v8.gyp:v8',
diff --git a/src/node_main.cc b/src/node_main.cc
-index 16bda81ae6..fd559ef1c3 100644
+index 16bda81ae6..2eb1d08369 100644
--- a/src/node_main.cc
+++ b/src/node_main.cc
-@@ -50,11 +50,13 @@ int wmain(int argc, wchar_t *wargv[]) {
+@@ -50,11 +50,15 @@ int wmain(int argc, wchar_t *wargv[]) {
}
#else
// UNIX
@@ -71,10 +83,12 @@ index 16bda81ae6..fd559ef1c3 100644
// calls elsewhere in the program (e.g., any logging from V8.)
setvbuf(stdout, nullptr, _IONBF, 0);
setvbuf(stderr, nullptr, _IONBF, 0);
-+ putenv("ELECTRON_NODE_DISABLE_ASAR_SUPPORT=1");
++#ifdef ELECTRON_NODE_BUILD_NO_ASAR
++ setenv("_ELECTRON_BUILD_NO_ASAR", "1", 1);
++#endif
return node::Start(argc, argv);
}
#endif
--
-2.13.3
+2.14.3
diff --git a/dev-util/electron/files/electron-1.6.11.patch b/dev-util/electron/files/electron-1.6.15.patch
index b40d471348ab..9d74753fc6d3 100644
--- a/dev-util/electron/files/electron-1.6.11.patch
+++ b/dev-util/electron/files/electron-1.6.15.patch
@@ -1,25 +1,26 @@
-From b756fa976480791c76e9338a16ee2b0a29265b93 Mon Sep 17 00:00:00 2001
+From 8aa9ca32e88f7b6e66ded532d3110f4e84e99a9b Mon Sep 17 00:00:00 2001
From: Elvis Pranskevichus <elvis@magic.io>
Date: Mon, 8 Feb 2016 15:16:40 -0500
Subject: [PATCH] electron build fixes
---
- common.gypi | 43 ++++++++++++++++++++++-----
- electron.gyp | 74 +++++++++++++++++++++++++++++++++++----------
- toolchain.gypi | 76 +++++++++++++++++++----------------------------
- tools/ar-flags.py | 15 ++++++++++
- tools/atom_source_root.py | 5 ++++
- tools/browserify.py | 24 +++++++++++++++
- tools/get-endianness.py | 4 +++
- tools/js2asar.py | 13 ++++----
- 8 files changed, 179 insertions(+), 75 deletions(-)
+ common.gypi | 70 ++++++++++++++++++++++++++++++++++-----
+ electron.gyp | 70 +++++++++++++++++++++++++++++++--------
+ toolchain.gypi | 76 +++++++++++++++++--------------------------
+ tools/ar-flags.py | 15 +++++++++
+ tools/atom_source_root.py | 5 +++
+ tools/browserify.py | 24 ++++++++++++++
+ tools/get-endianness.py | 4 +++
+ tools/js2asar.py | 13 ++++----
+ tools/list-browserify-deps.py | 3 +-
+ 9 files changed, 204 insertions(+), 76 deletions(-)
create mode 100644 tools/ar-flags.py
create mode 100644 tools/atom_source_root.py
create mode 100644 tools/browserify.py
create mode 100644 tools/get-endianness.py
diff --git a/common.gypi b/common.gypi
-index 7c1bf366a..c441ae04b 100644
+index 7c1bf366a..7892926eb 100644
--- a/common.gypi
+++ b/common.gypi
@@ -2,6 +2,7 @@
@@ -30,8 +31,24 @@ index 7c1bf366a..c441ae04b 100644
],
'variables': {
# Tell crashpad to build as external project.
-@@ -16,26 +17,23 @@
+@@ -11,31 +12,44 @@
+ 'chromeos': 0,
+ # Reflects node's config.gypi.
+ 'component%': 'static_library',
+- 'python': 'python',
++ 'python%': 'python',
+ 'openssl_fips': '',
'openssl_no_asm': 1,
++
++ 'host_arch': '<!(python <(DEPTH)/chromium/v8/gypfiles/detect_v8_host_arch.py)',
++
++ # ICU configuration for Node.
++ # Note: the use of icu-system.gyp does not necessarily
++ # indicate that the system ICU will be used, it merely
++ # disables the use of the version bundled with Node.
++ 'icu_gyp_path': 'tools/icu/icu-system.gyp',
++ 'icu_small': 'false',
++
'use_openssl_def': 0,
'OPENSSL_PRODUCT': 'libopenssl.a',
- 'node_release_urlbase': 'https://atom.io/download/atom-shell',
@@ -43,12 +60,17 @@ index 7c1bf366a..c441ae04b 100644
'node_install_npm': 'false',
'node_prefix': '',
'node_shared': 'true',
-- 'node_shared_cares': 'false',
+ 'node_shared_cares': 'false',
- 'node_shared_http_parser': 'false',
- 'node_shared_libuv': 'false',
- 'node_shared_openssl': 'false',
'node_shared_v8': 'true',
- 'node_shared_zlib': 'false',
++ 'node_shared_http_parser': 'true',
++ # There are ABI-incompatible modifications to libuv
++ 'node_shared_libuv': 'false',
++ 'node_shared_openssl': 'true',
++ 'node_shared_zlib': 'true',
'node_tag': '',
'node_use_dtrace': 'false',
'node_use_etw': 'false',
@@ -62,10 +84,11 @@ index 7c1bf366a..c441ae04b 100644
'node_enable_d8': 'false',
'uv_library': 'static_library',
'uv_parent_path': 'vendor/node/deps/uv',
-@@ -44,10 +42,16 @@
+@@ -44,10 +58,17 @@
'v8_postmortem_support': 'false',
'v8_enable_i18n_support': 'false',
'v8_inspector': 'false',
++ 'v8_host_byteorder': '<!(python <(DEPTH)/tools/get-endianness.py)',
+ 'v8_use_snapshot': 'true',
+ 'v8_use_external_startup_data': 1,
},
@@ -79,7 +102,7 @@ index 7c1bf366a..c441ae04b 100644
['_target_name in ["libuv", "http_parser", "openssl", "openssl-cli", "cares", "node", "zlib"]', {
'msvs_disabled_warnings': [
4003, # not enough actual parameters for macro 'V'
-@@ -128,6 +132,14 @@
+@@ -128,6 +149,20 @@
],
}],
['_target_name=="node"', {
@@ -91,10 +114,27 @@ index 7c1bf366a..c441ae04b 100644
+ 'cflags_cc!': [
+ '-fvisibility-inlines-hidden',
+ ],
++ 'libraries': [
++ '-lz',
++ '-lhttp_parser',
++ '-lcrypto',
++ '-lssl',
++ ],
'include_dirs': [
'<(libchromiumcontent_src_dir)',
'<(libchromiumcontent_src_dir)/third_party/icu/source/common',
-@@ -228,6 +240,21 @@
+@@ -167,7 +202,9 @@
+ '-Wl,--no-whole-archive',
+ ],
+ }, {
+- 'libraries': [ '<@(libchromiumcontent_v8_libraries)' ],
++ 'libraries': [
++ '<@(libchromiumcontent_v8_libraries)',
++ ],
+ }],
+ ],
+ }],
+@@ -228,6 +265,21 @@
}], # OS=="win"
],
}],
@@ -117,7 +157,7 @@ index 7c1bf366a..c441ae04b 100644
'msvs_cygwin_shell': 0, # Strangely setting it to 1 would make building under cygwin fail.
'msvs_disabled_warnings': [
diff --git a/electron.gyp b/electron.gyp
-index b415525b1..4d0185561 100644
+index f82de1e1f..2c398fe75 100644
--- a/electron.gyp
+++ b/electron.gyp
@@ -191,7 +191,7 @@
@@ -129,15 +169,7 @@ index b415525b1..4d0185561 100644
],
}],
],
-@@ -200,7 +200,6 @@
- 'files': [
- '<@(copied_libraries)',
- '<(libchromiumcontent_dir)/locales',
-- '<(libchromiumcontent_dir)/icudtl.dat',
- '<(libchromiumcontent_dir)/blink_image_resources_200_percent.pak',
- '<(libchromiumcontent_dir)/content_resources_200_percent.pak',
- '<(libchromiumcontent_dir)/content_shell.pak',
-@@ -245,15 +244,17 @@
+@@ -244,8 +244,8 @@
'<@(lib_sources)',
],
'include_dirs': [
@@ -146,10 +178,8 @@ index b415525b1..4d0185561 100644
+ '.',
'vendor/brightray',
'vendor/native_mate',
-+ # libicu headers shim.
-+ '<(SHARED_INTERMEDIATE_DIR)/shim_headers/icui18n_shim',
-+ '<(SHARED_INTERMEDIATE_DIR)/shim_headers/icuuc_shim',
- # Include atom_natives.h.
+ # libicu headers shim.
+@@ -255,7 +255,6 @@
'<(SHARED_INTERMEDIATE_DIR)',
# Include directories for uv and node.
'vendor/node/src',
@@ -157,7 +187,7 @@ index b415525b1..4d0185561 100644
'vendor/node/deps/uv/include',
# The `node.h` is using `#include"v8.h"`.
'<(libchromiumcontent_src_dir)/v8/include',
-@@ -342,11 +343,12 @@
+@@ -344,11 +343,12 @@
'<@(lib_sources_nss)',
],
'link_settings': {
@@ -171,7 +201,7 @@ index b415525b1..4d0185561 100644
# Make native module dynamic loading work.
'-rdynamic',
],
-@@ -368,6 +370,9 @@
+@@ -370,6 +370,9 @@
{
'target_name': 'js2asar',
'type': 'none',
@@ -181,7 +211,7 @@ index b415525b1..4d0185561 100644
'actions': [
{
'action_name': 'js2asar',
-@@ -389,6 +394,7 @@
+@@ -391,6 +394,7 @@
'action': [
'python',
'tools/js2asar.py',
@@ -189,7 +219,7 @@ index b415525b1..4d0185561 100644
'<@(_outputs)',
'lib',
'<@(_inputs)',
-@@ -399,6 +405,9 @@
+@@ -401,6 +405,9 @@
{
'target_name': 'app2asar',
'type': 'none',
@@ -199,7 +229,7 @@ index b415525b1..4d0185561 100644
'actions': [
{
'action_name': 'app2asar',
-@@ -420,6 +429,7 @@
+@@ -422,6 +429,7 @@
'action': [
'python',
'tools/js2asar.py',
@@ -207,7 +237,7 @@ index b415525b1..4d0185561 100644
'<@(_outputs)',
'default_app',
'<@(_inputs)',
-@@ -445,6 +455,7 @@
+@@ -447,6 +455,7 @@
'dependencies': [
# depend on this target to ensure the '<(js2c_input_dir)' is created
'atom_js2c_copy',
@@ -215,7 +245,7 @@ index b415525b1..4d0185561 100644
],
'variables': {
'sandbox_args': [
-@@ -474,11 +485,9 @@
+@@ -476,11 +485,9 @@
'<(js2c_input_dir)/preload_bundle.js',
],
'action': [
@@ -230,7 +260,7 @@ index b415525b1..4d0185561 100644
'<@(sandbox_args)',
'-o',
'<@(_outputs)',
-@@ -493,12 +502,11 @@
+@@ -495,12 +502,11 @@
'<(js2c_input_dir)/isolated_bundle.js',
],
'action': [
@@ -247,7 +277,7 @@ index b415525b1..4d0185561 100644
'-o',
'<@(_outputs)',
],
-@@ -533,6 +541,42 @@
+@@ -535,6 +541,42 @@
}
],
}, # target atom_js2c
@@ -507,6 +537,20 @@ index adad1751e..ca7686893 100755
def safe_mkdir(path):
+diff --git a/tools/list-browserify-deps.py b/tools/list-browserify-deps.py
+index c25007d2a..bbd921bc6 100755
+--- a/tools/list-browserify-deps.py
++++ b/tools/list-browserify-deps.py
+@@ -9,7 +9,8 @@ BROWSERIFY = os.path.join(SOURCE_ROOT, 'node_modules', '.bin', 'browserify')
+ if sys.platform == 'win32':
+ BROWSERIFY += '.cmd'
+
+-deps = subprocess.check_output([BROWSERIFY, '--list'] + sys.argv[1:])
++deps = subprocess.check_output([BROWSERIFY, '--list'] + sys.argv[1:],
++ universal_newlines=True)
+ for dep in deps.split('\n'):
+ if dep:
+ dep = os.path.relpath(dep, SOURCE_ROOT)
--
-2.14.1
+2.14.3
diff --git a/dev-util/electron/files/electron-system-icu-r0.patch b/dev-util/electron/files/electron-system-icu-r0.patch
new file mode 100644
index 000000000000..859e351c9060
--- /dev/null
+++ b/dev-util/electron/files/electron-system-icu-r0.patch
@@ -0,0 +1,34 @@
+From 065c936e74d629b51f5258fb3b58899bd5857b53 Mon Sep 17 00:00:00 2001
+From: Elvis Pranskevichus <elvis@magic.io>
+Date: Sun, 29 Oct 2017 16:38:40 -0400
+Subject: [PATCH] system-icu support
+
+---
+ electron.gyp | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/electron.gyp b/electron.gyp
+index 43f3ffb51..2c398fe75 100644
+--- a/electron.gyp
++++ b/electron.gyp
+@@ -200,7 +200,6 @@
+ 'files': [
+ '<@(copied_libraries)',
+ '<(libchromiumcontent_dir)/locales',
+- '<(libchromiumcontent_dir)/icudtl.dat',
+ '<(libchromiumcontent_dir)/blink_image_resources_200_percent.pak',
+ '<(libchromiumcontent_dir)/content_resources_200_percent.pak',
+ '<(libchromiumcontent_dir)/content_shell.pak',
+@@ -249,6 +248,9 @@
+ '.',
+ 'vendor/brightray',
+ 'vendor/native_mate',
++ # libicu headers shim.
++ '<(SHARED_INTERMEDIATE_DIR)/shim_headers/icui18n_shim',
++ '<(SHARED_INTERMEDIATE_DIR)/shim_headers/icuuc_shim',
+ # Include atom_natives.h.
+ '<(SHARED_INTERMEDIATE_DIR)',
+ # Include directories for uv and node.
+--
+2.14.3
+