New issue
Advanced search Search tips

Issue 904431 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Nov 12
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

AwFormDatabaseService::HasFormData shouldn't allow base sync primitives without blocking allowance

Project Member Reported by etiennep@chromium.org, Nov 12

Issue description

AwFormDatabaseService::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
 
Summary: AwFormDatabaseService::HasFormData shouldn't allow base sync primitives without blocking allowance (was: AwFormDatabaseService::HasFormData shouldn't be allowed base sync primitives)
Status: WontFix (was: Untriaged)
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()
Components: Mobile>WebView
Sounds good, we can keep ScopedAllowBaseSyncPrimitivesOutsideBlockingScope then.
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