Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package nodejs-electron for openSUSE:Factory
checked in at 2023-10-01 21:22:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/nodejs-electron (Old)
and /work/SRC/openSUSE:Factory/.nodejs-electron.new.28202 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "nodejs-electron"
Sun Oct 1 21:22:18 2023 rev:79 rq:1114318 version:25.8.4
Changes:
--------
--- /work/SRC/openSUSE:Factory/nodejs-electron/nodejs-electron.changes
2023-09-22 21:49:01.224359125 +0200
+++
/work/SRC/openSUSE:Factory/.nodejs-electron.new.28202/nodejs-electron.changes
2023-10-01 21:23:07.674429202 +0200
@@ -1,0 +2,26 @@
+Fri Sep 29 07:04:36 UTC 2023 - Bruno Pitrus <[email protected]>
+
+- New upstream release 25.8.4
+ * Detect system dark theme preference via xdg settings portal on Linux.
+ * Fix heap buffer overflow in libvpx (CVE-2023-5217) (only Fedora 37 and
Leap)
+- Do not build webextensions support which we do not use
+ * add backported build-without-extensions.patch
+
+-------------------------------------------------------------------
+Thu Sep 28 09:13:23 UTC 2023 - Bruno Pitrus <[email protected]>
+
+- New upstream release 25.8.3
+ * Fixed a redundant permission popup while fetching screens and windows
using desktopCapturer.getSources() on Wayland
+ * Fixed crash on shutdown in tls sockets with Node.js HTTP/2 connections.
+
+-------------------------------------------------------------------
+Mon Sep 25 16:53:17 UTC 2023 - Bruno Pitrus <[email protected]>
+
+- Use icu 73 on Leap
+ * drop NumberFormat-icu71-incrementExact.patch
+ * drop intl-objects-icu71-UNUM_APPROXIMATELY_SIGN_FIELD.patch
+ * drop v8-regexp-parser-UCHAR_BASIC_EMOJI.patch
+ * drop v8-icu69-FormattedNumberRange-no-default-constructible.patch
+- Fix unresolvable build on Leap 15.6
+
+-------------------------------------------------------------------
Old:
----
NumberFormat-icu71-incrementExact.patch
electron-25.8.2.tar.zst
intl-objects-icu71-UNUM_APPROXIMATELY_SIGN_FIELD.patch
v8-icu69-FormattedNumberRange-no-default-constructible.patch
v8-regexp-parser-UCHAR_BASIC_EMOJI.patch
New:
----
build-without-extensions.patch
electron-25.8.4.tar.zst
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ nodejs-electron.spec ++++++
--- /var/tmp/diff_new_pack.c56riK/_old 2023-10-01 21:23:16.526749513 +0200
+++ /var/tmp/diff_new_pack.c56riK/_new 2023-10-01 21:23:16.526749513 +0200
@@ -94,7 +94,7 @@
%ifnarch %ix86 %arm aarch64
# OBS does not have enough powerful machines to build with LTO on aarch64.
-%if (0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150600 || 0%{?fedora})
+%if (0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150700 || 0%{?fedora})
%bcond_without lto
%else
%bcond_with lto
@@ -125,23 +125,21 @@
%endif
-%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150600 || 0%{?fedora}
+%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150700 || 0%{?fedora}
%bcond_without harfbuzz_5
%bcond_without link_vulkan
%bcond_without system_avif
-%bcond_without icu_71
%bcond_without ffmpeg_5
%bcond_without system_spirv
%else
%bcond_with harfbuzz_5
%bcond_with link_vulkan
%bcond_with system_avif
-%bcond_with icu_71
%bcond_with ffmpeg_5
%bcond_with system_spirv
%endif
-%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150600 || 0%{?fedora} >=
38
+%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150700 || 0%{?fedora} >=
38
%bcond_without system_aom
%bcond_without system_vpx
%else
@@ -170,21 +168,16 @@
# Abseil is broken in Leap
# enable this when boo#1203378 and boo#1203379 get fixed
-%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150600 || 0%{?fedora} >=
37
-%if %{without clang}
+%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150700 || 0%{?fedora} >=
37
%bcond_without system_abseil
-%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150600 || 0%{?fedora} >=
39
+%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150700 || 0%{?fedora} >=
39
%bcond_without abseil_2023
%else
%bcond_with abseil_2023
%endif
%else
-# Clang has several problems with std::optional used by system abseil
-%bcond_with system_abseil
-%endif
-%else
%bcond_with system_abseil
%endif
@@ -204,7 +197,7 @@
Name: nodejs-electron
-Version: 25.8.2
+Version: 25.8.4
Release: 0
Summary: Build cross platform desktop apps with JavaScript, HTML, and
CSS
License: AFL-2.0 AND Apache-2.0 AND blessing AND BSD-2-Clause AND
BSD-3-Clause AND BSD-Protection AND BSD-Source-Code AND bzip2-1.0.6 AND IJG AND
ISC AND LGPL-2.0-or-later AND LGPL-2.1-or-later AND MIT AND MIT-CMU AND
MIT-open-group AND (MPL-1.1 OR GPL-2.0-or-later OR LGPL-2.1-or-later) AND
MPL-2.0 AND OpenSSL AND SGI-B-2.0 AND SUSE-Public-Domain AND X11
@@ -224,10 +217,6 @@
# Reverse upstream changes to be able to build against ffmpeg-4
Source400: ffmpeg-new-channel-layout.patch
Source401: audio_file_reader-ffmpeg-AVFrame-duration.patch
-# â¦and against icu-69
-Source410: NumberFormat-icu71-incrementExact.patch
-Source411: intl-objects-icu71-UNUM_APPROXIMATELY_SIGN_FIELD.patch
-Source412: v8-regexp-parser-UCHAR_BASIC_EMOJI.patch
# and against harfbuzz 4
Source415: harfbuzz-replace-chromium-scoped-type.patch
Source416: harfbuzz-replace-HbScopedPointer.patch
@@ -309,7 +298,6 @@
# Fix electron patched code
Patch2024: electron-16-std-vector-non-const.patch
Patch2029: electron-16-webpack-fix-openssl-3.patch
-Patch2030: v8-icu69-FormattedNumberRange-no-default-constructible.patch
Patch2031: partition_alloc-no-lto.patch
Patch2032: seccomp_bpf-no-lto.patch
# adjust to llhttp 8 api changes
@@ -351,6 +339,8 @@
Patch3208: mojo_ukm_recorder-missing-WrapUnique.patch
Patch3209: electron_browser_context-missing-variant.patch
Patch3210: electron_api_app-GetPathConstant-non-constexpr.patch
+# https://github.com/electron/electron/pull/40032
+Patch3211: build-without-extensions.patch
%if %{with clang}
BuildRequires: clang
@@ -510,20 +500,7 @@
%if %{with harfbuzz_5}
BuildRequires: pkgconfig(harfbuzz) >= 5
%endif
-
-
-%if %{with icu_71}
BuildRequires: pkgconfig(icu-i18n) >= 71
-%else
-
-%if 0%{?fedora}
-BuildRequires: libicu-devel < 70
-%else
-BuildRequires: icu.691-devel
-%endif
-
-%endif
-
BuildRequires: pkgconfig(jsoncpp)
BuildRequires: pkgconfig(krb5)
%if %{with ffmpeg_5}
@@ -584,6 +561,10 @@
BuildRequires: pkgconfig(Qt5Widgets)
%endif
BuildRequires: pkgconfig(re2)
+%if %{without system_abseil}
+#re2-11 has abseil as a public dependency. The headers collide with the
bundled ones, causing linker errors.
+BuildRequires: cmake(re2) < 11
+%endif
%if %{with system_spirv}
%if 0%{?suse_version}
BuildRequires: spirv-headers
@@ -608,7 +589,7 @@
BuildRequires: pkgconfig(vpx) >= 1.13~
%endif
%if %{without clang}
-%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150600 || 0%{?fedora}
+%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150700 || 0%{?fedora}
BuildRequires: gcc >= 12
BuildRequires: gcc-c++ >= 12
%else
@@ -649,14 +630,6 @@
Requires: nodejs-electron%{?_isa} = %{version}
Requires: pkgconfig(zlib)
-%if %{without icu_71}
-#SUSE patched code includes icu headers
-%if 0%{?fedora}
-Requires: libicu-devel%{?_isa}
-%else
-Requires: icu.691-devel%{?_isa}
-%endif
-%endif
%description devel
Development headers for Electron projects.
@@ -701,14 +674,6 @@
patch -R -p1 < %SOURCE416
%endif
-%if %{without icu_71}
-patch -R -p1 < %SOURCE410
-patch -R -p1 < %SOURCE411
-patch -R -p1 < %SOURCE412
-%else
-patch -R -p1 < %PATCH2030
-%endif
-
%if %{without wayland_21}
patch -R -p1 < %SOURCE418
@@ -843,7 +808,7 @@
%endif #ifarch ix86 arm
-%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150600 || 0%{?fedora}
+%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150700 || 0%{?fedora}
export CC=gcc
export CXX=g++
export AR=gcc-ar
@@ -1108,7 +1073,8 @@
myconf_gn+=" enable_plugins=false"
myconf_gn+=" enable_ppapi=false"
-
+#do not build webextensions support
+myconf_gn+=' enable_electron_extensions=false'
# The option below get overriden by whatever is in CFLAGS/CXXFLAGS, so they
affect only C++ code.
# symbol_level=2 is full debug
++++++ build-without-extensions.patch ++++++
>From 1e668a95cb15dd3b8c0a2ab5826e6c9e6e8c6c98 Mon Sep 17 00:00:00 2001
From: Shelley Vohr <[email protected]>
Date: Thu, 28 Sep 2023 12:06:13 +0200
Subject: [PATCH 1/3] fix: ENABLE_EXTENSIONS -> ENABLE_ELECTRON_EXTENSIONS
---
shell/browser/electron_browser_client.cc | 6 +++---
shell/browser/hid/electron_hid_delegate.cc | 9 +++++----
shell/browser/plugins/plugin_utils.cc | 6 +++---
shell/browser/usb/electron_usb_delegate.cc | 20 +++++++++----------
.../print_render_frame_helper_delegate.cc | 14 ++++++-------
shell/renderer/renderer_client_base.cc | 16 +++++++--------
6 files changed, 36 insertions(+), 35 deletions(-)
diff --git a/shell/browser/electron_browser_client.cc
b/shell/browser/electron_browser_client.cc
index 1428fdfad3b4e..7d89d513199ef 100644
--- a/electron/shell/browser/electron_browser_client.cc
+++ b/electron/shell/browser/electron_browser_client.cc
@@ -1220,12 +1220,12 @@ void ElectronBrowserClient::
protocol_registry->RegisterURLLoaderFactories(factories,
false /* allow_file_access */);
-#if BUILDFLAG(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
factories->emplace(
extensions::kExtensionScheme,
extensions::CreateExtensionServiceWorkerScriptURLLoaderFactory(
browser_context));
-#endif // BUILDFLAG(ENABLE_EXTENSIONS)
+#endif // BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
}
bool ElectronBrowserClient::ShouldTreatURLSchemeAsFirstPartyWhenTopLevel(
@@ -1473,7 +1473,7 @@ void ElectronBrowserClient::
},
&render_frame_host));
#endif
-#if BUILDFLAG(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
associated_registry.AddInterface<extensions::mojom::LocalFrameHost>(
base::BindRepeating(
[](content::RenderFrameHost* render_frame_host,
diff --git a/shell/browser/hid/electron_hid_delegate.cc
b/shell/browser/hid/electron_hid_delegate.cc
index 0fef6977e96aa..5900b16412177 100644
--- a/electron/shell/browser/hid/electron_hid_delegate.cc
+++ b/electron/shell/browser/hid/electron_hid_delegate.cc
@@ -11,6 +11,7 @@
#include "base/containers/contains.h"
#include "chrome/common/chrome_features.h"
#include "content/public/browser/web_contents.h"
+#include "electron/buildflags/buildflags.h"
#include "services/device/public/cpp/hid/hid_switches.h"
#include "shell/browser/electron_permission_manager.h"
#include "shell/browser/hid/hid_chooser_context.h"
@@ -19,9 +20,9 @@
#include "shell/browser/web_contents_permission_helper.h"
#include "third_party/blink/public/common/permissions/permission_utils.h"
-#if BUILDFLAG(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
#include "extensions/common/constants.h"
-#endif // BUILDFLAG(ENABLE_EXTENSIONS)
+#endif // BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
namespace {
@@ -128,14 +129,14 @@ bool ElectronHidDelegate::IsFidoAllowedForOrigin(
bool ElectronHidDelegate::IsServiceWorkerAllowedForOrigin(
const url::Origin& origin) {
-#if BUILDFLAG(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
// WebHID is only available on extension service workers with feature flag
// enabled for now.
if (base::FeatureList::IsEnabled(
features::kEnableWebHidOnExtensionServiceWorker) &&
origin.scheme() == extensions::kExtensionScheme)
return true;
-#endif // BUILDFLAG(ENABLE_EXTENSIONS)
+#endif // BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
return false;
}
diff --git a/shell/browser/plugins/plugin_utils.cc
b/shell/browser/plugins/plugin_utils.cc
index b3c7490e9d871..2b569d4ec419a 100644
--- a/electron/shell/browser/plugins/plugin_utils.cc
+++ b/electron/shell/browser/plugins/plugin_utils.cc
@@ -9,11 +9,11 @@
#include "base/containers/contains.h"
#include "base/values.h"
#include "content/public/common/webplugininfo.h"
-#include "extensions/buildflags/buildflags.h"
+#include "electron/buildflags/buildflags.h"
#include "url/gurl.h"
#include "url/origin.h"
-#if BUILDFLAG(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_util.h"
#include "extensions/common/constants.h"
@@ -36,7 +36,7 @@ base::flat_map<std::string, std::string>
PluginUtils::GetMimeTypeToExtensionIdMap(
content::BrowserContext* browser_context) {
base::flat_map<std::string, std::string> mime_type_to_extension_id_map;
-#if BUILDFLAG(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
std::vector<std::string> allowed_extension_ids =
MimeTypesHandler::GetMIMETypeAllowlist();
// Go through the white-listed extensions and try to use them to intercept
diff --git a/shell/browser/usb/electron_usb_delegate.cc
b/shell/browser/usb/electron_usb_delegate.cc
index 8bb5726cf5fcd..72dc42486cc4e 100644
--- a/electron/shell/browser/usb/electron_usb_delegate.cc
+++ b/electron/shell/browser/usb/electron_usb_delegate.cc
@@ -13,7 +13,7 @@
#include "base/scoped_observation.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents.h"
-#include "extensions/buildflags/buildflags.h"
+#include "electron/buildflags/buildflags.h"
#include "services/device/public/mojom/usb_enumeration_options.mojom.h"
#include "shell/browser/electron_permission_manager.h"
#include "shell/browser/usb/usb_chooser_context.h"
@@ -21,7 +21,7 @@
#include "shell/browser/usb/usb_chooser_controller.h"
#include "shell/browser/web_contents_permission_helper.h"
-#if BUILDFLAG(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
#include "base/containers/fixed_flat_set.h"
#include "chrome/common/chrome_features.h"
#include "extensions/browser/extension_registry.h"
@@ -41,7 +41,7 @@ electron::UsbChooserContext* GetChooserContext(
browser_context);
}
-#if BUILDFLAG(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
// These extensions can claim the smart card USB class and automatically gain
// permissions for devices that have an interface with this class.
constexpr auto kSmartCardPrivilegedExtensionIds =
@@ -65,12 +65,12 @@ bool DeviceHasInterfaceWithClass(
}
return false;
}
-#endif // BUILDFLAG(ENABLE_EXTENSIONS)
+#endif // BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
bool IsDevicePermissionAutoGranted(
const url::Origin& origin,
const device::mojom::UsbDeviceInfo& device_info) {
-#if BUILDFLAG(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
// Note: The `DeviceHasInterfaceWithClass()` call is made after checking the
// origin, since that method call is expensive.
if (origin.scheme() == extensions::kExtensionScheme &&
@@ -79,7 +79,7 @@ bool IsDevicePermissionAutoGranted(
device::mojom::kUsbSmartCardClass)) {
return true;
}
-#endif // BUILDFLAG(ENABLE_EXTENSIONS)
+#endif // BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
return false;
}
@@ -251,14 +251,14 @@ ElectronUsbDelegate::GetContextObserver(
bool ElectronUsbDelegate::IsServiceWorkerAllowedForOrigin(
const url::Origin& origin) {
-#if BUILDFLAG(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
// WebUSB is only available on extension service workers for now.
if (base::FeatureList::IsEnabled(
features::kEnableWebUsbOnExtensionServiceWorker) &&
origin.scheme() == extensions::kExtensionScheme) {
return true;
}
-#endif // BUILDFLAG(ENABLE_EXTENSIONS)
+#endif // BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
return false;
}
diff --git a/shell/renderer/printing/print_render_frame_helper_delegate.cc
b/shell/renderer/printing/print_render_frame_helper_delegate.cc
index c104cb145d5fd..d857ea5f824fc 100644
--- a/electron/shell/renderer/printing/print_render_frame_helper_delegate.cc
+++ b/electron/shell/renderer/printing/print_render_frame_helper_delegate.cc
@@ -7,15 +7,15 @@
#include <utility>
#include "content/public/renderer/render_frame.h"
-#include "extensions/buildflags/buildflags.h"
+#include "electron/buildflags/buildflags.h"
#include "third_party/blink/public/web/web_element.h"
#include "third_party/blink/public/web/web_local_frame.h"
-#if BUILDFLAG(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
#include "chrome/common/pdf_util.h"
#include "extensions/common/constants.h"
#include
"extensions/renderer/guest_view/mime_handler_view/post_message_support.h"
-#endif // BUILDFLAG(ENABLE_EXTENSIONS)
+#endif // BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
namespace electron {
@@ -26,14 +26,14 @@
PrintRenderFrameHelperDelegate::~PrintRenderFrameHelperDelegate() = default;
// Return the PDF object element if |frame| is the out of process PDF
extension.
blink::WebElement PrintRenderFrameHelperDelegate::GetPdfElement(
blink::WebLocalFrame* frame) {
-#if BUILDFLAG(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
if (frame->Parent() &&
IsPdfInternalPluginAllowedOrigin(frame->Parent()->GetSecurityOrigin())) {
auto plugin_element = frame->GetDocument().QuerySelector("embed");
DCHECK(!plugin_element.IsNull());
return plugin_element;
}
-#endif // BUILDFLAG(ENABLE_EXTENSIONS)
+#endif // BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
return blink::WebElement();
}
@@ -43,7 +43,7 @@ bool PrintRenderFrameHelperDelegate::IsPrintPreviewEnabled() {
bool PrintRenderFrameHelperDelegate::OverridePrint(
blink::WebLocalFrame* frame) {
-#if BUILDFLAG(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
auto* post_message_support =
extensions::PostMessageSupport::FromWebLocalFrame(frame);
if (post_message_support) {
@@ -56,7 +56,7 @@ bool PrintRenderFrameHelperDelegate::OverridePrint(
post_message_support->PostMessageFromValue(base::Value(std::move(message)));
return true;
}
-#endif // BUILDFLAG(ENABLE_EXTENSIONS)
+#endif // BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
return false;
}
diff --git a/shell/renderer/renderer_client_base.cc
b/shell/renderer/renderer_client_base.cc
index b80ba7a487394..d456d414f1c29 100644
--- a/electron/shell/renderer/renderer_client_base.cc
+++ b/electron/shell/renderer/renderer_client_base.cc
@@ -235,14 +235,6 @@ void RendererClientBase::RenderThreadStarted() {
extensions::ExtensionsRendererClient::Set(extensions_renderer_client_.get());
thread->AddObserver(extensions_renderer_client_->GetDispatcher());
-#endif
-
-#if BUILDFLAG(ENABLE_BUILTIN_SPELLCHECKER)
- spellcheck_ = std::make_unique<SpellCheck>(this);
-#endif
-
- blink::WebCustomElement::AddEmbedderCustomElementName("webview");
- blink::WebCustomElement::AddEmbedderCustomElementName("browserplugin");
WTF::String extension_scheme(extensions::kExtensionScheme);
// Extension resources are HTTP-like and safe to expose to the fetch API. The
@@ -255,6 +247,14 @@ void RendererClientBase::RenderThreadStarted() {
extension_scheme);
blink::SchemeRegistry::RegisterURLSchemeAsBypassingContentSecurityPolicy(
extension_scheme);
+#endif
+
+#if BUILDFLAG(ENABLE_BUILTIN_SPELLCHECKER)
+ spellcheck_ = std::make_unique<SpellCheck>(this);
+#endif
+
+ blink::WebCustomElement::AddEmbedderCustomElementName("webview");
+ blink::WebCustomElement::AddEmbedderCustomElementName("browserplugin");
std::vector<std::string> fetch_enabled_schemes =
ParseSchemesCLISwitch(command_line, switches::kFetchSchemes);
>From 1b3f3a130397f7145271026f8e0fc720151d6d7c Mon Sep 17 00:00:00 2001
From: Shelley Vohr <[email protected]>
Date: Thu, 28 Sep 2023 12:11:45 +0200
Subject: [PATCH 2/3] fix: extension guard fixes
---
shell/browser/electron_browser_client.cc | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/shell/browser/electron_browser_client.cc
b/shell/browser/electron_browser_client.cc
index 7d89d513199ef..9626d7a4270bf 100644
--- a/electron/shell/browser/electron_browser_client.cc
+++ b/electron/shell/browser/electron_browser_client.cc
@@ -57,7 +57,7 @@
#include "crypto/crypto_buildflags.h"
#include "electron/buildflags/buildflags.h"
#include "electron/shell/common/api/api.mojom.h"
-#include "extensions/browser/api/messaging/messaging_api_message_filter.h"
+#include "extensions/browser/extension_navigation_ui_data.h"
#include "mojo/public/cpp/bindings/binder_map.h"
#include "net/ssl/ssl_cert_request_info.h"
#include "ppapi/buildflags/buildflags.h"
@@ -114,6 +114,7 @@
#include "shell/common/options_switches.h"
#include "shell/common/platform_util.h"
#include "shell/common/thread_restrictions.h"
+#include
"third_party/blink/public/common/associated_interfaces/associated_interface_registry.h"
#include "third_party/blink/public/common/loader/url_loader_throttle.h"
#include "third_party/blink/public/common/tokens/tokens.h"
#include "third_party/blink/public/common/web_preferences/web_preferences.h"
@@ -147,6 +148,7 @@
#include "content/public/browser/child_process_security_policy.h"
#include "content/public/browser/file_url_loader.h"
#include "content/public/browser/web_ui_url_loader_factory.h"
+#include "extensions/browser/api/messaging/messaging_api_message_filter.h"
#include "extensions/browser/api/mime_handler_private/mime_handler_private.h"
#include "extensions/browser/api/web_request/web_request_api.h"
#include "extensions/browser/browser_context_keyed_api_factory.h"
@@ -154,7 +156,6 @@
#include "extensions/browser/extension_host.h"
#include "extensions/browser/extension_message_filter.h"
#include "extensions/browser/extension_navigation_throttle.h"
-#include "extensions/browser/extension_navigation_ui_data.h"
#include "extensions/browser/extension_prefs.h"
#include "extensions/browser/extension_protocols.h"
#include "extensions/browser/extension_registry.h"
@@ -172,7 +173,6 @@
#include "shell/browser/extensions/electron_extension_message_filter.h"
#include "shell/browser/extensions/electron_extension_system.h"
#include "shell/browser/extensions/electron_extension_web_contents_observer.h"
-#include
"third_party/blink/public/common/associated_interfaces/associated_interface_registry.h"
#endif
#if BUILDFLAG(ENABLE_PLUGINS)
@@ -1413,9 +1413,10 @@ void
ElectronBrowserClient::OverrideURLLoaderFactoryParams(
factory_params->disable_web_security = true;
}
}
-
+#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
extensions::URLLoaderFactoryManager::OverrideURLLoaderFactoryParams(
browser_context, origin, is_for_isolated_world, factory_params);
+#endif
}
void ElectronBrowserClient::
>From 4986472bab8bd1caaa42ddb6a3501d64a467d01d Mon Sep 17 00:00:00 2001
From: Shelley Vohr <[email protected]>
Date: Thu, 28 Sep 2023 14:05:24 +0200
Subject: [PATCH 3/3] chore: fix linker errors
---
chromium_src/BUILD.gn | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/chromium_src/BUILD.gn b/chromium_src/BUILD.gn
index 24a0b75401807..de47d024a882a 100644
--- a/electron/chromium_src/BUILD.gn
+++ b/electron/chromium_src/BUILD.gn
@@ -338,6 +338,34 @@ static_library("chrome") {
"//components/pdf/renderer",
]
}
+ } else {
+ # These are required by the webRequest module.
+ sources += [
+ "//extensions/browser/api/declarative_net_request/request_action.cc",
+ "//extensions/browser/api/declarative_net_request/request_action.h",
+ "//extensions/browser/api/web_request/form_data_parser.cc",
+ "//extensions/browser/api/web_request/form_data_parser.h",
+ "//extensions/browser/api/web_request/upload_data_presenter.cc",
+ "//extensions/browser/api/web_request/upload_data_presenter.h",
+ "//extensions/browser/api/web_request/web_request_api_constants.cc",
+ "//extensions/browser/api/web_request/web_request_api_constants.h",
+ "//extensions/browser/api/web_request/web_request_info.cc",
+ "//extensions/browser/api/web_request/web_request_info.h",
+ "//extensions/browser/api/web_request/web_request_resource_type.cc",
+ "//extensions/browser/api/web_request/web_request_resource_type.h",
+ "//extensions/browser/extension_api_frame_id_map.cc",
+ "//extensions/browser/extension_api_frame_id_map.h",
+ "//extensions/browser/extension_navigation_ui_data.cc",
+ "//extensions/browser/extension_navigation_ui_data.h",
+ "//extensions/browser/extensions_browser_client.cc",
+ "//extensions/browser/extensions_browser_client.h",
+ "//extensions/browser/guest_view/web_view/web_view_renderer_state.cc",
+ "//extensions/browser/guest_view/web_view/web_view_renderer_state.h",
+ ]
+
+ public_deps += [
+
"//extensions/browser/api/declarative_net_request/flat:extension_ruleset",
+ ]
}
if (!is_mas_build) {
--- src/extensions/browser/guest_view/web_view/web_view_guest.cc.old
2023-09-28 10:14:03.660044621 +0200
+++ src/extensions/browser/guest_view/web_view/web_view_guest.cc
2023-09-29 08:05:41.827245244 +0200
@@ -285,9 +285,6 @@ std::string WebViewGuest::GetPartitionID
}
// static
-const char WebViewGuest::Type[] = "webview";
-
-// static
int WebViewGuest::GetOrGenerateRulesRegistryID(int embedder_process_id,
int webview_instance_id) {
bool is_web_view = embedder_process_id && webview_instance_id;
--- src/extensions/browser/guest_view/web_view/web_view_guest.h.old
2023-09-28 10:14:03.660044621 +0200
+++ src/extensions/browser/guest_view/web_view/web_view_guest.h 2023-09-29
08:06:13.200529820 +0200
@@ -49,7 +49,7 @@ class WebViewGuest : public guest_view::
int embedder_process_id,
int view_instance_id);
- static const char Type[];
+ constexpr static const char Type[] = "webview";
// Returns the WebView partition ID associated with the render process
// represented by |render_process_host|, if any. Otherwise, an empty string
is