repo: src patches: - author: Shelley Vohr file: add_realloc.patch description: | Blink overrides ArrayBuffer's allocator with its own one, while Node simply uses malloc and free, so we need to use v8's allocator in Node. As part of the 10.6.0 upgrade, we needed to make SerializerDelegate accept an allocator argument in its constructor, and override ReallocateBufferMemory and FreeBufferMemory to use the allocator. We cannot simply allocate and then memcpy when we override ReallocateBufferMemory, so we therefore need to implement Realloc on the v8 side and correspondingly in gin. - author: Ales Pergl file: build_gn.patch description: null - author: deepak1556 file: dcheck.patch description: | This disables some debug checks which currently fail when running the Electron test suite. In general there should be sustained effort to have all debug checks enabled. If you want to help, choose one of the diffs below and remove it. Then build Electron (debug configuration) and make sure all tests pass on the CI systems. Unfortunately the tests don't always cover the check failures, so it's good to also run some non-trivial Electron app to verify. Apart from getting rid of a whole diff, you may also be able to replace one diff with another which enables at least some of the previously disabled checks. For example, the checks might be disabled for a whole build target, but actually only one or two specific checks fail. Then it's better to simply comment out the failing checks and allow the rest of the target to have them enabled. Please keep the following lists updated. The ELECTRON_NO_DCHECK build flag disables debug checks universally. This patch applies the flag to the following GN targets: third_party/blink/renderer/core/loader:loader url:url These files have debug checks explicitly commented out: base/process/kill_win.cc components/viz/service/display/program_binding.h content/browser/frame_host/navigation_controller_impl.cc content/browser/frame_host/render_frame_host_impl.cc content/browser/renderer_host/render_widget_host_view_mac.mm ppapi/host/ppapi_host.cc third_party/blink/renderer/core/dom/node.cc third_party/blink/renderer/platform/wtf/text/string_impl.cc ui/base/clipboard/clipboard_win.cc - author: Cheng Zhao file: accelerator.patch description: null - author: Ales Pergl file: allow_new_privs.patch description: null - author: null file: app_indicator_icon_menu.patch description: null - author: Cheng Zhao file: blink_file_path.patch description: null - author: Cheng Zhao file: blink_local_frame.patch description: | According to electron/electron#3699, it is unreliable to use |unload| event for process.exit('exit'), so we have to do that in willReleaseScriptContext. However Chromium then disallowed scripting in willReleaseScriptContext in https://codereview.chromium.org/1657583002, and crash will happen when there is code doing that. This patch reverts the change to fix the crash in Electron. - author: null file: blink_world_context.patch description: null - author: Cheng Zhao file: browser_compositor_mac.patch description: null - author: null file: browser_plugin_wheel.patch description: null - author: null file: build_toolchain_win_patch.patch description: | Patch the Windows build toolchain to generate unique PDB names When the PDB files generated by the `static_library` build are packaged for distribution they are all copied to a single folder, some of the PDB files have identical names so they end up overwriting each other. The missing PDB files cause linker warnings when building Electron in Release mode, and make it more difficult to debug release builds. This patch modifies the PDB naming convention for the `static_library` build configuration to ensure PDB names are unique. For example, instead of generating `obj/ui/base/base_cc.pdb` the build will now generate `obj/ui/base/obj_ui_base_base_cc.pdb`. - author: Cheng Zhao file: can_create_window.patch description: null - author: null file: compositor_delegate.patch description: null - author: null file: desktop_screen_win.patch description: null - author: Cheng Zhao file: disable_hidden.patch description: null - author: Cheng Zhao file: dom_storage_map.patch description: null - author: deepak1556 file: frame_host_manager.patch description: null - author: Cheng Zhao file: net_url_request_job.patch description: null - author: Aleksei Kuzmin file: no_stack_dumping.patch description: null - author: deepak1556 file: out_of_process_instance.patch description: null - author: null file: render_widget_host_view_base.patch description: null - author: Cheng Zhao file: render_widget_host_view_mac.patch description: null - author: null file: scoped_clipboard_writer.patch description: null - author: deepak1556 file: stream_resource_handler.patch description: null - author: null file: thread_capabilities.patch description: | Chromium automatically drops all capabilities of renderer threads in Linux, which may cause issues in a context like Electron, where the main and renderer threads are supposed to keep inherited permissions over the system. See https://github.com/atom/electron/issues/3666 - author: Cheng Zhao file: use_transparent_window.patch description: null - author: null file: web_contents.patch description: null - author: Milan Burda file: webgl_context_attributes.patch description: null - author: null file: webview_cross_drag.patch description: null - author: Cheng Zhao file: worker_context_will_destroy.patch description: null - author: null file: webui_in_subframes.patch description: null - author: Aleksei Kuzmin file: statically_build_power_save_blocker.patch description: null - author: Tomas Rycl file: browser_plugin_guest.patch description: null - author: Aleksei Kuzmin file: disable_user_gesture_requirement_for_beforeunload_dialogs.patch description: See https://github.com/electron/electron/issues/10754 - author: Aleksei Kuzmin file: add_atomic_lib_to_dependencies_even_for_sysroot_builds.patch description: null - author: Cheng Zhao file: gin_enable_disable_v8_platform.patch description: null - author: deepak1556 file: blink-worker-enable-csp-in-file-scheme.patch description: null - author: Heilig Benedek file: disable-redraw-lock.patch description: | Chromium uses a custom window titlebar implementation on Windows when DWM is disabled (Windows 7 and earlier, non Aero theme). The native titlebar sometimes painted over this custom titlebar, so a workaround was put in place to lock redraws in reaction to certain events if DWM is disabled, since the code assumes that in that case, the custom titlebar is painted. Electron forces the use of the native titlebar, which the workaround doesn't take into account, and still locks redraws, causing weird repainting issues in electron (and other applications). This patch provides a way to disable the redraw locking mechanism, which fixes these issues. The electron issue can be found at https://github.com/electron/electron/issues/1821 - author: Nitish Sakhawalkar file: v8_context_snapshot_generator.patch description: | v8_context_snapshot_generator is a build time executable. The patch adds the config. - author: Jeremy Apthorp file: boringssl_build_gn.patch description: | Build BoringSSL with some extra functions that nodejs needs. Only affects the GN build; with the GYP build, nodejs is still built with OpenSSL. - author: deepak1556 file: pepper_flash.patch description: | Allows building chrome pepper flash integration for Electron. - author: Cheng Zhao file: no_cache_storage_check.patch description: | Do not check for unique origin in CacheStorage, in Electron we may have scripts running without an origin. - author: Cheng Zhao file: blink_fix_prototype_assert.patch description: | A recent Chromium change has accidentally added assertion for the case when a new window object may not have a prototype attached. In Electron it may happen when preventDefault for a native new-window event. https://chromium.googlesource.com/chromium/src/+/f47b361887a31cccf42a6e21a82bccf28372bdaa%5E%21 In the long term we should investigate why it happened, and take a more formal fix. But for now I'm just make this assertion silently pass away. - author: Cheng Zhao file: disable_scroll_begin_dcheck.patch description: | When testing https://github.com/electron/electron/issues/13137 I have met these assertions. I grouped them together since they are all related to the ScrollBegin event. - author: Jeremy Apthorp file: libgtkui_export.patch description: | Export libgtkui symbols for the GN component build. - author: Jeremy Apthorp file: gtk_visibility.patch description: | Allow electron and brightray to depend on GTK in the GN build. - author: Jeremy Apthorp file: sysroot.patch description: | Make chrome's install-sysroot scripts point to our custom sysroot builds, which include extra deps that Electron needs (e.g. libnotify) - author: Cheng Zhao file: mas_blink_no_private_api.patch description: | Guard usages in chromium code of private Mac APIs by MAS_BUILD, so they can be excluded for people who want to submit their apps to the Mac App store. - author: Cheng Zhao file: mas_no_private_api.patch description: | Guard usages in blink of private Mac APIs by MAS_BUILD, so they can be excluded for people who want to submit their apps to the Mac App store. - author: Jeremy Apthorp file: resource_file_conflict.patch description: | Resolve conflict between //chrome's .pak files and //electron's. The paths that chrome code hardcodes require that we generate resources at these paths, but GN throws errors if there are multiple targets that generate the same files. - author: Cheng Zhao file: scroll_bounce_flag.patch description: | Patch to make scrollBounce option work. - author: Cheng Zhao file: webview_reattach.patch description: | Backports https://chromium-review.googlesource.com/c/chromium/src/+/1161391 Fixes webview not working after renderer process restarted. - author: Jeremy Apthorp file: mas-cfisobjc.patch description: | Removes usage of the _CFIsObjC private API. - author: Jeremy Apthorp file: mas-cgdisplayusesforcetogray.patch description: | Removes usage of the CGDisplayUsesForceToGray private API. - author: Jeremy Apthorp file: mas-audiodeviceduck.patch description: | Removes usage of the AudioDeviceDuck private API. - author: Jeremy Apthorp file: mas-lssetapplicationlaunchservicesserverconnectionstatus.patch description: | Removes usage of the _LSSetApplicationLaunchServicesServerConnectionStatus private API. - author: Cheng Zhao file: allow_webview_file_url.patch description: | Allow webview to load non-web URLs. - author: John Kleinschmidt file: windows_cc_wrapper.patch description: | Allow use of cc_wrapper (eg sccache). - author: Shelley Vohr file: enable_osr_components.patch description: | Add MouseWheelPhaseHandler for OSR. - author: Zac Walker file: ignore_rc_check.patch description: | Dont compare RC.exe and RC.py output. FIXME: It has to be reverted once the script is fixed. - author: Aleksei Kuzmin file: enable_widevine.patch description: | Turns `enable_widevine` flag on by default on Mac and Windows. Electron needs that flag to be enabled on those paltforms, but there's no way to conditionally set it during a `gn gen` call. - author: deepak1556 file: chrome_key_systems.patch description: | Disable persiste licence support check for widevine cdm, as its not supported in the current version of chrome. - author: Charles Kerr file: allow_nested_error_trackers.patch description: | Only one X11ErrorTracker should exist at a time, but upstream has a bug where two can exist if running in headless mode -- ui::(anonymous namespace)::SupportsEWMH() [inner tracker is created] ui::WmSupportsHint() ui::IsX11WindowFullScreen() ui::ScreensaverWindowFinder::IsScreensaverWindow() ui::ScreensaverWindowFinder::ShouldStopIterating() ui::EnumerateTopLevelWindows() ui::ScreensaverWindowFinder::ScreensaverWindowExists() [outer tracker created] ui::CheckIdleStateIsLocked() ui::CalculateIdleState() Removal of either tracker could have side-effects in some code paths, so this is probably better handled upstream. This patch tries to do the least harm in the interim by removing the check that prevents more than one tracker from existing at a time. - author: Samuel Attard file: blink_initialization_order.patch description: | Backport of https://chromium-review.googlesource.com/c/chromium/src/+/1030530 to fix the order of V8 and Blink initialization. Also fixes order of DidCreateScriptContext notification with initialization of window globals to fix electron/electron#13787. The backport landed in Chromium 67 but the DidCreateScriptContext re-ordering needs to be upstreamed or kept indefinitely - author: zcbenz file: disable_detach_webview_frame.patch description: | Don't detach the frame for webview, we will manage the WebContents manually. This is part of the fixes for https://github.com/electron/electron/issues/14211. We should revisit this bug after upgrading to newer versions of Chrome, this patch was introduced in Chrome 66. - author: deepak1556 file: ssl_security_state_tab_helper.patch description: | Allows populating security tab info for devtools in Electron. - author: Jeremy Apthorp file: leveldb_ssize_t.patch description: | Fix conflict between leveldb & node's definition of ssize_t on Windows by preventing leveldb from re-defining the type if it's already defined. - author: Aleksei Kuzmin file: exclude-a-few-test-files-from-build.patch description: | Compilation of those files fails with the Chromium 68. Remove the patch during the Chromium 69 upgrade. - author: Jeremy Apthorp file: crashpad_http_status.patch description: backport of crashpad f540abb506 - author: Jeremy Apthorp file: expose-net-observer-api.patch description: | Expose URLRequestContextGetter::{Add,Remove}Observer. This patch should be removed once we switch to using the net service (cc @robo) - author: deepak1556 file: desktop_media_list.patch description: | * Adds a new observer method to DesktopMediaListObserver for desktop capture api. * Backports https://chromium-review.googlesource.com/c/chromium/src/+/1199806 that fixes crash with screen capturer, can be removed in 71.0.3539.0 - author: deepak1556 file: proxy_config_monitor.patch description: | Allow monitoring proxy config changes for a pref service. - author: deepak1556 file: gritsettings_resource_ids.patch description: | Add electron resources file to the list of resource ids generation. - author: Samuel Attard file: isolate_holder.patch description: | Pass pre allocated isolate for initialization, node platform needs to register on an isolate so that it can be used later down in the initialization process of an isolate. - author: Jeremy Apthorp file: notification_provenance.patch description: | Pass RenderProcessHost through to PlatformNotificationService. This is so Electron can identify which renderer a notification came from. - author: deepak1556 file: content_browser_main_loop.patch description: | Pass idle quit closure for main message loop, so that pending tasks are run before shutdown. This is required to cleanup WebContents asynchronously in atom::CommonWebContentsDelegate::ResetManageWebContents. - author: Samuel Attard file: dump_syms.patch description: | dylib currently fails to resolve Squirrel.framework on OSX, we need to fix this but it is not a blocker for releasing Electron. This patch removes the hard fail on dylib resolve failure from dump_syms - author: Jeremy Apthorp file: command-ismediakey.patch description: | define Command::IsMediaKey on mac the definition is copied from //chrome/common/extensions/command.cc, which also defines a bunch of other stuff that depends on extensions. since we only need IsMediaKey, and we don't want the extensions stuff (and aren't compiling command.cc), it's safe to duplicate the definition. A candidate for upstreaming would be to move the IsMediaKey function into //ui. - author: Heilig Benedek file: tts.patch description: | * Adds patch in //chrome/browser/speech/tts_controller_impl.cc to disable calls using chrome profile class. * Adds patch in //chrome/browser/speech/tts_message_filter.cc to remove reference to browser context when its signaled for destruction from content layer. - author: Heilig Benedek file: color_chooser.patch description: | Removes a couple of stuff from the chromium implementation of ColorChooser to decouple it from dependencies. Most of the stuff removed is actually related to other dialog types that we don't currently support, but chrome/browser/ui/browser_dialogs.h has a function for them to create them. Also disables a DCHECK that crashes the ColorChooser on Windows, that DCHECK most likely is an artifact that remained in chromium from a long time ago (last update of that part of the code was around 2012-2013, and this is purely UI, I don't think they have automated tests for it). - author: Heilig Benedek file: printing.patch description: | Add changeset that was previously applied to sources in chromium_src. The majority of changes originally come from these PRs: * https://github.com/electron/electron/pull/1835 * https://github.com/electron/electron/pull/8596