fix: Ensure electron delay loads the same modules as chromium (#25428)

* 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: Samuel Attard <samuel.r.attard@gmail.com>
This commit is contained in:
Chris Davis 2020-09-11 23:01:41 -07:00 committed by GitHub
parent ce86591459
commit a3389d017f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1138,20 +1138,17 @@ if (is_mac) {
"//components/crash/core/app:run_as_crashpad_handler", "//components/crash/core/app:run_as_crashpad_handler",
] ]
ldflags = []
libs = [ libs = [
"comctl32.lib", "comctl32.lib",
"uiautomationcore.lib", "uiautomationcore.lib",
"wtsapi32.lib", "wtsapi32.lib",
] ]
configs += [ "//build/config/win:windowed" ] configs += [
"//build/config/win:windowed",
ldflags = [ "//build/config/win:delayloads",
# 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",
] ]
if (target_cpu == "arm64") { if (target_cpu == "arm64") {