Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Check for a valid SkSL cache directory before calling VisitFiles #21118

Merged
merged 1 commit into from
Sep 11, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion shell/common/persistent_cache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,9 @@ std::vector<PersistentCache::SkSLCache> PersistentCache::LoadSkSLs() {
// opened directory (https://github.com/flutter/flutter/issues/65258).
fml::UniqueFD fresh_dir =
fml::OpenDirectoryReadOnly(*cache_directory_, kSkSLSubdirName);
fml::VisitFiles(fresh_dir, visitor);
if (fresh_dir.is_valid()) {
fml::VisitFiles(fresh_dir, visitor);
}
}

std::unique_ptr<fml::Mapping> mapping = nullptr;
Expand Down