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

Unified Diff: components/leveldb/env_mojo.cc

Issue 2838663002: Use correct task traits for mojo leveldb env background tasks. (Closed)
Patch Set: 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..206b8d481da751d1b0a5bf415de9016444c02257 100644
--- a/components/leveldb/env_mojo.cc
+++ b/components/leveldb/env_mojo.cc
@@ -413,7 +413,9 @@ 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(),
michaeln 2017/04/24 20:54:17 lgtm - Do you know if these tasks are skipped whet
Marijn Kruisselbrink 2017/04/24 21:05:23 Good point, yes, I believe destructing the leveldb
+ 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