提交 5afca375 编写于 作者: J John McCutchan 提交者: GitHub

Disable code page write protection in debug mode (#3299)

上级 0ebc19cd
......@@ -90,6 +90,10 @@ static const char* kDartBackgroundCompilationArgs[] = {
"--background_compilation",
};
static const char* kDartWriteProtectCodeArgs[] = {
"--no_write_protect_code",
};
static const char* kDartCheckedModeArgs[] = {
// clang-format off
"--enable_asserts",
......@@ -634,6 +638,14 @@ void InitDartVM() {
const bool use_checked_mode = !IsRunningPrecompiledCode();
#endif
#if FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_DEBUG
// Debug mode uses the JIT, disable code page write protection to avoid
// memory page protection changes before and after every compilation.
PushBackAll(&args,
kDartWriteProtectCodeArgs,
arraysize(kDartWriteProtectCodeArgs));
#endif
if (use_checked_mode)
PushBackAll(&args, kDartCheckedModeArgs, arraysize(kDartCheckedModeArgs));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册