build: missing include in windows release builds (#21132)

* fix: add missing `#include <algorithm>` as needed

Manual backport of #21045

* fix: add missing `#include <algorithm>` as needed

Manual backport of #21045

* chore: add patch to include missing `#include <memory>`

* chore: add another `#include <memory>` needed

* chore: regenerate patches w/correct breakpad root

* chore: regenerate breakpad include failure patches

* refactor: use --keep-cr in the git am patch script

We need something like this to patch files that have crlf endings. See
https://stackoverflow.com/questions/6289001/git-am-format-patch-control-format-of-line-endings

* chore: regenerate node patches

The udpated crlf support in git-{import,export}-patches caused a new
warning when applying patches from `electron/patches/nodes`, so refresh
the patches.

* chore: no need to regenerate node patches

* chore: silence whitespace warnings

* chore: fix FTBFS from stl features used but not included

* fixup! refactor: use --keep-cr in the git am patch script
This commit is contained in:
Charles Kerr
2019-11-18 12:39:59 -06:00
committed by John Kleinschmidt
parent b3edf86914
commit c79809ddb9
8 changed files with 122 additions and 3 deletions

View File

@@ -0,0 +1 @@
chore_fix_ftbfs_from_stl_features_used_but_not_included.patch

View File

@@ -0,0 +1,30 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Charles Kerr <ckerr@github.com>
Date: Fri, 15 Nov 2019 17:14:54 -0600
Subject: chore: fix FTBFS from stl features used but not included
diff --git a/src/common/windows/pe_util.cc b/src/common/windows/pe_util.cc
index 6fa63fa3b5699b79d3479c6d4a37a1c68553223f..59c1c1d74f70dca8f871fdddd8e27da102ec9148 100644
--- a/src/common/windows/pe_util.cc
+++ b/src/common/windows/pe_util.cc
@@ -119,7 +119,6 @@ private:
namespace google_breakpad {
-using std::unique_ptr;
using google_breakpad::GUIDString;
bool ReadModuleInfo(const wstring & pe_file, PDBModuleInfo * info) {
diff --git a/src/tools/windows/dump_syms/dump_syms.cc b/src/tools/windows/dump_syms/dump_syms.cc
index 5b7d1777538cd3cfefd0bef45558f900798d6c51..2b2fdaf3f908db1d6f3f96a6bc23f0698cf879dc 100644
--- a/src/tools/windows/dump_syms/dump_syms.cc
+++ b/src/tools/windows/dump_syms/dump_syms.cc
@@ -41,7 +41,6 @@
using std::wstring;
using google_breakpad::PDBSourceLineWriter;
using google_breakpad::PESourceLineWriter;
-using std::unique_ptr;
int wmain(int argc, wchar_t **argv) {
bool success;

View File

@@ -84,3 +84,4 @@ backport_fix_msstl_compat_in_ui_events.patch
build_win_fix_msstl_compatibility_for_pdf.patch
remove_usage_of_incognito_apis_in_the_spellchecker.patch
chore_use_electron_resources_not_chrome_for_spellchecker.patch
fix_add_missing_include_algorithm_as_needed.patch

View File

@@ -0,0 +1,85 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Charles Kerr <ckerr@github.com>
Date: Thu, 14 Nov 2019 14:17:57 -0600
Subject: fix: add missing `#include <algorithm>` as needed
Backport of https://github.com/electron/electron/pull/21045
diff --git a/media/base/byte_queue.cc b/media/base/byte_queue.cc
index 245fafa668568fd308e5a2806dafc1c5f0bf3dbd..c54ac79bdfbba4614b9944f73269f5f30ec9a80a 100644
--- a/media/base/byte_queue.cc
+++ b/media/base/byte_queue.cc
@@ -4,6 +4,8 @@
#include "media/base/byte_queue.h"
+#include <algorithm>
+
#include "base/logging.h"
#include "base/numerics/checked_math.h"
diff --git a/third_party/blink/public/platform/web_time_range.h b/third_party/blink/public/platform/web_time_range.h
index 2c17f7c8ce58f1255994e9e6fd74f70fa1a22b1c..4b0a59bf3308b49d2c4ffd86120759417094cb21 100644
--- a/third_party/blink/public/platform/web_time_range.h
+++ b/third_party/blink/public/platform/web_time_range.h
@@ -31,6 +31,8 @@
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_TIME_RANGE_H_
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_TIME_RANGE_H_
+#include <algorithm>
+
#include "third_party/blink/public/platform/web_vector.h"
namespace blink {
diff --git a/third_party/blink/renderer/core/layout/min_max_size.h b/third_party/blink/renderer/core/layout/min_max_size.h
index c3fdbde6e4bf585351b3fc8d0ce2bd2673a82b5e..4233e6c79a1d67dd6c1ca33929d0beedbf9a1116 100644
--- a/third_party/blink/renderer/core/layout/min_max_size.h
+++ b/third_party/blink/renderer/core/layout/min_max_size.h
@@ -5,6 +5,8 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_MIN_MAX_SIZE_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_MIN_MAX_SIZE_H_
+#include <algorithm>
+
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/platform/geometry/layout_unit.h"
diff --git a/third_party/blink/renderer/core/layout/ng/geometry/ng_margin_strut.h b/third_party/blink/renderer/core/layout/ng/geometry/ng_margin_strut.h
index 50f699428acf8251f14411dc30caa750cfac88bf..8236afa14ee99b5f61e6c785721abf62299cbaed 100644
--- a/third_party/blink/renderer/core/layout/ng/geometry/ng_margin_strut.h
+++ b/third_party/blink/renderer/core/layout/ng/geometry/ng_margin_strut.h
@@ -5,6 +5,8 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_NG_GEOMETRY_NG_MARGIN_STRUT_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_NG_GEOMETRY_NG_MARGIN_STRUT_H_
+#include <algorithm>
+
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/platform/geometry/layout_unit.h"
diff --git a/third_party/blink/renderer/core/style/style_difference.h b/third_party/blink/renderer/core/style/style_difference.h
index 91292961f1f02e53c58653f72297ea05d78fc07b..517fbb8f5a7aa549373e3806aaec4b3d1f0ec13f 100644
--- a/third_party/blink/renderer/core/style/style_difference.h
+++ b/third_party/blink/renderer/core/style/style_difference.h
@@ -5,7 +5,9 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_STYLE_STYLE_DIFFERENCE_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_STYLE_STYLE_DIFFERENCE_H_
+#include <algorithm>
#include <iosfwd>
+
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
#include "third_party/blink/renderer/platform/wtf/assertions.h"
diff --git a/third_party/blink/renderer/core/svg/animation/smil_time.h b/third_party/blink/renderer/core/svg/animation/smil_time.h
index b4fec36d9ef15c5492ce6bbe544c11bdfc01ec10..7433a3a1c8578dbeb388628f1050629133c94f83 100644
--- a/third_party/blink/renderer/core/svg/animation/smil_time.h
+++ b/third_party/blink/renderer/core/svg/animation/smil_time.h
@@ -26,6 +26,7 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_SVG_ANIMATION_SMIL_TIME_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_SVG_ANIMATION_SMIL_TIME_H_
+#include <algorithm>
#include <ostream>
#include "base/time/time.h"

View File

@@ -65,7 +65,7 @@ index 2851641d0219164185567a100c2c19d49274c233..778da01c7eaf11ef954e213a5a6ecb5e
NSString* const
NSAccessibilityTextMarkerNodeDebugDescriptionParameterizedAttribute =
@"AXTextMarkerNodeDebugDescription";
+#endif
+#endif
// Other private attributes.
NSString* const NSAccessibilitySelectTextWithCriteriaParameterizedAttribute =

View File

@@ -15,7 +15,7 @@ index ad87f4729fe2cec2cf6e12b5bfcaf68bccf0390d..b1c3fd0f798d520da0637268dcbd51ec
case ui::NativeTheme::kColorId_TableHeaderSeparator:
return GetBorderColor("GtkTreeView#treeview.view GtkButton#button");
+ // Results Table
+ // Results Table
+ case ui::NativeTheme::kColorId_ResultsTableNormalBackground:
+ return SkColorFromColorId(
+ ui::NativeTheme::kColorId_TextfieldDefaultBackground);

View File

@@ -3,6 +3,8 @@
"src/electron/patches/boringssl": "src/third_party/boringssl/src",
"src/electron/patches/breakpad": "src/third_party/breakpad/breakpad",
"src/electron/patches/perfetto": "src/third_party/perfetto",
"src/electron/patches/skia": "src/third_party/skia",

View File

@@ -42,7 +42,7 @@ def get_repo_root(path):
def am(repo, patch_data, threeway=False, directory=None, exclude=None,
committer_name=None, committer_email=None):
args = []
args = ['--ignore-space-change']
if threeway:
args += ['--3way']
if directory is not None: