diff --git a/devel/electron31/Makefile.version b/devel/electron31/Makefile.version index a375cbc91bf9..1715c5059dad 100644 --- a/devel/electron31/Makefile.version +++ b/devel/electron31/Makefile.version @@ -1,2 +1,2 @@ -ELECTRON_VER= 31.7.1 +ELECTRON_VER= 31.7.2 ELECTRON_VER_MAJOR= ${ELECTRON_VER:C/\..*//} diff --git a/devel/electron31/distinfo b/devel/electron31/distinfo index 56e8534c6f0e..8466f4de613b 100644 --- a/devel/electron31/distinfo +++ b/devel/electron31/distinfo @@ -1,25 +1,25 @@ -TIMESTAMP = 1729238331 +TIMESTAMP = 1729771028 SHA256 (electron/chromium-126.0.6478.234.tar.xz.0) = 5940007a2cc926c0eac498ab5121727f903a60b87c7b5a5216921c4ee1028d07 SIZE (electron/chromium-126.0.6478.234.tar.xz.0) = 2000000000 SHA256 (electron/chromium-126.0.6478.234.tar.xz.1) = 977c9af967876a9a362038dea652c4be55a71a9758cb1c538bfc8a5a0ee27962 SIZE (electron/chromium-126.0.6478.234.tar.xz.1) = 303263696 SHA256 (electron/97a0b3c4c39cf05de1eafb6ffdec0fddd643f0a2) = dcfaea4d353d1df3d4ac2d245ea7e32ad177d4bea1351f363714c9c22ca5c4f8 SIZE (electron/97a0b3c4c39cf05de1eafb6ffdec0fddd643f0a2) = 9761601 SHA256 (electron/pulseaudio-16.1.tar.gz) = 027266c62f2a84422ac45fa721a649508f0f1628fb1fd9242315ac54ce2d7c92 SIZE (electron/pulseaudio-16.1.tar.gz) = 2763111 -SHA256 (electron/electron-yarn-cache-31.7.1.tar.xz) = 8eaf83154d3d57c59a3faed240d8e60c23bc2eeb8e4758ce82ec4437aed7ea2f -SIZE (electron/electron-yarn-cache-31.7.1.tar.xz) = 30506748 -SHA256 (electron/electron-electron-v31.7.1_GH0.tar.gz) = 4ed849ac60ad5f5e50e3a3ca1d26944b777b9bdfc6ef601aeeec6df43d92c46e -SIZE (electron/electron-electron-v31.7.1_GH0.tar.gz) = 13866295 +SHA256 (electron/electron-yarn-cache-31.7.2.tar.xz) = 8eaf83154d3d57c59a3faed240d8e60c23bc2eeb8e4758ce82ec4437aed7ea2f +SIZE (electron/electron-yarn-cache-31.7.2.tar.xz) = 30506748 +SHA256 (electron/electron-electron-v31.7.2_GH0.tar.gz) = 078f89063d24b8c6f8979b28e9dbf6fce5868c3f723919409540a947346ee4fb +SIZE (electron/electron-electron-v31.7.2_GH0.tar.gz) = 13893249 SHA256 (electron/nodejs-node-v20.18.0_GH0.tar.gz) = 651bb82f6af18084070893559643759165ce050b5839f830d4cc098130d3ad89 SIZE (electron/nodejs-node-v20.18.0_GH0.tar.gz) = 115526827 SHA256 (electron/nodejs-nan-e14bdcd1f72d62bca1d541b66da43130384ec213_GH0.tar.gz) = 02edf8d5b3fef9af94d8a1355da60564a57e7f2c99cb422bce042400607ed2eb SIZE (electron/nodejs-nan-e14bdcd1f72d62bca1d541b66da43130384ec213_GH0.tar.gz) = 180646 SHA256 (electron/Squirrel-Squirrel.Mac-0e5d146ba13101a1302d59ea6e6e0b3cace4ae38_GH0.tar.gz) = f4ebb40a8d85dbb7ef02aa0571b2f8e22182c6d73b6992484a53c90047779d01 SIZE (electron/Squirrel-Squirrel.Mac-0e5d146ba13101a1302d59ea6e6e0b3cace4ae38_GH0.tar.gz) = 2112918 SHA256 (electron/ReactiveCocoa-ReactiveObjC-74ab5baccc6f7202c8ac69a8d1e152c29dc1ea76_GH0.tar.gz) = 88e65f116c7a06fccedb43970fba63080a57a4e5dc29147d2cdfe1ee58dd0546 SIZE (electron/ReactiveCocoa-ReactiveObjC-74ab5baccc6f7202c8ac69a8d1e152c29dc1ea76_GH0.tar.gz) = 1136238 SHA256 (electron/Mantle-Mantle-78d3966b3c331292ea29ec38661b25df0a245948_GH0.tar.gz) = a365df6d83e0be3cc000b70bd39734d80c28f0d9983ebe44698337a2ca464bb1 SIZE (electron/Mantle-Mantle-78d3966b3c331292ea29ec38661b25df0a245948_GH0.tar.gz) = 62962 SHA256 (electron/EngFlow-reclient-configs-955335c30a752e9ef7bff375baab5e0819b6c00d_GH0.tar.gz) = c148f76220fc41a89ffeaf370c2cc175577be184688b12aa6fec5f8ac6c714c4 SIZE (electron/EngFlow-reclient-configs-955335c30a752e9ef7bff375baab5e0819b6c00d_GH0.tar.gz) = 13014 diff --git a/devel/electron31/files/patch-electron_shell_browser_native__window__views.cc b/devel/electron31/files/patch-electron_shell_browser_native__window__views.cc index f734a5dbeef6..2be80bf23b68 100644 --- a/devel/electron31/files/patch-electron_shell_browser_native__window__views.cc +++ b/devel/electron31/files/patch-electron_shell_browser_native__window__views.cc @@ -1,200 +1,200 @@ ---- electron/shell/browser/native_window_views.cc.orig 2024-09-11 03:18:31 UTC +--- electron/shell/browser/native_window_views.cc.orig 2024-10-23 21:18:11 UTC +++ electron/shell/browser/native_window_views.cc @@ -53,7 +53,7 @@ #include "ui/wm/core/shadow_types.h" #include "ui/wm/core/window_util.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/strings/string_util.h" #include "shell/browser/browser.h" #include "shell/browser/linux/unity_service.h" @@ -298,7 +298,7 @@ NativeWindowViews::NativeWindowViews(const gin_helper: params.parent = parent->GetNativeWindow(); params.native_widget = new ElectronDesktopNativeWidgetAura(this); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::string name = Browser::Get()->GetName(); // Set WM_WINDOW_ROLE. params.wm_role_name = "browser-window"; @@ -324,7 +324,7 @@ NativeWindowViews::NativeWindowViews(const gin_helper: std::string window_type; options.Get(options::kType, &window_type); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Set _GTK_THEME_VARIANT to dark if we have "dark-theme" option set. bool use_dark_theme = false; if (options.Get(options::kDarkTheme, &use_dark_theme) && use_dark_theme) { @@ -426,7 +426,7 @@ NativeWindowViews::NativeWindowViews(const gin_helper: if (window) window->AddPreTargetHandler(this); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // On linux after the widget is initialized we might have to force set the // bounds if the bounds are smaller than the current display SetBounds(gfx::Rect(GetPosition(), bounds.size()), false); @@ -462,7 +462,7 @@ void NativeWindowViews::SetGTKDarkThemeEnabled(bool us } void NativeWindowViews::SetGTKDarkThemeEnabled(bool use_dark_theme) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (IsX11()) { const std::string color = use_dark_theme ? "dark" : "light"; auto* connection = x11::Connection::Get(); @@ -524,7 +524,7 @@ void NativeWindowViews::Show() { NotifyWindowShow(); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (global_menu_bar_) global_menu_bar_->OnWindowMapped(); @@ -540,7 +540,7 @@ void NativeWindowViews::ShowInactive() { NotifyWindowShow(); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (global_menu_bar_) global_menu_bar_->OnWindowMapped(); - #endif -@@ -554,7 +554,7 @@ void NativeWindowViews::Hide() { + +@@ -559,7 +559,7 @@ void NativeWindowViews::Hide() { NotifyWindowHide(); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (global_menu_bar_) global_menu_bar_->OnWindowUnmapped(); #endif -@@ -585,7 +585,7 @@ bool NativeWindowViews::IsEnabled() const { +@@ -590,7 +590,7 @@ bool NativeWindowViews::IsEnabled() const { bool NativeWindowViews::IsEnabled() const { #if BUILDFLAG(IS_WIN) return ::IsWindowEnabled(GetAcceleratedWidget()); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (IsX11()) return !event_disabler_.get(); NOTIMPLEMENTED(); -@@ -641,7 +641,7 @@ void NativeWindowViews::SetEnabledInternal(bool enable +@@ -646,7 +646,7 @@ void NativeWindowViews::SetEnabledInternal(bool enable #endif } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void NativeWindowViews::Maximize() { if (IsVisible()) { widget()->Maximize(); -@@ -781,7 +781,7 @@ void NativeWindowViews::SetBounds(const gfx::Rect& bou +@@ -786,7 +786,7 @@ void NativeWindowViews::SetBounds(const gfx::Rect& bou } #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // On Linux and Windows the minimum and maximum size should be updated with // window size when window is not resizable. if (!resizable_) { -@@ -1041,7 +1041,7 @@ bool NativeWindowViews::IsClosable() const { +@@ -1046,7 +1046,7 @@ bool NativeWindowViews::IsClosable() const { return false; } return !(info.fState & MFS_DISABLED); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return true; #endif } -@@ -1081,7 +1081,7 @@ void NativeWindowViews::Center() { +@@ -1086,7 +1086,7 @@ void NativeWindowViews::Center() { // for now to avoid breaking API contract, but should consider the long // term plan for this aligning with upstream. void NativeWindowViews::Center() { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) auto display = display::Screen::GetScreen()->GetDisplayNearestWindow(GetNativeWindow()); gfx::Rect window_bounds_in_screen = display.work_area(); -@@ -1304,7 +1304,7 @@ void NativeWindowViews::SetMenu(ElectronMenuModel* men +@@ -1309,7 +1309,7 @@ void NativeWindowViews::SetMenu(ElectronMenuModel* men } void NativeWindowViews::SetMenu(ElectronMenuModel* menu_model) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Remove global menu bar. if (global_menu_bar_ && menu_model == nullptr) { global_menu_bar_.reset(); -@@ -1359,7 +1359,7 @@ void NativeWindowViews::SetParentWindow(NativeWindow* +@@ -1364,7 +1364,7 @@ void NativeWindowViews::SetParentWindow(NativeWindow* void NativeWindowViews::SetParentWindow(NativeWindow* parent) { NativeWindow::SetParentWindow(parent); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (IsX11()) { auto* connection = x11::Connection::Get(); connection->SetProperty( -@@ -1405,7 +1405,7 @@ void NativeWindowViews::SetProgressBar(double progress +@@ -1410,7 +1410,7 @@ void NativeWindowViews::SetProgressBar(double progress NativeWindow::ProgressState state) { #if BUILDFLAG(IS_WIN) taskbar_host_.SetProgressBar(GetAcceleratedWidget(), progress, state); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (unity::IsRunning()) { unity::SetProgressFraction(progress); } -@@ -1476,7 +1476,7 @@ bool NativeWindowViews::IsVisibleOnAllWorkspaces() con +@@ -1481,7 +1481,7 @@ bool NativeWindowViews::IsVisibleOnAllWorkspaces() con } bool NativeWindowViews::IsVisibleOnAllWorkspaces() const { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (IsX11()) { // Use the presence/absence of _NET_WM_STATE_STICKY in _NET_WM_STATE to // determine whether the current window is visible on all workspaces. -@@ -1499,7 +1499,7 @@ content::DesktopMediaID NativeWindowViews::GetDesktopM +@@ -1504,7 +1504,7 @@ content::DesktopMediaID NativeWindowViews::GetDesktopM #if BUILDFLAG(IS_WIN) window_handle = reinterpret_cast(accelerated_widget); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) window_handle = static_cast(accelerated_widget); #endif aura::WindowTreeHost* const host = -@@ -1597,7 +1597,7 @@ void NativeWindowViews::SetIcon(HICON window_icon, HIC +@@ -1602,7 +1602,7 @@ void NativeWindowViews::SetIcon(HICON window_icon, HIC SendMessage(hwnd, WM_SETICON, ICON_BIG, reinterpret_cast(app_icon_.get())); } -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void NativeWindowViews::SetIcon(const gfx::ImageSkia& icon) { auto* tree_host = views::DesktopWindowTreeHostLinux::GetHostForWidget( GetAcceleratedWidget()); -@@ -1683,7 +1683,7 @@ bool NativeWindowViews::CanMinimize() const { +@@ -1688,7 +1688,7 @@ bool NativeWindowViews::CanMinimize() const { bool NativeWindowViews::CanMinimize() const { #if BUILDFLAG(IS_WIN) return minimizable_; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return true; #endif } -@@ -1739,7 +1739,7 @@ void NativeWindowViews::HandleKeyboardEvent( +@@ -1744,7 +1744,7 @@ void NativeWindowViews::HandleKeyboardEvent( if (widget_destroyed_) return; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (event.windows_key_code == ui::VKEY_BROWSER_BACK) NotifyWindowExecuteAppCommand(kBrowserBackward); else if (event.windows_key_code == ui::VKEY_BROWSER_FORWARD) -@@ -1758,7 +1758,7 @@ void NativeWindowViews::OnMouseEvent(ui::MouseEvent* e +@@ -1763,7 +1763,7 @@ void NativeWindowViews::OnMouseEvent(ui::MouseEvent* e // Alt+Click should not toggle menu bar. root_view_.ResetAltState(); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (event->changed_button_flags() == ui::EF_BACK_MOUSE_BUTTON) NotifyWindowExecuteAppCommand(kBrowserBackward); else if (event->changed_button_flags() == ui::EF_FORWARD_MOUSE_BUTTON) diff --git a/devel/electron31/files/patch-electron_spec_api-browser-window-spec.ts b/devel/electron31/files/patch-electron_spec_api-browser-window-spec.ts index c5c312378823..d56181bc2cb4 100644 --- a/devel/electron31/files/patch-electron_spec_api-browser-window-spec.ts +++ b/devel/electron31/files/patch-electron_spec_api-browser-window-spec.ts @@ -1,173 +1,173 @@ ---- electron/spec/api-browser-window-spec.ts.orig 2024-10-09 13:53:12 UTC +--- electron/spec/api-browser-window-spec.ts.orig 2024-10-23 21:18:11 UTC +++ electron/spec/api-browser-window-spec.ts @@ -67,7 +67,7 @@ describe('BrowserWindow module', () => { }).not.to.throw(); }); - ifit(process.platform === 'linux')('does not crash when setting large window icons', async () => { + ifit(process.platform === 'linux' || process.platform === 'freebsd')('does not crash when setting large window icons', async () => { const appPath = path.join(fixtures, 'apps', 'xwindow-icon'); const appProcess = childProcess.spawn(process.execPath, [appPath]); await once(appProcess, 'exit'); @@ -1124,7 +1124,7 @@ describe('BrowserWindow module', () => { describe('BrowserWindow.minimize()', () => { // TODO(codebytere): Enable for Linux once maximize/minimize events work in CI. - ifit(process.platform !== 'linux')('should not be visible when the window is minimized', async () => { + ifit(process.platform !== 'linux' && process.platform !== 'freebsd')('should not be visible when the window is minimized', async () => { const minimize = once(w, 'minimize'); w.minimize(); await minimize; @@ -1141,7 +1141,7 @@ describe('BrowserWindow module', () => { }); // TODO(dsanders11): Enable for Linux once CI plays nice with these kinds of tests - ifit(process.platform !== 'linux')('should not restore maximized windows', async () => { + ifit(process.platform !== 'linux' && process.platform !== 'freebsd')('should not restore maximized windows', async () => { const maximize = once(w, 'maximize'); const shown = once(w, 'show'); w.maximize(); @@ -1206,7 +1206,7 @@ describe('BrowserWindow module', () => { expect(w.isFocused()).to.equal(true); }); - ifit(process.platform !== 'linux')('acquires focus status from the other windows', async () => { + ifit(process.platform !== 'linux' && process.platform !== 'freebsd')('acquires focus status from the other windows', async () => { const w1 = new BrowserWindow({ show: false }); const w2 = new BrowserWindow({ show: false }); const w3 = new BrowserWindow({ show: false }); @@ -1307,7 +1307,7 @@ describe('BrowserWindow module', () => { expect(w.isFocused()).to.equal(false); }); - ifit(process.platform !== 'linux')('transfers focus status to the next window', async () => { + ifit(process.platform !== 'linux' && process.platform !== 'freebsd')('transfers focus status to the next window', async () => { const w1 = new BrowserWindow({ show: false }); const w2 = new BrowserWindow({ show: false }); const w3 = new BrowserWindow({ show: false }); @@ -1745,7 +1745,7 @@ describe('BrowserWindow module', () => { }); }); - ifdescribe(process.platform !== 'linux')('Maximized state', () => { + ifdescribe(process.platform !== 'linux' && process.platform !== 'freebsd')('Maximized state', () => { it('checks normal bounds when maximized', async () => { const bounds = w.getBounds(); const maximize = once(w, 'maximize'); @@ -1955,7 +1955,7 @@ describe('BrowserWindow module', () => { }); }); - ifdescribe(process.platform !== 'linux')('Minimized state', () => { + ifdescribe(process.platform !== 'linux' && process.platform !== 'freebsd')('Minimized state', () => { it('checks normal bounds when minimized', async () => { const bounds = w.getBounds(); const minimize = once(w, 'minimize'); -@@ -2902,7 +2902,7 @@ describe('BrowserWindow module', () => { +@@ -2918,7 +2918,7 @@ describe('BrowserWindow module', () => { describe('BrowserWindow.setOpacity(opacity)', () => { afterEach(closeAllWindows); - ifdescribe(process.platform !== 'linux')(('Windows and Mac'), () => { + ifdescribe(process.platform !== 'linux' && process.platform !== 'freebsd')(('Windows and Mac'), () => { it('make window with initial opacity', () => { const w = new BrowserWindow({ show: false, opacity: 0.5 }); expect(w.getOpacity()).to.equal(0.5); -@@ -2928,7 +2928,7 @@ describe('BrowserWindow module', () => { +@@ -2944,7 +2944,7 @@ describe('BrowserWindow module', () => { }); }); - ifdescribe(process.platform === 'linux')(('Linux'), () => { + ifdescribe(process.platform === 'linux' || process.platform === 'freebsd')(('Linux'), () => { it('sets 1 regardless of parameter', () => { const w = new BrowserWindow({ show: false }); w.setOpacity(0); -@@ -3139,7 +3139,7 @@ describe('BrowserWindow module', () => { +@@ -3155,7 +3155,7 @@ describe('BrowserWindow module', () => { expect(overlayRectPreMax.height).to.equal(size); // 'maximize' event is not emitted on Linux in CI. - if (process.platform !== 'linux' && !w.isMaximized()) { + if ((process.platform !== 'linux' && process.platform !== 'freebsd') && !w.isMaximized()) { const maximize = once(w, 'maximize'); w.show(); w.maximize(); -@@ -3205,7 +3205,7 @@ describe('BrowserWindow module', () => { +@@ -3221,7 +3221,7 @@ describe('BrowserWindow module', () => { expect(preMaxHeight).to.equal(size); // 'maximize' event is not emitted on Linux in CI. - if (process.platform !== 'linux' && !w.isMaximized()) { + if ((process.platform !== 'linux' && process.platform !== 'freebsd') && !w.isMaximized()) { const maximize = once(w, 'maximize'); w.show(); w.maximize(); -@@ -3870,7 +3870,7 @@ describe('BrowserWindow module', () => { +@@ -3886,7 +3886,7 @@ describe('BrowserWindow module', () => { expect(test.nodeTimers).to.equal(true); expect(test.nodeUrl).to.equal(true); - if (process.platform === 'linux' && test.osSandbox) { + if ((process.platform === 'linux' || process.platform === 'freebsd') && test.osSandbox) { expect(test.creationTime).to.be.null('creation time'); expect(test.systemMemoryInfo).to.be.null('system memory info'); } else { -@@ -4375,7 +4375,7 @@ describe('BrowserWindow module', () => { +@@ -4391,7 +4391,7 @@ describe('BrowserWindow module', () => { }); }); - ifdescribe(process.platform !== 'linux')('max/minimize events', () => { + ifdescribe(process.platform !== 'linux' && process.platform !== 'freebsd')('max/minimize events', () => { afterEach(closeAllWindows); it('emits an event when window is maximized', async () => { const w = new BrowserWindow({ show: false }); -@@ -4646,7 +4646,7 @@ describe('BrowserWindow module', () => { +@@ -4662,7 +4662,7 @@ describe('BrowserWindow module', () => { // TODO(zcbenz): // This test does not run on Linux CI. See: // https://github.com/electron/electron/issues/28699 - ifit(process.platform === 'linux' && !process.env.CI)('should bring a minimized maximized window back to maximized state', async () => { + ifit((process.platform === 'linux' || process.platform === 'freebsd') && !process.env.CI)('should bring a minimized maximized window back to maximized state', async () => { const w = new BrowserWindow({}); const maximize = once(w, 'maximize'); w.maximize(); -@@ -4663,7 +4663,7 @@ describe('BrowserWindow module', () => { +@@ -4679,7 +4679,7 @@ describe('BrowserWindow module', () => { }); // TODO(dsanders11): Enable once maximize event works on Linux again on CI - ifdescribe(process.platform !== 'linux')('BrowserWindow.maximize()', () => { + ifdescribe(process.platform !== 'linux' && process.platform !== 'freebsd')('BrowserWindow.maximize()', () => { afterEach(closeAllWindows); it('should show the window if it is not currently shown', async () => { const w = new BrowserWindow({ show: false }); -@@ -4700,7 +4700,7 @@ describe('BrowserWindow module', () => { +@@ -4716,7 +4716,7 @@ describe('BrowserWindow module', () => { // TODO(dsanders11): Enable once minimize event works on Linux again. // See https://github.com/electron/electron/issues/28699 - ifit(process.platform !== 'linux')('should not restore a minimized window', async () => { + ifit(process.platform !== 'linux' && process.platform !== 'freebsd')('should not restore a minimized window', async () => { const w = new BrowserWindow(); const minimize = once(w, 'minimize'); w.minimize(); -@@ -5174,7 +5174,7 @@ describe('BrowserWindow module', () => { +@@ -5190,7 +5190,7 @@ describe('BrowserWindow module', () => { }); // On Linux there is no "resizable" property of a window. - ifit(process.platform !== 'linux')('does affect maximizability when disabled and enabled', () => { + ifit(process.platform !== 'linux' && process.platform !== 'freebsd')('does affect maximizability when disabled and enabled', () => { const w = new BrowserWindow({ show: false }); expect(w.resizable).to.be.true('resizable'); -@@ -5313,7 +5313,7 @@ describe('BrowserWindow module', () => { +@@ -5329,7 +5329,7 @@ describe('BrowserWindow module', () => { }); }); - ifdescribe(process.platform !== 'linux')('window states (excluding Linux)', () => { + ifdescribe(process.platform !== 'linux' && process.platform !== 'freebsd')('window states (excluding Linux)', () => { // Not implemented on Linux. afterEach(closeAllWindows); -@@ -6478,7 +6478,7 @@ describe('BrowserWindow module', () => { +@@ -6494,7 +6494,7 @@ describe('BrowserWindow module', () => { describe('"transparent" option', () => { afterEach(closeAllWindows); - ifit(process.platform !== 'linux')('correctly returns isMaximized() when the window is maximized then minimized', async () => { + ifit(process.platform !== 'linux' && process.platform !== 'freebsd')('correctly returns isMaximized() when the window is maximized then minimized', async () => { const w = new BrowserWindow({ frame: false, transparent: true diff --git a/devel/electron31/files/patch-v8_src_execution_isolate.cc b/devel/electron31/files/patch-v8_src_execution_isolate.cc index 1d7209db3d06..b2d5fb409241 100644 --- a/devel/electron31/files/patch-v8_src_execution_isolate.cc +++ b/devel/electron31/files/patch-v8_src_execution_isolate.cc @@ -1,27 +1,27 @@ ---- v8/src/execution/isolate.cc.orig 2024-06-18 21:45:06 UTC +--- v8/src/execution/isolate.cc.orig 2024-10-24 12:03:59 UTC +++ v8/src/execution/isolate.cc @@ -157,6 +157,10 @@ #include "src/execution/simulator-base.h" #endif +#if defined(V8_OS_OPENBSD) +#include +#endif + extern "C" const uint8_t v8_Default_embedded_blob_code_[]; extern "C" uint32_t v8_Default_embedded_blob_code_size_; extern "C" const uint8_t v8_Default_embedded_blob_data_[]; -@@ -4535,6 +4539,13 @@ void Isolate::InitializeDefaultEmbeddedBlob() { +@@ -4560,6 +4564,13 @@ void Isolate::InitializeDefaultEmbeddedBlob() { uint32_t code_size = DefaultEmbeddedBlobCodeSize(); const uint8_t* data = DefaultEmbeddedBlobData(); uint32_t data_size = DefaultEmbeddedBlobDataSize(); + +#if defined(V8_OS_OPENBSD) && !defined(V8_TARGET_ARCH_IA32) + if (code_size > 0) { + mprotect(reinterpret_cast(const_cast(code)), + code_size, PROT_READ | PROT_EXEC); + } +#endif if (StickyEmbeddedBlobCode() != nullptr) { base::MutexGuard guard(current_embedded_blob_refcount_mutex_.Pointer());