Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Unified Diff: components/leveldb/env_mojo.cc

Issue 2838663002: Use correct task traits for mojo leveldb env background tasks. (Closed)
Patch Set: correct shutdown behavior Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/leveldb/env_mojo.cc
diff --git a/components/leveldb/env_mojo.cc b/components/leveldb/env_mojo.cc
index 4f82181a5a385ba03a875133adaef639aad84ad1..471f7141023731c5f8e7458d516873ae4f578036 100644
--- a/components/leveldb/env_mojo.cc
+++ b/components/leveldb/env_mojo.cc
@@ -413,7 +413,13 @@ void MojoEnv::SleepForMicroseconds(int micros) {
}
void MojoEnv::Schedule(void (*function)(void* arg), void* arg) {
- base::PostTask(FROM_HERE, base::Bind(function, arg));
+ base::PostTaskWithTraits(
+ FROM_HERE,
+ base::TaskTraits()
+ .MayBlock()
+ .WithBaseSyncPrimitives()
+ .WithShutdownBehavior(base::TaskShutdownBehavior::BLOCK_SHUTDOWN),
+ base::Bind(function, arg));
}
void MojoEnv::StartThread(void (*function)(void* arg), void* arg) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698