New issue
Advanced search Search tips

Issue 813089 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

Make the entire WebView glue layer less dependent on WebViewChromiumFactoryProvider

Project Member Reported by gsennton@chromium.org, Feb 16 2018

Issue description

WebViewChromiumFactoryProvider provides a bunch of functionality for posting tasks to the UI thread, and a bunch of glue classes use this functionality. This creates several circular dependencies where the WebViewChromiumFactoryProvider creates a class which depends on WebViewChromiumFactoryProvider to post tasks to the UI thread.

We should move all the UI-thread task logic into WebViewChromiumRunQueue instead to avoid these circular dependencies.

This is especially relevant now that we're adding a support library glue since we want to share some functionality between the support library glue and the existing webkit glue - and circular dependencies in the webkit glue make it harder to break out classes with shared functionality. 
 
Project Member

Comment 1 by bugdroid1@chromium.org, Feb 16 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f9c846ab8eab7e681df3ed468776c8f7640177a2

commit f9c846ab8eab7e681df3ed468776c8f7640177a2
Author: Gustav Sennton <gsennton@google.com>
Date: Fri Feb 16 17:50:23 2018

Move UI-thread-posting into WebViewChromiumRunQueue.

A lot of classes in the glue depend on the
WebViewChromiumFactoryProvider because they need to post tasks to the UI
thread.
In this CL we move that task-posting functionality into
WebViewChromiumRunQueue to allow glue classes (including classes shared
between the webkit glue and the support library glue) to depend on
WebViewChromiumRunQueue instead of WebViewChromiumFactoryProvider.

We're leaving the original methods in WebViewChromiumFactoryProvider for
now to avoid having to change all callers at the same time.

Bug: 813089
Change-Id: I5f01179b1917df9aaa345f53f2292bcab8238368
Reviewed-on: https://chromium-review.googlesource.com/924184
Reviewed-by: Bo <boliu@chromium.org>
Commit-Queue: Gustav Sennton <gsennton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#537345}
[modify] https://crrev.com/f9c846ab8eab7e681df3ed468776c8f7640177a2/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java
[modify] https://crrev.com/f9c846ab8eab7e681df3ed468776c8f7640177a2/android_webview/java/src/org/chromium/android_webview/WebViewChromiumRunQueue.java

Cc: ntfschr@chromium.org
Labels: -Pri-1 Pri-3
Owner: ----
Status: Available (was: Assigned)
Not critical, because support lib is unblocked. Not actively working on this, but we should get to this eventually.

Sign in to add a comment