Enable JIT memory protection on macOS (flutter/engine#25819)

This commit is contained in:
Matej Knopp
2021-04-29 04:19:01 +02:00
committed by GitHub
parent 646b25992a
commit 5d512fb39e

View File

@@ -331,7 +331,7 @@ DartVM::DartVM(std::shared_ptr<const DartVMData> vm_data,
#endif // !OS_FUCHSIA
#if (FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_DEBUG)
#if !OS_IOS || TARGET_OS_SIMULATOR
#if !OS_IOS && !OS_MACOSX
// Debug mode uses the JIT, disable code page write protection to avoid
// memory page protection changes before and after every compilation.
PushBackAll(&args, kDartWriteProtectCodeArgs,
@@ -351,7 +351,7 @@ DartVM::DartVM(std::shared_ptr<const DartVMData> vm_data,
PushBackAll(&args, kDartDisableIntegerDivisionArgs,
fml::size(kDartDisableIntegerDivisionArgs));
#endif // TARGET_CPU_ARM
#endif // !OS_IOS || TARGET_OS_SIMULATOR
#endif // !OS_IOS && !OS_MACOSX
#endif // (FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_DEBUG)
if (enable_asserts) {