Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: adopt partition alloc early initialization for macOS #33832

Merged
merged 1 commit into from Apr 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion BUILD.gn
Expand Up @@ -916,7 +916,10 @@ if (is_mac) {
assert(defined(invoker.helper_name_suffix))

output_name = electron_helper_name + invoker.helper_name_suffix
deps = [ ":electron_framework+link" ]
deps = [
":electron_framework+link",
"//base/allocator:early_zone_registration_mac",
]
if (!is_mas_build) {
deps += [ "//sandbox/mac:seatbelt" ]
}
Expand Down Expand Up @@ -1077,6 +1080,7 @@ if (is_mac) {
":electron_app_plist",
":electron_app_resources",
":electron_fuses",
"//base/allocator:early_zone_registration_mac",
"//electron/buildflags",
]
if (is_mas_build) {
Expand Down
2 changes: 2 additions & 0 deletions shell/app/electron_main_mac.cc
Expand Up @@ -5,6 +5,7 @@
#include <cstdlib>
#include <memory>

#include "base/allocator/early_zone_registration_mac.h"
#include "electron/buildflags/buildflags.h"
#include "electron/fuses.h"
#include "shell/app/electron_library_main.h"
Expand All @@ -28,6 +29,7 @@ namespace {
} // namespace

int main(int argc, char* argv[]) {
partition_alloc::EarlyMallocZoneRegistration();
FixStdioStreams();

#if BUILDFLAG(ENABLE_RUN_AS_NODE)
Expand Down