AwFormDatabaseService::HasFormData shouldn't allow base sync primitives without blocking allowance |
|||
Issue descriptionAwFormDatabaseService::HasFormData() uses a base:: sync primitive in a scope where blocking is normally not allowed. This was discovered while migrating to ScopedAllowBaseSyncPrimitives [1]. This probably means the database service blocks on the main/UI thread. Allowing blocking calls is usually done by running the task on a scheduler worker with MayBlock trait. If possible, that would be a better alternative for AwFormDatabaseService [2]. [1]: https://chromium-review.googlesource.com/c/chromium/src/+/1325195 [2]: https://chromium.googlesource.com/chromium/src/+/lkgr/docs/threading_and_tasks.md#Keeping-the-Browser-Responsive
,
Nov 12
It's a public webview API that we can't change, and it expects a result synchronous on the UI thread: https://developer.android.com/reference/android/webkit/WebViewDatabase.html#hasFormData()
,
Nov 12
,
Nov 12
Sounds good, we can keep ScopedAllowBaseSyncPrimitivesOutsideBlockingScope then.
,
Nov 12
Thanks for the explanation, let's move the friend in thread_restrictions.h to the allowed section (but keep the bug number for reference) Le lun. 12 nov. 2018 12 h 53, etiennep via monorail < monorail+v2.527760868@chromium.org> a écrit : |
|||
►
Sign in to add a comment |
|||
Comment 1 by etiennep@chromium.org
, Nov 12