Skip to content

Commit

Permalink
fix: Ensure electron delay loads the same modules as chromium (#25437)
Browse files Browse the repository at this point in the history
* Ensure electron delay loads the appropriate modules as chromium on windows

This change adds the same module delay load list that chromium uses for electron.  Some modules were already getting delay loaded from other build files in chromium but not the main list via //build/config/win:delayloads.  We do not include the list of delay loads in delayloads_not_for_child_dll as those have issues being loaded in sandboxes processes.  This will reduce the overall reference set impact of the electron processes.

* fix: Ensure win modules are properly delayloaded

* chore: fix linting

Co-authored-by: Chris Davis <chrisdavis@outlook.com>
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
  • Loading branch information
3 people committed Sep 14, 2020
1 parent 5e289ce commit 48779fe
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions BUILD.gn
Expand Up @@ -1115,20 +1115,17 @@ if (is_mac) {
"//components/crash/core/app:run_as_crashpad_handler",
]

ldflags = []

libs = [
"comctl32.lib",
"uiautomationcore.lib",
"wtsapi32.lib",
]

configs += [ "//build/config/win:windowed" ]

ldflags = [
# Windows 7 doesn't have these DLLs.
# TODO: are there other DLLs we need to list here to be win7
# compatible?
"/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll",
"/DELAYLOAD:api-ms-win-core-winrt-string-l1-1-0.dll",
configs += [
"//build/config/win:windowed",
"//build/config/win:delayloads",
]

# This is to support renaming of electron.exe. node-gyp has hard-coded
Expand Down

0 comments on commit 48779fe

Please sign in to comment.