* build: remove common/icu/no_inline_default_constructor.patch

It was added in https://github.com/electron/libchromiumcontent/pull/207,
the issue is no longer valid in the GN build.

* build: remove common/icu/build_gn.patch

In GN release build all code including node are linked
statically in a single binary, the workaround is no longer valid.

* build: remove ununsed patches

* build: remove is_electron_gn_build arg

* build: remove component mode crt config patch

* build: remove executable config patch for character_data_generator

* build: remove latency_info.patch

* build: remove exec_script_whitelist patch

* build: update patches/common/v8/build_gn.patch

* build: remove common/chromium/fix-arm64-linking-error.patch

It was added in a1df18ca36
to workaround a linker issue.

* build: remove common/chromium/protobuf_build_gn.patch

It was added to workaround a VS linker bug, it has been fixed
in Update 1

* build: remove common/chromium/disable-recursive-surface-sync.patch

It was added in 6bc6626e2c
to fix dcheck on macOS, it no longer appears to be an issue.
This commit is contained in:
Robo 2018-09-15 17:10:18 +05:30 коммит произвёл Charles Kerr
Родитель 0ea687b529
Коммит 66ced07545
19 изменённых файлов: 10 добавлений и 673 удалений

Просмотреть файл

@ -1,5 +1,4 @@
is_electron_build = true is_electron_build = true
is_electron_gn_build = true
use_jumbo_build = true use_jumbo_build = true
root_extra_deps = [ "//electron" ] root_extra_deps = [ "//electron" ]

Просмотреть файл

@ -135,10 +135,6 @@ patches:
author: deepak1556 <hop2deep@gmail.com> author: deepak1556 <hop2deep@gmail.com>
file: frame_host_manager.patch file: frame_host_manager.patch
description: null description: null
-
author: Tony Ganch <tonyganch@gmail.com>
file: latency_info.patch
description: null
- -
author: Cheng Zhao <zcbenz@gmail.com> author: Cheng Zhao <zcbenz@gmail.com>
file: net_url_request_job.patch file: net_url_request_job.patch
@ -151,10 +147,6 @@ patches:
author: deepak1556 <hop2deep@gmail.com> author: deepak1556 <hop2deep@gmail.com>
file: out_of_process_instance.patch file: out_of_process_instance.patch
description: null description: null
-
author: Aleksei Kuzmin <alkuzmin@microsoft.com>
file: protobuf_build_gn.patch
description: null
- -
author: null author: null
file: render_widget_host_view_base.patch file: render_widget_host_view_base.patch
@ -205,10 +197,6 @@ patches:
author: null author: null
file: webui_in_subframes.patch file: webui_in_subframes.patch
description: null description: null
-
author: Aleksei Kuzmin <alkuzmin@microsoft.com>
file: export_blink_webdisplayitemlist.patch
description: null
- -
author: Aleksei Kuzmin <alkuzmin@microsoft.com> author: Aleksei Kuzmin <alkuzmin@microsoft.com>
file: statically_build_power_save_blocker.patch file: statically_build_power_save_blocker.patch
@ -229,18 +217,10 @@ patches:
author: Cheng Zhao <zcbenz@gmail.com> author: Cheng Zhao <zcbenz@gmail.com>
file: gin_enable_disable_v8_platform.patch file: gin_enable_disable_v8_platform.patch
description: null description: null
-
author: deepak1556 <hop2deep@gmail.com>
file: disable-recursive-surface-sync.patch
description: null
- -
author: deepak1556 <hop2deep@gmail.com> author: deepak1556 <hop2deep@gmail.com>
file: blink-worker-enable-csp-in-file-scheme.patch file: blink-worker-enable-csp-in-file-scheme.patch
description: null description: null
-
author: Cheng Zhao <zcbenz@gmail.com>
file: fix-arm64-linking-error.patch
description: Do not use system freetype for arm64
- -
author: Heilig Benedek <benecene@gmail.com> author: Heilig Benedek <benecene@gmail.com>
file: disable-redraw-lock.patch file: disable-redraw-lock.patch
@ -261,14 +241,6 @@ patches:
description: | description: |
v8_context_snapshot_generator is a build time executable. v8_context_snapshot_generator is a build time executable.
The patch adds the config. The patch adds the config.
# -
# author: Tomas Rycl <torycl@microsoft.com>
# file: crashpad-disabled-windows.patch
# description: |
# On Windows Electron does not link Crashpad. This causes linking
# errors with Chromium where it is enabled by default.
# This patch will disable Crashpad in Chromium using fallback
# mechanism which uses Breakpad.
- -
author: Jeremy Apthorp <nornagon@nornagon.net> author: Jeremy Apthorp <nornagon@nornagon.net>
file: boringssl_build_gn.patch file: boringssl_build_gn.patch

Просмотреть файл

@ -1,23 +0,0 @@
diff --git a/content/browser/service_worker/service_worker_version.cc b/content/browser/service_worker/service_worker_version.cc
index 2417abcfdae2..13a06d02e012 100644
--- a/content/browser/service_worker/service_worker_version.cc
+++ b/content/browser/service_worker/service_worker_version.cc
@@ -53,9 +53,6 @@
#include "third_party/WebKit/public/web/WebConsoleMessage.h"
namespace content {
-
-using StatusCallback = ServiceWorkerVersion::StatusCallback;
-
namespace {
// Timeout for an installed worker to start.
@@ -103,7 +100,7 @@ void RunCallbacks(ServiceWorkerVersion* version,
// An adapter to run a |callback| after StartWorker.
void RunCallbackAfterStartWorker(base::WeakPtr<ServiceWorkerVersion> version,
- StatusCallback callback,
+ ServiceWorkerVersion::StatusCallback callback,
ServiceWorkerStatusCode status) {
if (status == SERVICE_WORKER_OK &&
version->running_status() != EmbeddedWorkerStatus::RUNNING) {

Просмотреть файл

@ -1,64 +0,0 @@
diff --git a/content/shell/browser/shell_devtools_frontend.cc b/content/shell/browser/shell_devtools_frontend.cc
index 3b3221a..6447347 100644
--- a/content/shell/browser/shell_devtools_frontend.cc
+++ b/content/shell/browser/shell_devtools_frontend.cc
@@ -19,8 +19,8 @@
namespace {
static GURL GetFrontendURL() {
int port = ShellDevToolsManagerDelegate::GetHttpHandlerPort();
- return GURL(
- base::StringPrintf("http://127.0.0.1:%d/devtools/inspector.html", port));
+ return GURL(base::StringPrintf(
+ "http://127.0.0.1:%d/devtools/devtools_app.html", port));
}
} // namespace
diff --git a/third_party/WebKit/Source/devtools/BUILD.gn b/third_party/WebKit/Source/devtools/BUILD.gn
index 952b922..9e7b4bf 100644
--- a/third_party/WebKit/Source/devtools/BUILD.gn
+++ b/third_party/WebKit/Source/devtools/BUILD.gn
@@ -1048,7 +1048,6 @@
"$resources_out_dir/cm_modes/cm_modes_module.js",
"$resources_out_dir/emulated_devices/emulated_devices_module.js",
"$resources_out_dir/product_registry_impl/product_registry_impl_module.js",
- "$resources_out_dir/screencast/screencast_module.js",
]
devtools_applications = [
diff --git a/third_party/WebKit/Source/devtools/front_end/inspector.json b/third_party/WebKit/Source/devtools/front_end/inspector.json
index 36c222f..dc2149a 100644
--- a/third_party/WebKit/Source/devtools/front_end/inspector.json
+++ b/third_party/WebKit/Source/devtools/front_end/inspector.json
@@ -1,6 +1,6 @@
{
"modules" : [
- { "name": "screencast", "type": "remote" }
+ { "name": "screencast", "type": "autostart" }
],
"extends": "devtools_app",
"has_html": true
diff --git a/third_party/WebKit/Source/devtools/front_end/main/Main.js b/third_party/WebKit/Source/devtools/front_end/main/Main.js
index 4c9d9aa..e6d73b1 100644
--- a/third_party/WebKit/Source/devtools/front_end/main/Main.js
+++ b/third_party/WebKit/Source/devtools/front_end/main/Main.js
@@ -212,19 +212,8 @@
this._registerForwardedShortcuts();
this._registerMessageSinkListener();
- // Pick first app we could instantiate (for test harness).
- for (const extension of self.runtime.extensions(Common.AppProvider)) {
- try {
- const instance = await extension.instance();
- if (instance) {
- this._showAppUI(instance);
- break;
- }
- } catch (e) {
- console.error(e);
- }
- }
Main.Main.timeEnd('Main._createAppUI');
+ this._showAppUI(await self.runtime.extension(Common.AppProvider).instance());
}
/**

Просмотреть файл

@ -1,29 +0,0 @@
ef091c206803ebe507755cb65a1942b097fbeb32
diff --git a/gpu/command_buffer/service/sync_point_manager.cc b/gpu/command_buffer/service/sync_point_manager.cc
index 7fdf99e7e134..ac0811194c24 100644
--- a/gpu/command_buffer/service/sync_point_manager.cc
+++ b/gpu/command_buffer/service/sync_point_manager.cc
@@ -133,7 +133,6 @@ void SyncPointOrderData::FinishProcessingOrderNumber(uint32_t order_num) {
}
for (OrderFence& order_fence : ensure_releases) {
- DLOG(ERROR) << "Client did not release sync token as expected";
order_fence.client_state->EnsureWaitReleased(order_fence.fence_release,
order_fence.release_callback);
}
@@ -156,7 +155,6 @@ bool SyncPointOrderData::ValidateReleaseOrderNumber(
// We should have an unprocessed order number lower than the wait order
// number for the wait to be valid. It's not possible for wait order number to
// equal next unprocessed order number, but we handle that defensively.
- DCHECK_NE(wait_order_num, unprocessed_order_nums_.front());
if (wait_order_num <= unprocessed_order_nums_.front())
return false;
@@ -309,6 +307,7 @@ void SyncPointClientState::EnsureWaitReleased(uint64_t release,
if (call_callback) {
// This effectively releases the wait without releasing the fence.
+ DLOG(ERROR) << "Client did not release sync token as expected";
callback.Run();
}
}

Просмотреть файл

@ -1,32 +1,18 @@
diff --git a/.gn b/.gn
index 50a8a2fe9f1e..66ced79f1627 100644
--- a/.gn
+++ b/.gn
@@ -259,4 +259,8 @@ exec_script_whitelist =
# Not gypi-to-gn.
"//google_apis/BUILD.gn",
"//printing/BUILD.gn",
+ # While electron transitions to GN, we use gypi_to_gn to synchronize
+ # file lists
+ "//electron/BUILD.gn",
+ "//electron/brightray/BUILD.gn",
]
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
index 7d60dd920904..d2f2cbc99915 100644 index 9e38ee0e592b..bd54ce154b13 100644
--- a/build/config/BUILDCONFIG.gn --- a/build/config/BUILDCONFIG.gn
+++ b/build/config/BUILDCONFIG.gn +++ b/build/config/BUILDCONFIG.gn
@@ -123,6 +123,10 @@ if (current_os == "") { @@ -123,6 +123,9 @@ if (current_os == "") {
# even if the value is overridden, which is wasteful. See first bullet. # even if the value is overridden, which is wasteful. See first bullet.
declare_args() { declare_args() {
+ is_electron_build = false + is_electron_build = false
+ is_electron_gn_build = false
+ is_mas_build = false + is_mas_build = false
+ +
# Set to enable the official build level of optimization. This has nothing # Set to enable the official build level of optimization. This has nothing
# to do with branding, but enables an additional level of optimization above # to do with branding, but enables an additional level of optimization above
# release (!is_debug). This might be better expressed as a tri-state # release (!is_debug). This might be better expressed as a tri-state
@@ -539,6 +539,7 @@ default_compiler_configs = [ @@ -539,6 +542,7 @@ default_compiler_configs = [
"//build/config/compiler:thin_archive", "//build/config/compiler:thin_archive",
"//build/config/coverage:default_coverage", "//build/config/coverage:default_coverage",
"//build/config/sanitizers:default_sanitizer_flags", "//build/config/sanitizers:default_sanitizer_flags",
@ -34,14 +20,6 @@ index 7d60dd920904..d2f2cbc99915 100644
] ]
if (is_win) { if (is_win) {
@@ -642,6 +645,7 @@ template("component") {
_component_mode = "shared_library"
} else if (defined(invoker.static_component_type)) {
assert(invoker.static_component_type == "static_library" ||
+ (is_electron_build && invoker.static_component_type == "shared_library") ||
invoker.static_component_type == "source_set")
_component_mode = invoker.static_component_type
} else if (is_android || !defined(invoker.sources)) {
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 9a10137aa405..bb33e5450eaa 100644 index 9a10137aa405..bb33e5450eaa 100644
--- a/build/config/compiler/BUILD.gn --- a/build/config/compiler/BUILD.gn
@ -64,28 +42,3 @@ index 9a10137aa405..bb33e5450eaa 100644
# Work-around for http://openradar.appspot.com/20356002 # Work-around for http://openradar.appspot.com/20356002
if (is_mac) { if (is_mac) {
diff --git a/build/config/win/BUILD.gn b/build/config/win/BUILD.gn
index 1f6bc13e087f..4630045ff554 100644
--- a/build/config/win/BUILD.gn
+++ b/build/config/win/BUILD.gn
@@ -314,7 +314,7 @@ config("cfi_linker") {
# See https://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx for a reference of
# what each value does.
config("default_crt") {
- if (is_component_build) {
+ if (is_component_build || (is_electron_build && !is_electron_gn_build)) {
# Component mode: dynamic CRT. Since the library is shared, it requires
# exceptions or will give errors about things not matching, so keep
# exceptions on.
diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn
index bc9fe2cc2000..9173f6f0324c 100644
--- a/third_party/blink/renderer/platform/BUILD.gn
+++ b/third_party/blink/renderer/platform/BUILD.gn
@@ -134,6 +134,7 @@ action("instrumentation_probes") {
}
executable("character_data_generator") {
+ configs += [ "//electron/build/config:build_time_executable" ]
sources = [
"text/character_property_data_generator.cc",
"text/character_property_data_generator.h",

Просмотреть файл

@ -1,48 +0,0 @@
diff --git a/components/crash/core/common/BUILD.gn b/components/crash/core/common/BUILD.gn
index 4f67529f5c9a..a41bdf709d99 100644
--- a/components/crash/core/common/BUILD.gn
+++ b/components/crash/core/common/BUILD.gn
@@ -13,7 +13,7 @@ group("common") {
}
}
-use_crashpad = is_mac || is_win
+use_crashpad = is_mac
use_stubs = is_fuchsia
# Crashpad's annotation system can store data on a per-module basis (i.e.,
@@ -128,7 +128,7 @@ source_set("unit_tests") {
sources += [ "objc_zombie_unittest.mm" ]
}
- if (!is_mac && !is_win && !is_fuchsia) {
+ if (!is_mac && !is_fuchsia) {
include_dirs = [ "//third_party/breakpad/breakpad/src/" ]
sources += [ "crash_key_breakpad_unittest.cc" ]
}
diff --git a/components/crash/core/common/crash_key.h b/components/crash/core/common/crash_key.h
index 951c7e941962..bdf6bb40e1fb 100644
--- a/components/crash/core/common/crash_key.h
+++ b/components/crash/core/common/crash_key.h
@@ -19,7 +19,7 @@
// Annotation interface. Because not all platforms use Crashpad yet, a
// source-compatible interface is provided on top of the older Breakpad
// storage mechanism.
-#if (defined(OS_MACOSX) && !defined(OS_IOS)) || defined(OS_WIN)
+#if (defined(OS_MACOSX) && !defined(OS_IOS))
#define USE_CRASHPAD_ANNOTATION 1
#endif
diff --git a/components/crash/core/common/crash_key_breakpad.cc b/components/crash/core/common/crash_key_breakpad.cc
index 0351e01fa18f..1c355bd89844 100644
--- a/components/crash/core/common/crash_key_breakpad.cc
+++ b/components/crash/core/common/crash_key_breakpad.cc
@@ -15,7 +15,7 @@
#include "components/crash/core/common/crash_key_base_support.h"
#include "components/crash/core/common/crash_key_internal.h"
-#if defined(OS_MACOSX) || defined(OS_IOS) || defined(OS_WIN)
+#if defined(OS_MACOSX) || defined(OS_IOS)
#error "This file should not be used when Crashpad is available, nor on iOS."
#endif

Просмотреть файл

@ -1,16 +0,0 @@
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index a9b9d180b0eb..5ad8b93114a7 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -972,6 +975,11 @@ void RenderWidgetHostImpl::PauseForPendingResizeOrRepaints() {
if (is_hidden())
return;
+ // Do not pause if there is already a pending operation with the
+ // backing store.
+ if (in_get_backing_store_)
+ return;
+
// Do not pause if there is not a paint or resize already coming.
if (!repaint_ack_pending_ && !resize_ack_pending_)
return;

Просмотреть файл

@ -1,13 +0,0 @@
diff --git a/chrome/installer/mini_installer/BUILD.gn b/chrome/installer/mini_installer/BUILD.gn
index c44f8a110599..2d48cf1ade70 100644
--- a/chrome/installer/mini_installer/BUILD.gn
+++ b/chrome/installer/mini_installer/BUILD.gn
@@ -331,7 +331,7 @@ if (is_win) {
testonly = true
data_deps = [
":mini_installer",
- ":next_version_mini_installer",
+ # ":next_version_mini_installer",
]
}
}

Просмотреть файл

@ -1,21 +0,0 @@
diff --git a/third_party/blink/public/platform/web_display_item_list.h b/third_party/blink/public/platform/web_display_item_list.h
index 31a3f6d8d5f4..0b2a13230fbd 100644
--- a/third_party/blink/public/platform/web_display_item_list.h
+++ b/third_party/blink/public/platform/web_display_item_list.h
@@ -6,6 +6,7 @@
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_DISPLAY_ITEM_LIST_H_
#include "third_party/blink/public/platform/web_blend_mode.h"
+#include "third_party/blink/public/platform/web_common.h"
#include "third_party/blink/public/platform/web_float_point.h"
#include "third_party/blink/public/platform/web_float_rect.h"
#include "third_party/blink/public/platform/web_rect.h"
@@ -33,7 +34,7 @@ namespace blink {
// 'drawing' items) and operations to be performed when rendering this content
// (stored in 'clip', 'transform', 'filter', etc...). For more details see:
// http://dev.chromium.org/blink/slimming-paint.
-class WebDisplayItemList {
+class BLINK_EXPORT WebDisplayItemList {
public:
virtual ~WebDisplayItemList() = default;

Просмотреть файл

@ -1,13 +0,0 @@
diff --git a/skia/BUILD.gn b/skia/BUILD.gn
index c0477a6fe82d..3a020f2e2006 100644
--- a/skia/BUILD.gn
+++ b/skia/BUILD.gn
@@ -125,7 +125,7 @@ config("skia_library_config") {
defines = []
- if (!is_ios && !use_system_freetype) {
+ if (!is_ios && (is_win || is_mac)) {
defines += [ "SK_FREETYPE_MINIMUM_RUNTIME_VERSION=(((FREETYPE_MAJOR) * 0x01000000) | ((FREETYPE_MINOR) * 0x00010000) | ((FREETYPE_PATCH) * 0x00000100))" ]
}

Просмотреть файл

@ -1,101 +0,0 @@
diff --git a/ui/latency/BUILD.gn b/ui/latency/BUILD.gn
index 2aeebd991ae3..27cacb8748c4 100644
--- a/ui/latency/BUILD.gn
+++ b/ui/latency/BUILD.gn
@@ -5,7 +5,7 @@
import("//build/config/jumbo.gni")
import("//testing/test.gni")
-jumbo_source_set("latency") {
+component("latency") {
sources = [
"fixed_point.cc",
"fixed_point.h",
@@ -18,6 +18,7 @@ jumbo_source_set("latency") {
"latency_tracker.h",
"stream_analyzer.cc",
"stream_analyzer.h",
+ "ui_latency_export.h",
"windowed_analyzer.cc",
"windowed_analyzer.h",
]
@@ -22,6 +23,8 @@ jumbo_source_set("latency") {
public_deps = [
"//services/metrics/public/cpp:metrics_cpp",
]
+
+ defines = [ "UI_LATENCY_IMPLEMENTATION" ]
}
jumbo_source_set("test_support") {
diff --git a/ui/latency/latency_info.h b/ui/latency/latency_info.h
index d9d390861562..7b1aa99e8a9c 100644
--- a/ui/latency/latency_info.h
+++ b/ui/latency/latency_info.h
@@ -16,6 +16,7 @@
#include "base/time/time.h"
#include "services/metrics/public/cpp/ukm_source_id.h"
#include "ui/gfx/geometry/point_f.h"
+#include "ui/latency/ui_latency_export.h"
#if !defined(OS_IOS)
#include "ipc/ipc_param_traits.h" // nogncheck
@@ -114,7 +115,7 @@ enum SourceEventType {
SOURCE_EVENT_TYPE_LAST = OTHER,
};
-class LatencyInfo {
+class UI_LATENCY_EXPORT LatencyInfo {
public:
struct LatencyComponent {
// Nondecreasing number that can be used to determine what events happened
diff --git a/ui/latency/latency_tracker.h b/ui/latency/latency_tracker.h
index 24397fc4ba6d..ad943fa7ccf7 100644
--- a/ui/latency/latency_tracker.h
+++ b/ui/latency/latency_tracker.h
@@ -8,12 +8,13 @@
#include "base/macros.h"
#include "services/metrics/public/cpp/ukm_source_id.h"
#include "ui/latency/latency_info.h"
+#include "ui/latency/ui_latency_export.h"
namespace ui {
// Utility class for tracking the latency of events. Relies on LatencyInfo
// components logged by content::RenderWidgetHostLatencyTracker.
-class LatencyTracker {
+class UI_LATENCY_EXPORT LatencyTracker {
public:
explicit LatencyTracker(bool metric_sampling,
ukm::SourceId ukm_source_id = ukm::kInvalidSourceId);
diff --git a/ui/latency/ui_latency_export.h b/ui/latency/ui_latency_export.h
new file mode 100644
index 0000000..f24ee91
--- /dev/null
+++ b/ui/latency/ui_latency_export.h
@@ -0,0 +1,25 @@
+#ifndef UI_LATENCY_UI_LATENCY_EXPORT_H_
+#define UI_LATENCY_UI_LATENCY_EXPORT_H_
+
+#if defined(COMPONENT_BUILD)
+#if defined(WIN32)
+
+#if defined(UI_LATENCY_IMPLEMENTATION)
+#define UI_LATENCY_EXPORT __declspec(dllexport)
+#else
+#define UI_LATENCY_EXPORT __declspec(dllimport)
+#endif // defined(UI_LATENCY_IMPLEMENTATION)
+
+#else // defined(WIN32)
+#if defined(UI_LATENCY_IMPLEMENTATION)
+#define UI_LATENCY_EXPORT __attribute__((visibility("default")))
+#else
+#define UI_LATENCY_EXPORT
+#endif
+#endif
+
+#else // defined(COMPONENT_BUILD)
+#define UI_LATENCY_EXPORT
+#endif
+
+#endif // UI_LATENCY_UI_LATENCY_EXPORT_H_

Просмотреть файл

@ -1,16 +0,0 @@
diff --git a/BUILD.gn b/BUILD.gn
index 067416ed38f4..9fa07961c5b8 100644
--- a/third_party/protobuf/BUILD.gn
+++ b/third_party/protobuf/BUILD.gn
@@ -599,6 +599,11 @@ if (current_toolchain == host_toolchain) {
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
+ if (is_win) {
+ # https://crbug.com/703251
+ configs -= [ "//build/config/win:default_incremental_linking" ]
+ configs += [ "//build/config/win:no_incremental_linking" ]
+ }
cflags = protobuf_lite_cflags

Просмотреть файл

@ -1,12 +1,12 @@
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
index fbcf20c..d2173e2 100644 index 4304cc82494f..01588f173b16 100644
--- a/chrome/BUILD.gn --- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn +++ b/chrome/BUILD.gn
@@ -1656,6 +1656,11 @@ if (is_chrome_branded && !is_android) { @@ -1663,6 +1663,11 @@ if (is_chrome_branded && !is_android) {
} }
} }
+if (is_electron_gn_build) { +if (is_electron_build) {
+ group("packed_resources") { + group("packed_resources") {
+ public_deps = [ "//electron:packed_resources" ] + public_deps = [ "//electron:packed_resources" ]
+ } + }
@ -14,7 +14,7 @@ index fbcf20c..d2173e2 100644
chrome_paks("packed_resources") { chrome_paks("packed_resources") {
if (is_mac) { if (is_mac) {
output_dir = "$root_gen_dir/repack" output_dir = "$root_gen_dir/repack"
@@ -1677,6 +1682,7 @@ chrome_paks("packed_resources") { @@ -1684,6 +1689,7 @@ chrome_paks("packed_resources") {
] ]
} }
} }

Просмотреть файл

@ -1,10 +0,0 @@
repo: src/third_party/icu
patches:
-
author: Ales Pergl <alpergl@microsoft.com>
file: build_gn.patch
description: null
-
author: Cheng Zhao <zcbenz@gmail.com>
file: no_inline_default_constructor.patch
description: null

Просмотреть файл

@ -1,63 +0,0 @@
diff --git a/BUILD.gn b/BUILD.gn
index 76914cd7..a44d7896 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -34,7 +34,7 @@ config("icu_config") {
"U_ENABLE_DYLOAD=0",
]
- if (!is_component_build) {
+ if (!is_component_build && !(is_electron_build && !is_electron_gn_build)) {
defines += [ "U_STATIC_IMPLEMENTATION" ]
}
@@ -537,6 +537,24 @@ component("icui18n") {
":icuuc",
]
+ # In Electron all of ICU is in one binary, hence we must build with
+ # U_COMBINED_IMPLEMENTATION defined.
+ # Also, for the "static_library" configuration, keep icui18n as
+ # a shared library so that other Chromium targets build cleanly.
+ if (is_electron_build && !is_electron_gn_build) {
+ defines += [ "U_COMBINED_IMPLEMENTATION" ]
+
+ if (!is_component_build) {
+ static_component_type = "shared_library"
+
+ # Because GN already applied the wrong defaults (see the
+ # set_defaults("component") statement in BUILDCONFIG.gn) we must reset
+ # the configs and assign those for shared libraries.
+ configs = []
+ configs = default_shared_library_configs
+ }
+ }
+
# ICU uses RTTI, replace the default "no rtti" config.
configs -= [
"//build/config/compiler:no_rtti", # ICU uses RTTI.
@@ -945,6 +963,24 @@ component("icuuc") {
":icudata",
]
+ # In Electron all of ICU is in one binary, hence we must build with
+ # U_COMBINED_IMPLEMENTATION defined.
+ # Also, for the "static_library" configuration, keep icuuc as
+ # a shared library so that other Chromium targets build cleanly.
+ if (is_electron_build && !is_electron_gn_build) {
+ defines += [ "U_COMBINED_IMPLEMENTATION" ]
+
+ if (!is_component_build) {
+ static_component_type = "shared_library"
+
+ # Because GN already applied the wrong defaults (see the
+ # set_defaults("component") statement in BUILDCONFIG.gn) we must reset
+ # the configs and assign those for shared libraries.
+ configs = []
+ configs = default_shared_library_configs
+ }
+ }
+
configs -= [
"//build/config/compiler:no_rtti", # ICU uses RTTI.
"//build/config/compiler:chromium_code",

Просмотреть файл

@ -1,44 +0,0 @@
diff --git a/source/common/unicode/unistr.h b/source/common/unicode/unistr.h
index e0ab0b9e..fe4c673b 100644
--- a/source/common/unicode/unistr.h
+++ b/source/common/unicode/unistr.h
@@ -2957,7 +2957,7 @@ public:
/** Construct an empty UnicodeString.
* @stable ICU 2.0
*/
- inline UnicodeString();
+ UnicodeString();
/**
* Construct a UnicodeString with capacity to hold <TT>capacity</TT> char16_ts
@@ -3915,15 +3915,6 @@ UnicodeString::getArrayStart() const {
fUnion.fStackFields.fBuffer : fUnion.fFields.fArray;
}
-//========================================
-// Default constructor
-//========================================
-
-inline
-UnicodeString::UnicodeString() {
- fUnion.fStackFields.fLengthAndFlags=kShortString;
-}
-
inline UnicodeString::UnicodeString(const std::nullptr_t /*text*/) {
fUnion.fStackFields.fLengthAndFlags=kShortString;
}
diff --git a/source/common/unistr.cpp b/source/common/unistr.cpp
index 1bfb71aa..5495ee91 100644
--- a/source/common/unistr.cpp
+++ b/source/common/unistr.cpp
@@ -146,7 +146,9 @@ UnicodeString::releaseArray() {
// Constructors
//========================================
-// The default constructor is inline in unistr.h.
+UnicodeString::UnicodeString() {
+ fUnion.fStackFields.fLengthAndFlags=kShortString;
+}
UnicodeString::UnicodeString(int32_t capacity, UChar32 c, int32_t count) {
fUnion.fFields.fLengthAndFlags = 0;

Просмотреть файл

@ -1,8 +1,8 @@
diff --git a/BUILD.gn b/BUILD.gn diff --git a/BUILD.gn b/BUILD.gn
index 494ba22f29..6071422d7d 100644 index 4b48f7d687..30e9ec34cf 100644
--- a/BUILD.gn --- a/BUILD.gn
+++ b/BUILD.gn +++ b/BUILD.gn
@@ -157,7 +157,7 @@ config("internal_config") { @@ -192,7 +192,7 @@ config("internal_config") {
include_dirs = [ "." ] include_dirs = [ "." ]
@ -11,58 +11,7 @@ index 494ba22f29..6071422d7d 100644
defines = [ "BUILDING_V8_SHARED" ] defines = [ "BUILDING_V8_SHARED" ]
} }
} }
@@ -174,6 +174,20 @@ config("libplatform_config") { @@ -2912,6 +2912,8 @@ if (v8_use_snapshot && current_toolchain == v8_snapshot_toolchain) {
if (is_component_build) {
defines = [ "USING_V8_PLATFORM_SHARED" ]
}
+
+ # For Electron "static_library" all V8 symbols are together in one DLL.
+ # V8 targets which depend on libplatform need to be built with
+ # BUILDING_V8_PLATFORM_SHARED in order to declare its symbols as exported.
+ #
+ # Caveat:
+ # This setting applies to _all_ dependent targets, even those outside
+ # of V8! Currently there are no other targets dependent on v8_libplatform
+ # which Electron would consume, so we don't need to do more complicated tweaks
+ # but be aware of this and check that it's still the case when upgrading
+ # to newer Chromium version.
+ if (is_electron_build && !is_electron_gn_build && !is_component_build) {
+ defines = [ "BUILDING_V8_PLATFORM_SHARED" ]
+ }
}
# This config should be applied to code using the libbase.
@@ -185,6 +199,20 @@ config("libbase_config") {
if (is_android && current_toolchain != host_toolchain) {
libs += [ "log" ]
}
+
+ # For Electron "static_library" all V8 symbols are together in one DLL.
+ # V8 targets which depend on libbase need to be built with
+ # BUILDING_V8_BASE_SHARED in order to declare its symbols as exported.
+ #
+ # Caveat:
+ # This setting applies to _all_ dependent targets, even those outside
+ # of V8! Currently there are no other targets dependent on v8_libbase
+ # which Electron would consume, so we don't need to do more complicated tweaks
+ # but be aware of this and check that it's still the case when upgrading
+ # to newer Chromium version.
+ if (is_electron_build && !is_electron_gn_build && !is_component_build) {
+ defines = [ "BUILDING_V8_BASE_SHARED" ]
+ }
}
# This config should be applied to code using the libsampler.
@@ -209,7 +209,7 @@ config("libsampler_config") {
# itself.
config("external_config") {
defines = []
- if (is_component_build) {
+ if (is_component_build || (is_electron_build && !is_electron_gn_build)) {
defines += [ "USING_V8_SHARED" ]
}
if (v8_enable_v8_checks) {
@@ -2674,6 +2674,8 @@ if (current_toolchain == v8_snapshot_toolchain) {
configs = [ ":internal_config" ] configs = [ ":internal_config" ]
@ -71,60 +20,3 @@ index 494ba22f29..6071422d7d 100644
deps = [ deps = [
":v8_base", ":v8_base",
":v8_init", ":v8_init",
@@ -2667,7 +2697,7 @@ group("v8_fuzzers") {
]
}
-if (is_component_build) {
+if (is_component_build || (is_electron_build && !is_electron_gn_build)) {
v8_component("v8") {
sources = [
"src/v8dll-main.cc",
@@ -2681,6 +2711,13 @@ if (is_component_build) {
configs = [ ":internal_config" ]
public_configs = [ ":external_config" ]
+
+ # For Electron "static_library" keep V8 as a shared library. This is only
+ # needed so that other targets in Chromium build cleanly. Electron doesn't
+ # need the DLL.
+ if (is_electron_build && !is_electron_gn_build && !is_component_build) {
+ static_component_type = "shared_library"
+ }
}
v8_component("v8_for_testing") {
diff --git a/gni/v8.gni b/gni/v8.gni
index 9a2bb3dff4..53be2017c7 100644
--- a/gni/v8.gni
+++ b/gni/v8.gni
@@ -164,6 +164,16 @@ template("v8_executable") {
template("v8_component") {
component(target_name) {
+ # If this is a non-component build, but this target forces itself to be
+ # a shared library, we must reset the default configs that were applied
+ # (see the set_defaults("component") statement in BUILDCONFIG.gn)
+ # and assign those for shared libraries.
+ if (defined(invoker.static_component_type) &&
+ invoker.static_component_type == "shared_library") {
+ configs = []
+ configs = default_shared_library_configs
+ }
+
forward_variables_from(invoker, "*", [ "configs" ])
configs += invoker.configs
configs -= v8_remove_configs
diff --git a/src/inspector/BUILD.gn b/src/inspector/BUILD.gn
index 699b1bcbd4..11fc31d851 100644
--- a/src/inspector/BUILD.gn
+++ b/src/inspector/BUILD.gn
@@ -79,7 +79,7 @@ action("inspector_injected_script") {
config("inspector_config") {
visibility = [ ":*" ] # Only targets in this file can depend on this.
- if (is_component_build) {
+ if (is_component_build || is_electron_build) {
defines = [ "BUILDING_V8_SHARED" ]
}
}

Просмотреть файл

@ -1,18 +0,0 @@
a157e080931581b5f6f3f9bc580a137e6062e45b
diff --git a/modules/video_coding/rtp_frame_reference_finder.cc b/modules/video_coding/rtp_frame_reference_finder.cc
index be05e56070..09b2593531 100644
--- a/modules/video_coding/rtp_frame_reference_finder.cc
+++ b/modules/video_coding/rtp_frame_reference_finder.cc
@@ -533,6 +533,12 @@ bool RtpFrameReferenceFinder::MissingRequiredFrameVp9(uint16_t picture_id,
size_t gof_idx = diff % info.gof->num_frames_in_gof;
size_t temporal_idx = info.gof->temporal_idx[gof_idx];
+ if (temporal_idx >= kMaxTemporalLayers) {
+ RTC_LOG(LS_WARNING) << "At most " << kMaxTemporalLayers << " temporal "
+ << "layers are supported.";
+ return true;
+ }
+
// For every reference this frame has, check if there is a frame missing in
// the interval (|ref_pid|, |picture_id|) in any of the lower temporal
// layers. If so, we are missing a required frame.