Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: electron/electron
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v34.3.4
Choose a base ref
...
head repository: electron/electron
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v34.4.0
Choose a head ref

Commits on Mar 19, 2025

  1. refactor: add ElectronBrowserContext::GetDefaultBrowserContext() (3…

    …4-x-y) (#46136)
    
    refactor: add `ElectronBrowserContext::GetDefaultBrowserContext()` (#46065)
    
    * refactor: add ElectronBrowserContext::DestroyAllContexts()
    
    Simpler semantics than previous implementation; also hides the
    "default context must be destroyed last" implementation detail.
    
    * refactor: add ElectronBrowserContext::GetDefaultBrowserContext()
    
    clearer semantics than everyone calling From("", false)
    ckerr authored Mar 19, 2025
    Copy the full SHA
    e151aae View commit details

Commits on Mar 20, 2025

  1. refactor: remove unused system header includes (34-x-y) (#46135)

    refactor: remove unused system header includes (#46015)
    
    * chore: remove unused #include <string>
    
    * chore: remove unused #include <optional>
    
    * chore: remove unused #include <vector>
    
    * chore: remove unused #include <string_view>
    
    * chore: remove unused #include <memory>
    
    * chore: remove unused #include <utility>
    
    * chore: remove unused #include <tuple>
    
    * chore: remove unused #include <unordered_set>
    
    * chore: remove unused #include <functional>
    
    * chore: iwyu <set>
    
    * chore: iwyu <map>
    ckerr authored Mar 20, 2025
    Copy the full SHA
    3035818 View commit details
  2. refactor: use base::NumberToString() (#46152)

    base::NumberToString() is slightly more efficient than
    absl::StrFormat("%u").
    
    Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
    Co-authored-by: Charles Kerr <charles@charleskerr.com>
    trop[bot] and ckerr authored Mar 20, 2025
    Copy the full SHA
    5cda3d2 View commit details
  3. refactor: Add ElectronBrowserContext::BrowserContexts() (#46159)

    * refactor: add ElectronBrowserContext::BrowserContexts()
    
    Co-authored-by: Charles Kerr <charles@charleskerr.com>
    
    * refactor: use ElectronBrowserContext::BrowserContexts() in ElectronBrowserMainParts::PostMainMessageLoopRun()
    
    Co-authored-by: Charles Kerr <charles@charleskerr.com>
    
    * refactor: use ElectronBrowserContext::BrowserContexts() in ElectronExtensionsBrowserClient::IsValidContext()
    
    Co-authored-by: Charles Kerr <charles@charleskerr.com>
    
    * refactor: use ElectronBrowserContext::BrowserContexts() in ElectronExtensionsBrowserClient::BroadcastEventToRenderers()
    
    Co-authored-by: Charles Kerr <charles@charleskerr.com>
    
    * refactor: move PartitionKey, BrowserContextMap private
    
    Co-authored-by: Charles Kerr <charles@charleskerr.com>
    
    * refactor: add ElectronBrowserContext::IsValidContext()
    
    decouple ElectronExtensionsBrowserClient from the internals of ElectronBrowserContext
    
    Co-authored-by: Charles Kerr <charles@charleskerr.com>
    
    ---------
    
    Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
    Co-authored-by: Charles Kerr <charles@charleskerr.com>
    trop[bot] and ckerr authored Mar 20, 2025
    Copy the full SHA
    ce2f471 View commit details
  4. fix: APNS token ids are lowercase ASCII (#46150)

    Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
    Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
    trop[bot] and codebytere authored Mar 20, 2025
    Copy the full SHA
    f008b0d View commit details

Commits on Mar 21, 2025

  1. refactor: make URLPipeLoader private (34-x-y) (#46168)

    refactor: make URLPipeLoader private
    
    Move the URLPipeLoader class into an anonymous namespace in
    electron_url_loader_factory.cc. Manual backport of 1b5db99.
    ckerr authored Mar 21, 2025
    Copy the full SHA
    a19f617 View commit details
  2. refactor: use GetDefaultStoragePartition() instead of `GetStoragePa…

    …rtition(nullptr)` (#46082)
    
    refactor: use GetDefaultStoragePartition()
    
    Use GetDefaultStorageParition() instead of GetStoragePartition(nullptr)
    
    - It improves code uniformity, since we use get-default everywhere else
    - It's more readable
    - It's marginally faster, since GetStoragePartition() has more steps
    
    Added in 49b0a1b
    
    Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
    Co-authored-by: Charles Kerr <charles@charleskerr.com>
    trop[bot] and ckerr authored Mar 21, 2025
    Copy the full SHA
    470a828 View commit details
  3. refactor: reduce coupling in electron::api::Protocol (#46181)

    * refactor: decouple api::Protocol from ElectronBrowserContext
    
    now they do not know about each other
    
    Co-authored-by: Charles Kerr <charles@charleskerr.com>
    
    * refactor: make electron::api::ProtocolError private
    
    Co-authored-by: Charles Kerr <charles@charleskerr.com>
    
    * refactor: remove unused isolate arg in Protocol constructor
    
    Co-authored-by: Charles Kerr <charles@charleskerr.com>
    
    * refactor: use =default for trivial destructor
    
    Co-authored-by: Charles Kerr <charles@charleskerr.com>
    
    ---------
    
    Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
    Co-authored-by: Charles Kerr <charles@charleskerr.com>
    trop[bot] and ckerr authored Mar 21, 2025
    Copy the full SHA
    b194cb1 View commit details
  4. build: move set chromium cookie before build tools step (#46096)

    build: move set cookie before build tools
    
    Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
    Co-authored-by: alice <alice@makenotion.com>
    trop[bot] and alicelovescake authored Mar 21, 2025
    Copy the full SHA
    8961eb0 View commit details
  5. build: fail for out of date patches on forks (#46125)

    * build: fail for out of date patches on forks
    
    Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
    
    * chore: update patches
    
    ---------
    
    Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
    Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
    Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
    3 people authored Mar 21, 2025
    Copy the full SHA
    165ea64 View commit details
  6. chore: restore forced LF for patch files with exception (#45902)

    chore: restore forced LF for patch files and add exception
    ppontes authored Mar 21, 2025
    Copy the full SHA
    88f4deb View commit details

Commits on Mar 22, 2025

  1. refactor: use = default to define trivial destructors (#46192)

    refactor: use '= default' to define trivial destructors
    
    Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
    Co-authored-by: Charles Kerr <charles@charleskerr.com>
    trop[bot] and ckerr authored Mar 22, 2025
    Copy the full SHA
    4bee1ea View commit details
  2. refactor: remove unused method ElectronBrowserContext::GetWeakPtr() (

    …#46197)
    
    * refactor: use forward declaration of MediaDeviceIDSalt in electron_browser_context.h
    
    Co-authored-by: Charles Kerr <charles@charleskerr.com>
    
    * refactor: remove unused #include from browser_context.h
    
    Co-authored-by: Charles Kerr <charles@charleskerr.com>
    
    * refactor: remove unused ElectronBrowserContext::GetWeakPtr()
    
    last use removed in Aug 2020 by bac2f46
    
    Co-authored-by: Charles Kerr <charles@charleskerr.com>
    
    ---------
    
    Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
    Co-authored-by: Charles Kerr <charles@charleskerr.com>
    trop[bot] and ckerr authored Mar 22, 2025
    Copy the full SHA
    23d5741 View commit details

Commits on Mar 24, 2025

  1. refactor: remove unused method ProxyingWebSocket::web_request_api() (#…

    …46216)
    
    Appears to have been added in c608d6d but never used
    
    Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
    Co-authored-by: Charles Kerr <charles@charleskerr.com>
    trop[bot] and ckerr authored Mar 24, 2025
    Copy the full SHA
    51f7712 View commit details
  2. build: Use windows src cache (#46187)

    build: use source cache on windows
    
    Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
    Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
    trop[bot] and jkleinsc authored Mar 24, 2025
    Copy the full SHA
    ef9cd34 View commit details
  3. refactor: remove unused weak_factory_ in electron_management_api_de…

    …legate.cc (#46219)
    
    refactor: remove unused weak_factory_
    
    Appears to have been added in 3745b76 but never used
    
    Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
    Co-authored-by: Charles Kerr <charles@charleskerr.com>
    trop[bot] and ckerr authored Mar 24, 2025
    Copy the full SHA
    fe9e90a View commit details
  4. fix: Wayland resizing border (#46223)

    * fix: Wayland resizing border
    
    Closes #44543
    Refs CL:5180720
    
    Fixes an issue where the resizing border didn't work as expected on Wayland windows.
    
    Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
    
    * fix: border insets when fullscreen
    
    Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
    
    ---------
    
    Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
    Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
    trop[bot] and codebytere authored Mar 24, 2025
    Copy the full SHA
    fcdf08c View commit details
  5. build: fixup release builds (#46232)

    * build: fixup release builds
    
    Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
    
    * build: fixup windows source cache for release
    
    ---------
    
    Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
    Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
    trop[bot] and jkleinsc authored Mar 24, 2025
    Copy the full SHA
    6da5666 View commit details

Commits on Mar 25, 2025

  1. feat: add ffmpeg.dll to delay load configuration (#46174)

    feat: set ffmpeg.dll as a delay-loaded DLL
    
    Updated the /DELAYLOAD linker config in BUILD.gn to set ffmpeg.dll
    as a delay-loaded DLL. This reduces startup overhead and prevents unnecessary
    loading when ffmpeg-related functionality is not used (e.g., the browser process
    was unnecessarily loading it).
    
    Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
    Co-authored-by: Zonglong Liu <83216456+mai-121@users.noreply.github.com>
    trop[bot] and mai-121 authored Mar 25, 2025
    Copy the full SHA
    19069ea View commit details
  2. fix: NODE_OPTIONS parsing for child processes on macOS (#46242)

    * fix: NODE_OPTIONS parsing for child processes on macOS
    
    Co-authored-by: deepak1556 <hop2deep@gmail.com>
    
    * chore: temporarily disable test
    
    Co-authored-by: deepak1556 <hop2deep@gmail.com>
    
    * chore: apply review feedback
    
    Co-authored-by: deepak1556 <hop2deep@gmail.com>
    
    * chore: fix build
    
    Co-authored-by: deepak1556 <hop2deep@gmail.com>
    
    ---------
    
    Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
    Co-authored-by: deepak1556 <hop2deep@gmail.com>
    trop[bot] and deepak1556 authored Mar 25, 2025
    Copy the full SHA
    fa44623 View commit details
  3. Copy the full SHA
    cfb7237 View commit details
  4. fix: oob string read when parsing node_options (#46246)

    * fix: oob string read when parsing node_options
    
    Co-authored-by: deepak1556 <hop2deep@gmail.com>
    
    * chore: re-enable test
    
    Co-authored-by: deepak1556 <hop2deep@gmail.com>
    
    * fix: missing linux server env for tests
    
    Co-authored-by: deepak1556 <hop2deep@gmail.com>
    
    ---------
    
    Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
    Co-authored-by: deepak1556 <hop2deep@gmail.com>
    trop[bot] and deepak1556 authored Mar 25, 2025
    Copy the full SHA
    06c84f3 View commit details
  5. perf: don't wait for thumbnails if they were not requested on macOS (#…

    …46250)
    
    When using the SCK thumbnail capturer, the first refresh has the list of
    sources, and the second refresh has the thumbnails. If thumbnails are
    not needed, only wait for the first refresh.
    
    Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
    Co-authored-by: John Beutner <beutner.john@gmail.com>
    trop[bot] and cptpcrd authored Mar 25, 2025
    Copy the full SHA
    2d7cfd3 View commit details
  6. fix: webContents.printToPDF() with cross-process subframes (#46258)

    fix: webContents.printToPDF() with cross-process subframes
    
    Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
    Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
    trop[bot] and codebytere authored Mar 25, 2025
    Copy the full SHA
    2b7f324 View commit details
  7. build: fixup windows source cache for release (#46269)

    * build: fixup ffmpeg gn gen
    
    Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
    
    * build: add build-tools depot_tools to PATH
    
    There are some cases where it is still expected that depot_tools be in the path
    
    Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
    
    * put back regular gn gen for ffmpeg
    
    Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
    
    * build: add retry to moving source cache
    
    This resolves the error: `Move-Item : The process cannot access the file because it is being used by another process.`
    
    Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
    
    ---------
    
    Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
    Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
    trop[bot] and jkleinsc authored Mar 25, 2025
    Copy the full SHA
    0b34f5b View commit details
  8. perf: avoid std::map temporaries in IsDevToolsFileSystemAdded() (#…

    …46266)
    
    * refactor: extract-method GetAddedFileSystems()
    
    Co-authored-by: Charles Kerr <charles@charleskerr.com>
    
    * refactor: use GetAddedFileSystems() in GetAddedFileSystemPaths()
    
    Co-authored-by: Charles Kerr <charles@charleskerr.com>
    
    * refactor: use GetAddedFileSystems() in IsDevToolsFileSystemAdded()
    
    Co-authored-by: Charles Kerr <charles@charleskerr.com>
    
    ---------
    
    Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
    Co-authored-by: Charles Kerr <charles@charleskerr.com>
    trop[bot] and ckerr authored Mar 25, 2025
    Copy the full SHA
    b5f8c75 View commit details

Commits on Mar 26, 2025

  1. perf: avoid redundant map lookup in WebFrameMain constructor (#46277)

    perf: avoid double map lookup in WebFrameMain constructor
    
    Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
    Co-authored-by: Charles Kerr <charles@charleskerr.com>
    trop[bot] and ckerr authored Mar 26, 2025
    Copy the full SHA
    42c8938 View commit details
  2. fix: build failure when printing is disabled (#46286)

    Co-authored-by: Charles Kerr <charles@charleskerr.com>
    codebytere and ckerr authored Mar 26, 2025
    Copy the full SHA
    9049d01 View commit details
Showing with 1,070 additions and 767 deletions.
  1. +4 −0 .gitattributes
  2. +25 −29 .github/actions/checkout/action.yml
  3. +40 −0 .github/actions/cipd-install/action.yml
  4. +0 −61 .github/actions/fix-sync-macos/action.yml
  5. +120 −0 .github/actions/fix-sync/action.yml
  6. +2 −0 .github/actions/install-build-tools/action.yml
  7. +9 −1 .github/actions/restore-cache-aks/action.yml
  8. +64 −11 .github/actions/restore-cache-azcopy/action.yml
  9. +10 −5 .github/workflows/build.yml
  10. +4 −0 .github/workflows/clean-src-cache.yml
  11. +1 −0 .github/workflows/macos-publish.yml
  12. +12 −29 .github/workflows/pipeline-segment-electron-build.yml
  13. +7 −1 .github/workflows/pipeline-segment-electron-gn-check.yml
  14. +4 −22 .github/workflows/pipeline-segment-node-nan-test.yml
  15. +5 −1 .github/workflows/windows-publish.yml
  16. +1 −1 BUILD.gn
  17. +3 −0 docs/api/push-notifications.md
  18. +0 −2 filenames.gni
  19. +1 −1 patches/chromium/.patches
  20. +5 −6 patches/chromium/cherry-pick-521faebc8a7c.patch
  21. +1 −1 patches/chromium/cherry-pick-9dacf5694dfd.patch
  22. +50 −4 ...le_synthetic_mouse_events_for_touch.patch → chore_modify_chromium_handling_of_mouse_events.patch}
  23. +1 −1 patches/chromium/fix_activate_background_material_on_windows.patch
  24. +2 −2 patches/chromium/fix_harden_blink_scriptstate_maybefrom.patch
  25. +1 −1 patches/chromium/fix_remove_caption-removing_style_call.patch
  26. +4 −4 patches/chromium/fix_take_snapped_status_into_account_when_showing_a_window.patch
  27. +115 −118 patches/chromium/reland_lzma_sdk_update_to_24_09.patch
  28. +8 −6 patches/v8/cherry-pick-2b4812d502b2.patch
  29. +4 −5 patches/v8/cherry-pick-91343bb45c78.patch
  30. +11 −3 script/push-patch.js
  31. +0 −1 shell/app/electron_content_client.cc
  32. +0 −1 shell/app/electron_main_linux.cc
  33. +0 −1 shell/app/electron_main_win.cc
  34. +18 −0 shell/browser/api/electron_api_app.cc
  35. +6 −4 shell/browser/api/electron_api_desktop_capturer.cc
  36. +26 −33 shell/browser/api/electron_api_protocol.cc
  37. +25 −24 shell/browser/api/electron_api_protocol.h
  38. +3 −8 shell/browser/api/electron_api_push_notifications_mac.mm
  39. +6 −6 shell/browser/api/electron_api_session.cc
  40. +1 −1 shell/browser/api/electron_api_view.cc
  41. +24 −6 shell/browser/api/electron_api_web_contents.cc
  42. +7 −2 shell/browser/api/electron_api_web_contents.h
  43. +2 −2 shell/browser/api/electron_api_web_frame_main.cc
  44. +0 −1 shell/browser/api/gpu_info_enumerator.h
  45. +54 −7 shell/browser/electron_browser_context.cc
  46. +9 −31 shell/browser/electron_browser_context.h
  47. +3 −9 shell/browser/electron_browser_main_parts.cc
  48. +0 −1 shell/browser/electron_download_manager_delegate.cc
  49. +0 −2 shell/browser/electron_web_contents_utility_handler_impl.h
  50. +0 −7 shell/browser/extensions/api/extension_action/extension_action_api.cc
  51. +3 −5 shell/browser/extensions/api/extension_action/extension_action_api.h
  52. +0 −4 shell/browser/extensions/api/management/electron_management_api_delegate.cc
  53. +1 −1 shell/browser/extensions/api/scripting/scripting_api.h
  54. +1 −0 shell/browser/extensions/electron_extensions_api_client.cc
  55. +6 −14 shell/browser/extensions/electron_extensions_browser_client.cc
  56. +1 −0 shell/browser/feature_list.cc
  57. +1 −0 shell/browser/file_system_access/file_system_access_permission_context.h
  58. +0 −1 shell/browser/javascript_environment.cc
  59. +3 −1 shell/browser/mac/electron_application_delegate.mm
  60. +1 −0 shell/browser/native_window.h
  61. +0 −9 shell/browser/native_window_views_win.cc
  62. +0 −1 shell/browser/net/asar/asar_file_validator.cc
  63. +133 −3 shell/browser/net/electron_url_loader_factory.cc
  64. +0 −2 shell/browser/net/proxying_websocket.h
  65. +0 −1 shell/browser/net/system_network_context_manager.cc
  66. +0 −104 shell/browser/net/url_pipe_loader.cc
  67. +0 −92 shell/browser/net/url_pipe_loader.h
  68. +1 −1 shell/browser/net/web_request_api_interface.h
  69. +0 −1 shell/browser/osr/osr_render_widget_host_view.cc
  70. +0 −2 shell/browser/relauncher.cc
  71. +3 −3 shell/browser/serial/serial_chooser_controller.cc
  72. +1 −1 shell/browser/ui/devtools_manager_delegate.cc
  73. +0 −1 shell/browser/ui/devtools_ui_bundle_data_source.cc
  74. +0 −1 shell/browser/ui/devtools_ui_theme_data_source.cc
  75. +19 −8 shell/browser/ui/electron_desktop_window_tree_host_linux.cc
  76. +2 −0 shell/browser/ui/electron_desktop_window_tree_host_linux.h
  77. +22 −21 shell/browser/ui/views/client_frame_view_linux.cc
  78. +7 −7 shell/browser/ui/views/client_frame_view_linux.h
  79. +11 −0 shell/browser/ui/win/electron_desktop_window_tree_host_win.cc
  80. +1 −0 shell/browser/ui/win/electron_desktop_window_tree_host_win.h
  81. +0 −1 shell/browser/zoom_level_delegate.cc
  82. +3 −2 shell/common/gin_converters/serial_port_info_converter.h
  83. +6 −3 shell/common/node_bindings.cc
  84. +0 −1 shell/common/process_util.h
  85. +0 −1 shell/renderer/api/electron_api_context_bridge.cc
  86. +0 −2 shell/renderer/electron_api_service_impl.cc
  87. +0 −2 shell/renderer/electron_render_frame_observer.cc
  88. +0 −1 shell/renderer/electron_sandboxed_renderer_client.cc
  89. +0 −2 shell/renderer/extensions/electron_extensions_renderer_client.cc
  90. +0 −2 shell/renderer/extensions/electron_extensions_renderer_client.h
  91. +16 −0 spec/api-desktop-capturer-spec.ts
  92. +33 −1 spec/api-web-contents-spec.ts
  93. +13 −3 spec/crash-spec.ts
  94. +11 −0 spec/fixtures/api/print-to-pdf-same-origin.html
  95. +1 −0 spec/fixtures/apps/node-options-utility-process/fail.js
  96. +15 −0 spec/fixtures/apps/node-options-utility-process/main.js
  97. +1 −0 spec/fixtures/apps/node-options-utility-process/noop.js
  98. +4 −0 spec/fixtures/apps/node-options-utility-process/package.json
  99. +3 −0 spec/fixtures/crash-cases/node-options-parsing/electron.env.json
  100. +20 −0 spec/fixtures/crash-cases/node-options-parsing/index.js
  101. +8 −0 spec/fixtures/crash-cases/node-options-parsing/options.js
  102. 0 spec/fixtures/crash-cases/node-options-parsing/preload.js
  103. +21 −0 spec/node-spec.ts
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
# `git apply` and friends don't understand CRLF, even on windows. Force those
# files to be checked out with LF endings even if core.autocrlf is true.
*.patch text eol=lf
DEPS text eol=lf
yarn.lock text eol=lf
script/zip_manifests/*.manifest text eol=lf
patches/**/.patches merge=union

# Patch file line ending exceptions (patches that affect CRLF files)
reland_lzma_sdk_update_to_24_09.patch -text

# Source code and markdown files should always use LF as line ending.
*.c text eol=lf
*.cc text eol=lf
54 changes: 25 additions & 29 deletions .github/actions/checkout/action.yml
Original file line number Diff line number Diff line change
@@ -9,6 +9,8 @@ inputs:
description: 'Whether to persist the cache to the shared drive'
required: false
default: 'true'
target-platform:
description: 'Target platform, should be linux, win, macos'
runs:
using: "composite"
steps:
@@ -18,40 +20,34 @@ runs:
echo "GIT_CACHE_PATH=$(pwd)/git-cache" >> $GITHUB_ENV
- name: Install Dependencies
uses: ./src/electron/.github/actions/install-dependencies
- name: Install Build Tools
uses: ./src/electron/.github/actions/install-build-tools
- name: Set Chromium Git Cookie
uses: ./src/electron/.github/actions/set-chromium-cookie
- name: Get Depot Tools
shell: bash
run: |
if [[ ! -d depot_tools ]]; then
git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git
# Ensure depot_tools does not update.
test -d depot_tools && cd depot_tools
touch .disable_auto_update
fi
- name: Add Depot Tools to PATH
shell: bash
run: echo "$(pwd)/depot_tools" >> $GITHUB_PATH
- name: Install Build Tools
uses: ./src/electron/.github/actions/install-build-tools
- name: Generate DEPS Hash
shell: bash
run: |
node src/electron/script/generate-deps-hash.js
echo "DEPSHASH=v1-src-cache-$(cat src/electron/.depshash)" >> $GITHUB_ENV
DEPSHASH="v1-src-cache-$(cat src/electron/.depshash)"
echo "DEPSHASH=$DEPSHASH" >> $GITHUB_ENV
echo "CACHE_FILE=$DEPSHASH.tar" >> $GITHUB_ENV
if [ "${{ inputs.target-platform }}" = "win" ]; then
echo "CACHE_DRIVE=/mnt/win-cache" >> $GITHUB_ENV
else
echo "CACHE_DRIVE=/mnt/cross-instance-cache" >> $GITHUB_ENV
fi
- name: Generate SAS Key
if: ${{ inputs.generate-sas-token == 'true' }}
shell: bash
run: |
curl --unix-socket /var/run/sas/sas.sock --fail "http://foo/$DEPSHASH.tar" > sas-token
curl --unix-socket /var/run/sas/sas.sock --fail "http://foo/$CACHE_FILE?platform=${{ inputs.target-platform }}" > sas-token
- name: Save SAS Key
if: ${{ inputs.generate-sas-token == 'true' }}
uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57
uses: actions/cache/save@d4323d4df104b026a6aa633fdb11d772146be0bf
with:
path: |
sas-token
key: sas-key-${{ github.run_number }}-${{ github.run_attempt }}
path: sas-token
key: sas-key-${{ inputs.target-platform }}-${{ github.run_number }}-${{ github.run_attempt }}
enableCrossOsArchive: true
- name: Check If Cache Exists
id: check-cache
shell: bash
@@ -60,7 +56,7 @@ runs:
echo "Not using cache this time..."
echo "cache_exists=false" >> $GITHUB_OUTPUT
else
cache_path=/mnt/cross-instance-cache/$DEPSHASH.tar
cache_path=$CACHE_DRIVE/$CACHE_FILE
echo "Using cache key: $DEPSHASH"
echo "Checking for cache in: $cache_path"
if [ ! -f "$cache_path" ] || [ `du $cache_path | cut -f1` = "0" ]; then
@@ -76,8 +72,8 @@ runs:
shell: bash
run: |
# if there is less than 35 GB free space then creating the cache might fail so exit early
freespace=`df -m /mnt/cross-instance-cache | grep -w /mnt/cross-instance-cache | awk '{print $4}'`
freespace_human=`df -h /mnt/cross-instance-cache | grep -w /mnt/cross-instance-cache | awk '{print $4}'`
freespace=`df -m $CACHE_DRIVE | grep -w $CACHE_DRIVE | awk '{print $4}'`
freespace_human=`df -h $CACHE_DRIVE | grep -w $CACHE_DRIVE | awk '{print $4}'`
if [ $freespace -le 35000 ]; then
echo "The cross mount cache has $freespace_human free space which is not enough - exiting"
exit 1
@@ -99,7 +95,7 @@ runs:
fi
ELECTRON_USE_THREE_WAY_MERGE_FOR_PATCHES=1 e d gclient sync --with_branch_heads --with_tags -vv
if [[ "${{ inputs.is-release }}" != "true" && -n "${{ env.PATCH_UP_APP_CREDS }}" ]]; then
if [[ "${{ inputs.is-release }}" != "true" ]]; then
# Re-export all the patches to check if there were changes.
python3 src/electron/script/export_all_patches.py src/electron/patches/config.json
cd src/electron
@@ -167,14 +163,14 @@ runs:
shell: bash
run: |
echo "Uncompressed src size: $(du -sh src | cut -f1 -d' ')"
tar -cf $DEPSHASH.tar src
echo "Compressed src to $(du -sh $DEPSHASH.tar | cut -f1 -d' ')"
cp ./$DEPSHASH.tar /mnt/cross-instance-cache/
tar -cf $CACHE_FILE src
echo "Compressed src to $(du -sh $CACHE_FILE | cut -f1 -d' ')"
cp ./$CACHE_FILE $CACHE_DRIVE/
- name: Persist Src Cache
if: ${{ steps.check-cache.outputs.cache_exists == 'false' && inputs.use-cache == 'true' }}
shell: bash
run: |
final_cache_path=/mnt/cross-instance-cache/$DEPSHASH.tar
final_cache_path=$CACHE_DRIVE/$CACHE_FILE
echo "Using cache key: $DEPSHASH"
echo "Checking path: $final_cache_path"
if [ ! -f "$final_cache_path" ]; then
40 changes: 40 additions & 0 deletions .github/actions/cipd-install/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: 'CIPD install'
description: 'Installs the specified CIPD package'
inputs:
cipd-root-prefix-path:
description: 'Path to prepend to installation directory'
default: ''
dependency:
description: 'Name of dependency to install'
deps-file:
description: 'Location of DEPS file that defines the dependency'
installation-dir:
description: 'Location to install dependency'
target-platform:
description: 'Target platform, should be linux, win, macos'
package:
description: 'Package to install'
runs:
using: "composite"
steps:
- name: Delete wrong ${{ inputs.dependency }}
shell: bash
run : |
rm -rf ${{ inputs.cipd-root-prefix-path }}${{ inputs.installation-dir }}
- name: Create ensure file for ${{ inputs.dependency }}
shell: bash
run: |
echo '${{ inputs.package }}' `e d gclient getdep --deps-file=${{ inputs.deps-file }} -r '${{ inputs.installation-dir }}:${{ inputs.package }}'` > ${{ inputs.dependency }}_ensure_file
cat ${{ inputs.dependency }}_ensure_file
- name: CIPD installation of ${{ inputs.dependency }} (macOS)
if: ${{ inputs.target-platform == 'macos' }}
shell: bash
run: |
echo "ensuring ${{ inputs.dependency }} on macOS"
e d cipd ensure --root ${{ inputs.cipd-root-prefix-path }}${{ inputs.installation-dir }} -ensure-file ${{ inputs.dependency }}_ensure_file
- name: CIPD installation of ${{ inputs.dependency }} (Windows)
if: ${{ inputs.target-platform == 'win' }}
shell: powershell
run: |
echo "ensuring ${{ inputs.dependency }} on Windows"
e d cipd ensure --root ${{ inputs.cipd-root-prefix-path }}${{ inputs.installation-dir }} -ensure-file ${{ inputs.dependency }}_ensure_file
61 changes: 0 additions & 61 deletions .github/actions/fix-sync-macos/action.yml

This file was deleted.

120 changes: 120 additions & 0 deletions .github/actions/fix-sync/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
name: 'Fix Sync'
description: 'Ensures proper binaries are in place'
# This action is required to correct for differences between "gclient sync"
# on Linux and the expected state on macOS/windows. This requires:
# 1. Fixing Clang Install (wrong binary)
# 2. Fixing esbuild (wrong binary)
# 3. Fixing rustc (wrong binary)
# 4. Fixing gn (wrong binary)
# 5. Fix reclient (wrong binary)
# 6. Fixing dsymutil (wrong binary)
# 7. Ensuring we are using the correct ninja and adding it to PATH
# 8. Fixing angle (wrong remote)
# 9. Install windows toolchain on Windows
# 10. Fix node binary on Windows
# 11. Fix rc binary on Windows
inputs:
target-platform:
description: 'Target platform, should be linux, win, macos'
runs:
using: "composite"
steps:
- name: Fix clang
shell: bash
run : |
rm -rf src/third_party/llvm-build
python3 src/tools/clang/scripts/update.py
- name: Fix esbuild
uses: ./src/electron/.github/actions/cipd-install
with:
cipd-root-prefix-path: src/third_party/devtools-frontend/src/
dependency: esbuild
deps-file: src/third_party/devtools-frontend/src/DEPS
installation-dir: third_party/esbuild
target-platform: ${{ inputs.target-platform }}
package: infra/3pp/tools/esbuild/${platform}
- name: Fix rustc
shell: bash
run : |
rm -rf src/third_party/rust-toolchain
python3 src/tools/rust/update_rust.py
- name: Fix gn (macOS)
if: ${{ inputs.target-platform == 'macos' }}
uses: ./src/electron/.github/actions/cipd-install
with:
dependency: gn
deps-file: src/DEPS
installation-dir: src/buildtools/mac
target-platform: ${{ inputs.target-platform }}
package: gn/gn/mac-${arch}
- name: Fix gn (Windows)
if: ${{ inputs.target-platform == 'win' }}
uses: ./src/electron/.github/actions/cipd-install
with:
dependency: gn
deps-file: src/DEPS
installation-dir: src/buildtools/win
target-platform: ${{ inputs.target-platform }}
package: gn/gn/windows-amd64
- name: Fix reclient
uses: ./src/electron/.github/actions/cipd-install
with:
dependency: reclient
deps-file: src/DEPS
installation-dir: src/buildtools/reclient
target-platform: ${{ inputs.target-platform }}
package: infra/rbe/client/${platform}
- name: Configure reclient configs
shell: bash
run : |
python3 src/buildtools/reclient_cfgs/configure_reclient_cfgs.py --rbe_instance "projects/rbe-chrome-untrusted/instances/default_instance" --reproxy_cfg_template reproxy.cfg.template --rewrapper_cfg_project "" --skip_remoteexec_cfg_fetch
- name: Fix dsymutil (macOS)
if: ${{ inputs.target-platform == 'macos' }}
shell: bash
run : |
# Fix dsymutil
if [ "${{ inputs.target-platform }}" = "macos" ]; then
if [ "${{ env.TARGET_ARCH }}" == "arm64" ]; then
DSYM_SHA_FILE=src/tools/clang/dsymutil/bin/dsymutil.arm64.sha1
else
DSYM_SHA_FILE=src/tools/clang/dsymutil/bin/dsymutil.x64.sha1
fi
python3 src/third_party/depot_tools/download_from_google_storage.py --no_resume --no_auth --bucket chromium-browser-clang -s $DSYM_SHA_FILE -o src/tools/clang/dsymutil/bin/dsymutil
fi
- name: Fix ninja
uses: ./src/electron/.github/actions/cipd-install
with:
dependency: ninja
deps-file: src/DEPS
installation-dir: src/third_party/ninja
target-platform: ${{ inputs.target-platform }}
package: infra/3pp/tools/ninja/${platform}
- name: Set ninja in path
shell: bash
run : |
echo "$(pwd)/src/third_party/ninja" >> $GITHUB_PATH
- name: Fixup angle git
shell: bash
run : |
cd src/third_party/angle
rm -f .git/objects/info/alternates
git remote set-url origin https://chromium.googlesource.com/angle/angle.git
cp .git/config .git/config.backup
git remote remove origin
mv .git/config.backup .git/config
git fetch
- name: Get Windows toolchain
if: ${{ inputs.target-platform == 'win' }}
shell: powershell
run: e d vpython3 src\build\vs_toolchain.py update --force
- name: Download nodejs
if: ${{ inputs.target-platform == 'win' }}
shell: powershell
run: |
$nodedeps = e d gclient getdep --deps-file=src/DEPS -r src/third_party/node/win | ConvertFrom-JSON
python3 src\third_party\depot_tools\download_from_google_storage.py --no_resume --no_auth --bucket chromium-nodejs -o src\third_party\node\win\node.exe $nodedeps.object_name
- name: Install rc
if: ${{ inputs.target-platform == 'win' }}
shell: bash
run: |
python3 src/third_party/depot_tools/download_from_google_storage.py --no_resume --no_auth --bucket chromium-browser-clang/rc -s src/build/toolchain/win/rc/win/rc.exe.sha1
2 changes: 2 additions & 0 deletions .github/actions/install-build-tools/action.yml
Original file line number Diff line number Diff line change
@@ -14,7 +14,9 @@ runs:
export BUILD_TOOLS_SHA=8246e57791b0af4ae5975eb96f09855f9269b1cd
npm i -g @electron/build-tools
e auto-update disable
e d auto-update disable
if [ "$(expr substr $(uname -s) 1 10)" == "MSYS_NT-10" ]; then
e d cipd.bat --version
cp "C:\Python311\python.exe" "C:\Python311\python3.exe"
fi
echo "$HOME/.electron_build_tools/third_party/depot_tools" >> $GITHUB_PATH
10 changes: 9 additions & 1 deletion .github/actions/restore-cache-aks/action.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
name: 'Restore Cache AKS'
description: 'Restores Electron src cache via AKS'
inputs:
target-platform:
description: 'Target platform, should be linux, win, macos'
runs:
using: "composite"
steps:
- name: Restore and Ensure Src Cache
shell: bash
run: |
cache_path=/mnt/cross-instance-cache/$DEPSHASH.tar
if [ "${{ inputs.target-platform }}" = "win" ]; then
cache_path=/mnt/win-cache/$DEPSHASH.tar
else
cache_path=/mnt/cross-instance-cache/$DEPSHASH.tar
fi
echo "Using cache key: $DEPSHASH"
echo "Checking for cache in: $cache_path"
if [ ! -f "$cache_path" ]; then
Loading