Skip to content

Commit

Permalink
chore: bump chromium to 93.0.4577.51 (14-x-y) (#30520)
Browse files Browse the repository at this point in the history
* chore: bump chromium in DEPS to 93.0.4577.42

* ci: update git on CI machines

(cherry picked from commit 9b2e028)

* chore: update patches

* test fix for (unrelated) bug showing up on linux-asan

(cherry picked from commit a65d2da)

* Disable kDesktopCaptureMacV2

https: //chromium-review.googlesource.com/c/chromium/src/+/3069272
(cherry picked from commit 4b308cb)
Co-Authored-By: Robo <hop2deep@gmail.com>

* chore: fix lint

(cherry picked from commit ed0d9ad)

* fixup Disable kDesktopCaptureMacV2

* chore: bump chromium in DEPS to 93.0.4577.51

* chore: update patches

* Disable kDesktopCaptureMacV2

https://chromium-review.googlesource.com/c/chromium/src/+/3069272
(cherry picked from commit 205e477)

* ci: run main and remote woa tests separately

(cherry picked from commit 1de8f74)

* fixup! Disable kDesktopCaptureMacV2

(cherry picked from commit bc6b974)

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
Co-authored-by: Robo <hop2deep@gmail.com>
  • Loading branch information
5 people committed Aug 23, 2021
1 parent e52c9e3 commit a279250
Show file tree
Hide file tree
Showing 21 changed files with 137 additions and 67 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Expand Up @@ -67,7 +67,7 @@ executors:
type: enum
enum: ["medium", "xlarge", "2xlarge+"]
docker:
- image: electron.azurecr.io/build:4fc81b50f9c0980699d329bc32062fac20a26701
- image: electron.azurecr.io/build:d818f06a9b1540c7fd38f75ad5a2c493dd6843b6
resource_class: << parameters.size >>

macos:
Expand Down
2 changes: 1 addition & 1 deletion DEPS
Expand Up @@ -15,7 +15,7 @@ gclient_gn_args = [

vars = {
'chromium_version':
'93.0.4577.25',
'93.0.4577.51',
'node_version':
'v14.17.0',
'nan_version':
Expand Down
31 changes: 28 additions & 3 deletions azure-pipelines-woa.yml
Expand Up @@ -53,6 +53,16 @@ steps:
env:
APPVEYOR_TOKEN: $(APPVEYOR_TOKEN)

- powershell: |
$localArtifactPath = "$pwd\src\pdb.zip"
$serverArtifactPath = "$env:APPVEYOR_URL/buildjobs/$env:APPVEYOR_JOB_ID/artifacts/pdb.zip"
Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer $env:APPVEYOR_TOKEN" }
cd src
& "${env:ProgramFiles(x86)}\7-Zip\7z.exe" x -y pdb.zip
displayName: 'Download pdb files for detailed stacktraces'
env:
APPVEYOR_TOKEN: $(APPVEYOR_TOKEN)

- powershell: |
New-Item src\out\Default\gen\node_headers\Release -Type directory
Copy-Item -path src\out\Default\electron.lib -destination src\out\Default\gen\node_headers\Release\node.lib
Expand All @@ -63,15 +73,30 @@ steps:
set npm_config_nodedir=%cd%\out\Default\gen\node_headers
set npm_config_arch=arm64
cd electron
# CalculateNativeWinOcclusion is disabled due to https://bugs.chromium.org/p/chromium/issues/detail?id=1139022
node script/yarn test -- --enable-logging --verbose --disable-features=CalculateNativeWinOcclusion
displayName: 'Run Electron tests'
node script/yarn test --runners=main --runTestFilesSeperately --enable-logging --disable-features=CalculateNativeWinOcclusion
displayName: 'Run Electron Main process tests'
env:
ELECTRON_ENABLE_STACK_DUMPING: true
ELECTRON_OUT_DIR: Default
IGNORE_YARN_INSTALL_ERROR: 1
ELECTRON_TEST_RESULTS_DIR: junit
MOCHA_MULTI_REPORTERS: 'mocha-junit-reporter, tap'
MOCHA_REPORTER: mocha-multi-reporters

- script: |
cd src
set npm_config_nodedir=%cd%\out\Default\gen\node_headers
set npm_config_arch=arm64
cd electron
node script/yarn test --runners=remote --enable-logging --disable-features=CalculateNativeWinOcclusion
displayName: 'Run Electron Remote based tests'
env:
ELECTRON_OUT_DIR: Default
IGNORE_YARN_INSTALL_ERROR: 1
ELECTRON_TEST_RESULTS_DIR: junit
MOCHA_MULTI_REPORTERS: 'mocha-junit-reporter, tap'
MOCHA_REPORTER: mocha-multi-reporters
condition: always()

- task: PublishTestResults@2
displayName: 'Publish Test Results'
Expand Down
8 changes: 4 additions & 4 deletions patches/chromium/add_didinstallconditionalfeatures.patch
Expand Up @@ -23,10 +23,10 @@ index e24c169444c699f295de2c1f1f42683eeca73436..4675cdccb1876a318a9a0253cdf552bb
int32_t world_id) {}
virtual void DidClearWindowObject() {}
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 5f7a44233f04adddf7f5a4cd9b40fc0497961fbc..2ce30e48d579fbd06efb6b8464dce7d483bbd6b3 100644
index 118192cb4ea365f4b8fc84a802b9c6bb030461fc..6d1d25efeb8529c8af54d5429bf33a9dcad286aa 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -4420,6 +4420,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
@@ -4456,6 +4456,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
observer.DidCreateScriptContext(context, world_id);
}

Expand All @@ -40,10 +40,10 @@ index 5f7a44233f04adddf7f5a4cd9b40fc0497961fbc..2ce30e48d579fbd06efb6b8464dce7d4
int world_id) {
for (auto& observer : observers_)
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index 240152022c7d489d81fbadddcb672b02d87443c4..6c8f1e51d646d7925801111ee857af569f28033d 100644
index aff9b0217d9baf1cdb0724c1ecf9676c136c334d..64253b0e96aa12273ea4c8181274e58e139829e6 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -586,6 +586,8 @@ class CONTENT_EXPORT RenderFrameImpl
@@ -589,6 +589,8 @@ class CONTENT_EXPORT RenderFrameImpl
blink::WebLocalFrameClient::LazyLoadBehavior lazy_load_behavior) override;
void DidCreateScriptContext(v8::Local<v8::Context> context,
int world_id) override;
Expand Down
2 changes: 1 addition & 1 deletion patches/chromium/build_add_electron_tracing_category.patch
Expand Up @@ -8,7 +8,7 @@ categories in use are known / declared. This patch is required for us
to introduce a new Electron category for Electron-specific tracing.

diff --git a/base/trace_event/builtin_categories.h b/base/trace_event/builtin_categories.h
index a9616406d4d3742c90aa0d1cf65ab84cfb8890ed..32142ed13cfca009e09578dff79e94030233cfbf 100644
index bb47926b3d3ee58e11e9814223384690dd68dac1..f92d53109c9c02c2d144c7397b3653402a09cab0 100644
--- a/base/trace_event/builtin_categories.h
+++ b/base/trace_event/builtin_categories.h
@@ -77,6 +77,7 @@
Expand Down
Expand Up @@ -46,7 +46,7 @@ index 17e03f58263b5254cec991386536286de3b41600..65fdfcec6894249996fa12b947136247
}

diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index 1625f8917ac257f11f4637ea60eca586ec2492a3..dc0f43e955994fba9dc597c08133a4438ebf1c45 100644
index 139a04d6cbc1376340cf73a395e051fd2c7c9b11..73f0b275da7fef57f6c9956a16b5370f6771feac 100644
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -5281,7 +5281,6 @@ test("unit_tests") {
Expand Down
2 changes: 1 addition & 1 deletion patches/chromium/can_create_window.patch
Expand Up @@ -9,7 +9,7 @@ potentially prevent a window from being created.
TODO(loc): this patch is currently broken.

diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
index ee638fbd09ad247756659a5345ee58abed7dc6cd..c842246f9250c45793c4e763f1de3f2b486a56aa 100644
index d0899ee86e4cd3906bc324bc7879d458d204ebc8..ecfa972c0e169f235a98239022681b423ce06b78 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -6280,6 +6280,7 @@ void RenderFrameHostImpl::CreateNewWindow(
Expand Down
Expand Up @@ -362,7 +362,7 @@ index bb90319f768ed2f3a3e530d64bf622de585ce163..d84de1d218267887f6b8624f913438eb
content::RenderFrameHost* opener,
content::SiteInstance* source_site_instance,
diff --git a/fuchsia/engine/browser/frame_impl.cc b/fuchsia/engine/browser/frame_impl.cc
index bfe73ea9811890f3a0175f2b8cd14459fec980c1..fc4a2a879cd4b1914849b5cadba78caf4c16d804 100644
index 3fe03fbabb182fa38f0bb17d4904f645531a536f..3f6c4bb2437b5032b758a0ba486fb0967408ecb7 100644
--- a/fuchsia/engine/browser/frame_impl.cc
+++ b/fuchsia/engine/browser/frame_impl.cc
@@ -388,8 +388,7 @@ bool FrameImpl::IsWebContentsCreationOverridden(
Expand Down
16 changes: 14 additions & 2 deletions patches/chromium/desktop_media_list.patch
Expand Up @@ -20,6 +20,7 @@ the implementation in a given frame.
but this call is not a one-shot but rather repeats the observer
signals for every frame. This is the call which chrome currently
uses.
* Disabled WindowCaptureMacV2 feature for https://github.com/electron/electron/pull/30507

This patch allows us to get the one-shot effect with the above classes.

Expand Down Expand Up @@ -128,7 +129,7 @@ index ad7f766a36b1b6b2a8bc0f96369f1aaadf6681f7..f6c6c14a0937430df62c9b9c1132c591
protected:
virtual ~DesktopMediaListObserver() {}
diff --git a/chrome/browser/media/webrtc/native_desktop_media_list.cc b/chrome/browser/media/webrtc/native_desktop_media_list.cc
index 0d38b92ccb7ef1ada0d2165d714d80a844c999b8..d1254c8e1acbadb3a1976097031889f19a02554d 100644
index 5a851f4c89b4ed2b41640bf8bad47b7d8eba8ca1..7687bad18acad2cd607d14d3d3ac39f81e7dcc8a 100644
--- a/chrome/browser/media/webrtc/native_desktop_media_list.cc
+++ b/chrome/browser/media/webrtc/native_desktop_media_list.cc
@@ -11,15 +11,16 @@
Expand All @@ -149,7 +150,18 @@ index 0d38b92ccb7ef1ada0d2165d714d80a844c999b8..d1254c8e1acbadb3a1976097031889f1
#include "media/base/video_util.h"
#include "third_party/libyuv/include/libyuv/scale_argb.h"
#include "third_party/skia/include/core/SkBitmap.h"
@@ -266,6 +267,8 @@ void NativeDesktopMediaList::Worker::RefreshNextThumbnail() {
@@ -94,8 +95,9 @@ gfx::ImageSkia ScaleDesktopFrame(std::unique_ptr<webrtc::DesktopFrame> frame,
}

#if defined(OS_MAC)
+// Refs https://github.com/electron/electron/pull/30507
const base::Feature kWindowCaptureMacV2{"WindowCaptureMacV2",
- base::FEATURE_ENABLED_BY_DEFAULT};
+ base::FEATURE_DISABLED_BY_DEFAULT};
#endif

} // namespace
@@ -271,6 +273,8 @@ void NativeDesktopMediaList::Worker::RefreshNextThumbnail() {
FROM_HERE,
base::BindOnce(&NativeDesktopMediaList::UpdateNativeThumbnailsFinished,
media_list_));
Expand Down
4 changes: 2 additions & 2 deletions patches/chromium/disable_color_correct_rendering.patch
Expand Up @@ -241,7 +241,7 @@ index 59b34cdb1dc63b8d239cae5397b2a5a4f607bf1c..e2f556532459b1129465ca2b83aa1485
sandbox::policy::switches::kGpuSandboxAllowSysVShm,
sandbox::policy::switches::kGpuSandboxFailuresFatal,
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 224e23ad3584dd4511a4173d632547d4a2ee4e9c..0dbb7fad5c9f3b3889b0825d553992d6fe2745f9 100644
index 9e9316c0bbbecbf425fb04f2cef9bb4f5caf98c6..bd24cb0f6edc37bf23c40f0a7839a2f5d85c9a01 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -217,6 +217,7 @@
Expand All @@ -252,7 +252,7 @@ index 224e23ad3584dd4511a4173d632547d4a2ee4e9c..0dbb7fad5c9f3b3889b0825d553992d6
#include "ui/gl/gl_switches.h"
#include "ui/native_theme/native_theme_features.h"
#include "url/origin.h"
@@ -3368,6 +3369,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
@@ -3426,6 +3427,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
// Propagate the following switches to the renderer command line (along
// with any associated values) if present in the browser command line.
static const char* const kSwitchNames[] = {
Expand Down
Expand Up @@ -11,10 +11,10 @@ This regressed in https://chromium-review.googlesource.com/c/chromium/src/+/2572
Upstream: https://chromium-review.googlesource.com/c/chromium/src/+/2598393

diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 2ce30e48d579fbd06efb6b8464dce7d483bbd6b3..71f8b79a09ff12482f530e94a0b22503f4a66a65 100644
index 6d1d25efeb8529c8af54d5429bf33a9dcad286aa..36f28a560701c72b8369d657b673480968be07a9 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -2355,7 +2355,7 @@ const blink::WebView* RenderFrameImpl::GetWebView() const {
@@ -2357,7 +2357,7 @@ const blink::WebView* RenderFrameImpl::GetWebView() const {
}

const blink::web_pref::WebPreferences& RenderFrameImpl::GetBlinkPreferences() {
Expand Down
4 changes: 2 additions & 2 deletions patches/chromium/notification_provenance.patch
Expand Up @@ -108,10 +108,10 @@ index b195cb84d8bba3c51b04f8c32cf909d15bf34335..37528715db985d12771ba2dca86dcec8
const GURL& document_url,
mojo::PendingReceiver<blink::mojom::NotificationService> receiver);
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 8135d0ff1d476b06cc24abb010ad988eb880b557..55c4e3c2bb0b353724c6a1a2f6f853705d1ba501 100644
index 8d65e805544579ad06a8f6d532104f29d3742a1e..a5e1e13fb11996d4df926480ded2b901de08b75a 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -2301,7 +2301,7 @@ void RenderProcessHostImpl::CreateNotificationService(
@@ -2341,7 +2341,7 @@ void RenderProcessHostImpl::CreateNotificationService(
document_url = rfh->GetLastCommittedURL();

storage_partition_impl_->GetPlatformNotificationContext()->CreateService(
Expand Down
10 changes: 5 additions & 5 deletions patches/chromium/support_mixed_sandbox_with_zygote.patch
Expand Up @@ -22,10 +22,10 @@ However, the patch would need to be reviewed by the security team, as it
does touch a security-sensitive class.

diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 55c4e3c2bb0b353724c6a1a2f6f853705d1ba501..224e23ad3584dd4511a4173d632547d4a2ee4e9c 100644
index a5e1e13fb11996d4df926480ded2b901de08b75a..9e9316c0bbbecbf425fb04f2cef9bb4f5caf98c6 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -428,10 +428,18 @@ class RendererSandboxedProcessLauncherDelegate
@@ -429,10 +429,18 @@ class RendererSandboxedProcessLauncherDelegate
public:
RendererSandboxedProcessLauncherDelegate() = default;

Expand All @@ -44,7 +44,7 @@ index 55c4e3c2bb0b353724c6a1a2f6f853705d1ba501..224e23ad3584dd4511a4173d632547d4
const base::CommandLine& browser_command_line =
*base::CommandLine::ForCurrentProcess();
base::CommandLine::StringType renderer_prefix =
@@ -449,6 +457,11 @@ class RendererSandboxedProcessLauncherDelegate
@@ -450,6 +458,11 @@ class RendererSandboxedProcessLauncherDelegate
sandbox::policy::SandboxType GetSandboxType() override {
return sandbox::policy::SandboxType::kRenderer;
}
Expand All @@ -56,7 +56,7 @@ index 55c4e3c2bb0b353724c6a1a2f6f853705d1ba501..224e23ad3584dd4511a4173d632547d4
};

#if defined(OS_WIN)
@@ -460,6 +473,9 @@ class RendererSandboxedProcessLauncherDelegateWin
@@ -461,6 +474,9 @@ class RendererSandboxedProcessLauncherDelegateWin
bool is_jit_disabled)
: renderer_code_integrity_enabled_(
GetContentClient()->browser()->IsRendererCodeIntegrityEnabled()) {
Expand All @@ -66,7 +66,7 @@ index 55c4e3c2bb0b353724c6a1a2f6f853705d1ba501..224e23ad3584dd4511a4173d632547d4
if (is_jit_disabled) {
dynamic_code_can_be_disabled_ = true;
return;
@@ -2016,9 +2032,15 @@ bool RenderProcessHostImpl::Init() {
@@ -2056,9 +2072,15 @@ bool RenderProcessHostImpl::Init() {
std::unique_ptr<SandboxedProcessLauncherDelegate> sandbox_delegate =
std::make_unique<RendererSandboxedProcessLauncherDelegateWin>(
cmd_line.get(), IsJitDisabled());
Expand Down
2 changes: 1 addition & 1 deletion patches/chromium/webview_fullscreen.patch
Expand Up @@ -14,7 +14,7 @@ Note that we also need to manually update embedder's
`api::WebContents::IsFullscreenForTabOrPending` value.

diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
index c842246f9250c45793c4e763f1de3f2b486a56aa..d993cd6651689818ef4deb4caa02737644bdafb5 100644
index ecfa972c0e169f235a98239022681b423ce06b78..854c6753bd8a8140746a40601f45109722c7fc6e 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -5716,6 +5716,15 @@ void RenderFrameHostImpl::EnterFullscreen(
Expand Down
2 changes: 2 additions & 0 deletions patches/config.json
Expand Up @@ -3,6 +3,8 @@

"src/electron/patches/boringssl": "src/third_party/boringssl/src",

"src/electron/patches/webrtc": "src/third_party/webrtc",

"src/electron/patches/v8": "src/v8",

"src/electron/patches/node": "src/third_party/electron_node",
Expand Down
4 changes: 2 additions & 2 deletions patches/v8/dcheck.patch
Expand Up @@ -19,10 +19,10 @@ index 84295e5cde0b2828d965b423e088793864ce29db..63aed17828461e5491904f368ef914ed
isolate->default_microtask_queue()->PerformCheckpoint(this);
}
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index a4c0e4a728dc474c958014c148f0b9dce77218d5..b8d453270cb27940782079064049afe61d792db4 100644
index bb5e91a829444d10dcdf5fe426aed59223353819..c1eed7de2f24154f029ac928a21daa2304070516 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -5945,9 +5945,9 @@ void Heap::DeinitSharedSpaces() {
@@ -5951,9 +5951,9 @@ void Heap::DeinitSharedSpaces() {
void Heap::AddGCPrologueCallback(v8::Isolate::GCCallbackWithData callback,
GCType gc_type, void* data) {
DCHECK_NOT_NULL(callback);
Expand Down
1 change: 1 addition & 0 deletions patches/webrtc/.patches
@@ -0,0 +1 @@
add_thread_local_to_x_error_trap_cc.patch
24 changes: 24 additions & 0 deletions patches/webrtc/add_thread_local_to_x_error_trap_cc.patch
@@ -0,0 +1,24 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jeremy Rose <nornagon@nornagon.net>
Date: Tue, 27 Jul 2021 10:32:54 -0700
Subject: add thread_local to x_error_trap.cc

Per https://bugs.chromium.org/p/chromium/issues/detail?id=781618#c6.

To fix this DCHECK firing: https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/modules/desktop_capture/linux/x_error_trap.cc;l=35;drc=25ab3228f3e473f2226f219531ec617d2daa175e

diff --git a/modules/desktop_capture/linux/x_error_trap.cc b/modules/desktop_capture/linux/x_error_trap.cc
index 13233d827470d9d42be0333c3080e3d107f86fd5..62efb5b5b5194fc8961a27fe2a1efcd77e385d08 100644
--- a/modules/desktop_capture/linux/x_error_trap.cc
+++ b/modules/desktop_capture/linux/x_error_trap.cc
@@ -19,8 +19,8 @@ namespace webrtc {
namespace {

// TODO(sergeyu): This code is not thread safe. Fix it. Bug 2202.
-static bool g_xserver_error_trap_enabled = false;
-static int g_last_xserver_error_code = 0;
+static thread_local bool g_xserver_error_trap_enabled = false;
+static thread_local int g_last_xserver_error_code = 0;

int XServerErrorHandler(Display* display, XErrorEvent* error_event) {
RTC_DCHECK(g_xserver_error_trap_enabled);

0 comments on commit a279250

Please sign in to comment.