mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Do not request executable permission on Fuchsia file mappings unless it is required (#13290)
Fixes https://github.com/flutter/flutter/issues/43273
This commit is contained in:
parent
a554235978
commit
f0c9edcfa5
@ -99,9 +99,11 @@ static std::unique_ptr<fml::FileMapping> MakeFileMapping(const char* path,
|
||||
|
||||
using Protection = fml::FileMapping::Protection;
|
||||
|
||||
std::initializer_list<Protection> protection_execute = {Protection::kRead,
|
||||
Protection::kExecute};
|
||||
std::initializer_list<Protection> protection_read = {Protection::kRead};
|
||||
auto mapping = std::make_unique<fml::FileMapping>(
|
||||
fml::UniqueFD{fd}, std::initializer_list<Protection>{
|
||||
Protection::kRead, Protection::kExecute});
|
||||
fml::UniqueFD{fd}, executable ? protection_execute : protection_read);
|
||||
|
||||
if (!mapping->IsValid()) {
|
||||
return nullptr;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user