Closing asar file should be syncronous

This commit is contained in:
Cheng Zhao 2018-01-03 19:12:16 +09:00
parent fb78052b3d
commit 1072c75e38

View file

@ -138,11 +138,8 @@ Archive::~Archive() {
file_.TakePlatformFile(); file_.TakePlatformFile();
} }
#endif #endif
base::PostTaskWithTraits( base::ThreadRestrictions::ScopedAllowIO allow_io;
FROM_HERE, file_.Close();
{base::MayBlock(), base::TaskPriority::BACKGROUND,
base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN},
base::Bind([](base::File file) { file.Close(); }, Passed(&file_)));
} }
bool Archive::Init() { bool Archive::Init() {