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

Unified Diff: chrome/browser/history/android/sqlite_cursor.cc

Issue 15701011: Only wait for CancelAllRequests done if the post task succeeds (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comment Created 7 years, 7 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: chrome/browser/history/android/sqlite_cursor.cc
diff --git a/chrome/browser/history/android/sqlite_cursor.cc b/chrome/browser/history/android/sqlite_cursor.cc
index 3a933c665afe21e89892dacd56b07fc7eccb0420..d337a468c8dfe86c6f572286eb8a270361ed38b3 100644
--- a/chrome/browser/history/android/sqlite_cursor.cc
+++ b/chrome/browser/history/android/sqlite_cursor.cc
@@ -156,12 +156,11 @@ SQLiteCursor::~SQLiteCursor() {
CancelAllRequests(NULL);
} else {
base::WaitableEvent event(false, false);
- BrowserThread::PostTask(
- BrowserThread::UI,
- FROM_HERE,
+ if (BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
sky 2013/05/30 19:33:05 From PostTask: " even if the task is posted, there
michaelbai 2013/05/31 05:17:02 In the case of UI message loop goes away, the whol
base::Bind(&SQLiteCursor::CancelAllRequests, base::Unretained(this),
- &event));
- event.Wait();
+ &event))) {
+ event.Wait();
+ }
}
BrowserThread::PostTask(
« 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