diff --git a/shell/platform/fuchsia/flutter/component.cc b/shell/platform/fuchsia/flutter/component.cc index 66c5591b262..4ba6f06e717 100644 --- a/shell/platform/fuchsia/flutter/component.cc +++ b/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;