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

Unified Diff: android_webview/browser/aw_form_database_service.cc

Issue 2817923003: aw: Add allow wait for form database (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 | android_webview/javatests/src/org/chromium/android_webview/test/AwFormDatabaseTest.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/browser/aw_form_database_service.cc
diff --git a/android_webview/browser/aw_form_database_service.cc b/android_webview/browser/aw_form_database_service.cc
index 2c8d235b43420862e1e877d3c1d821db07f5cd63..8fde67fdd483cbc815039dd63cba24b60dc78b7f 100644
--- a/android_webview/browser/aw_form_database_service.cc
+++ b/android_webview/browser/aw_form_database_service.cc
@@ -7,6 +7,7 @@
#include "base/logging.h"
#include "base/memory/ptr_util.h"
#include "base/synchronization/waitable_event.h"
+#include "base/threading/thread_restrictions.h"
#include "components/autofill/core/browser/webdata/autofill_table.h"
#include "components/webdata/common/webdata_constants.h"
#include "content/public/browser/browser_thread.h"
@@ -88,7 +89,10 @@ bool AwFormDatabaseService::HasFormData() {
base::Unretained(this),
&completion,
&result));
- completion.Wait();
+ {
+ base::ThreadRestrictions::ScopedAllowWait wait;
+ completion.Wait();
+ }
return result;
}
« no previous file with comments | « no previous file | android_webview/javatests/src/org/chromium/android_webview/test/AwFormDatabaseTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698