diff --git a/engine/src/flutter/shell/platform/fuchsia/flutter/component.cc b/engine/src/flutter/shell/platform/fuchsia/flutter/component.cc index 66c5591b26..4ba6f06e71 100644 --- a/engine/src/flutter/shell/platform/fuchsia/flutter/component.cc +++ b/engine/src/flutter/shell/platform/fuchsia/flutter/component.cc @@ -99,9 +99,11 @@ static std::unique_ptr MakeFileMapping(const char* path, using Protection = fml::FileMapping::Protection; + std::initializer_list protection_execute = {Protection::kRead, + Protection::kExecute}; + std::initializer_list protection_read = {Protection::kRead}; auto mapping = std::make_unique( - fml::UniqueFD{fd}, std::initializer_list{ - Protection::kRead, Protection::kExecute}); + fml::UniqueFD{fd}, executable ? protection_execute : protection_read); if (!mapping->IsValid()) { return nullptr;