fix: adopt partition alloc early initialization (#33832)
Refs https://chromium-review.googlesource.com/c/chromium/src/+/3298858
This commit is contained in:
parent
0c864837af
commit
b53118ca28
2 changed files with 7 additions and 1 deletions
6
BUILD.gn
6
BUILD.gn
|
@ -916,7 +916,10 @@ if (is_mac) {
|
||||||
assert(defined(invoker.helper_name_suffix))
|
assert(defined(invoker.helper_name_suffix))
|
||||||
|
|
||||||
output_name = electron_helper_name + 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) {
|
if (!is_mas_build) {
|
||||||
deps += [ "//sandbox/mac:seatbelt" ]
|
deps += [ "//sandbox/mac:seatbelt" ]
|
||||||
}
|
}
|
||||||
|
@ -1077,6 +1080,7 @@ if (is_mac) {
|
||||||
":electron_app_plist",
|
":electron_app_plist",
|
||||||
":electron_app_resources",
|
":electron_app_resources",
|
||||||
":electron_fuses",
|
":electron_fuses",
|
||||||
|
"//base/allocator:early_zone_registration_mac",
|
||||||
"//electron/buildflags",
|
"//electron/buildflags",
|
||||||
]
|
]
|
||||||
if (is_mas_build) {
|
if (is_mas_build) {
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
#include "base/allocator/early_zone_registration_mac.h"
|
||||||
#include "electron/buildflags/buildflags.h"
|
#include "electron/buildflags/buildflags.h"
|
||||||
#include "electron/fuses.h"
|
#include "electron/fuses.h"
|
||||||
#include "shell/app/electron_library_main.h"
|
#include "shell/app/electron_library_main.h"
|
||||||
|
@ -28,6 +29,7 @@ namespace {
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
int main(int argc, char* argv[]) {
|
int main(int argc, char* argv[]) {
|
||||||
|
partition_alloc::EarlyMallocZoneRegistration();
|
||||||
FixStdioStreams();
|
FixStdioStreams();
|
||||||
|
|
||||||
#if BUILDFLAG(ENABLE_RUN_AS_NODE)
|
#if BUILDFLAG(ENABLE_RUN_AS_NODE)
|
||||||
|
|
Loading…
Reference in a new issue