From 5d68ce09073245ff0a26509fbb6550134ead9485 Mon Sep 17 00:00:00 2001 From: Chris Davis Date: Fri, 11 Sep 2020 11:04:59 -0700 Subject: [PATCH 1/3] 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. --- BUILD.gn | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 6b538e1432b86..b8735f70664cb 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1144,14 +1144,11 @@ if (is_mac) { "wtsapi32.lib", ] - configs += [ "//build/config/win:windowed" ] + ldflags = [] - 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 From 06fe4465dda4361f841a6c962e9e583bb6cdf43f Mon Sep 17 00:00:00 2001 From: Chris Davis Date: Fri, 11 Sep 2020 11:22:52 -0700 Subject: [PATCH 2/3] fix: Ensure win modules are properly delayloaded --- BUILD.gn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index b8735f70664cb..23f6692cbd993 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1138,14 +1138,14 @@ if (is_mac) { "//components/crash/core/app:run_as_crashpad_handler", ] + ldflags = [] + libs = [ "comctl32.lib", "uiautomationcore.lib", "wtsapi32.lib", ] - ldflags = [] - configs += [ "//build/config/win:windowed", "//build/config/win:delayloads", From 1aa7c5288da13e489ff812d827a42bc1e8d0b11a Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Fri, 11 Sep 2020 11:31:39 -0700 Subject: [PATCH 3/3] chore: fix linting --- BUILD.gn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BUILD.gn b/BUILD.gn index 23f6692cbd993..0bf20e4708f2e 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1139,7 +1139,7 @@ if (is_mac) { ] ldflags = [] - + libs = [ "comctl32.lib", "uiautomationcore.lib",