Connect InterfaceProvider with BinderMap?

567 views
Skip to first unread message

Dominik Röttsches

unread,
Nov 4, 2024, 4:57:01 PM11/4/24
to chromium-mojo
Hi all, 

I am working on removing the AndroidDownloadFonts and FontUniqueNameLookup RuntimeEnabledFeature flag and start to notice that a set of Android tests are failing, that explicitly avoided certain Mojo IPC calls using flags that suppress them. When removing the flag this will no longer be possible. 

Font unique name lookup works by connecting to a Java Mojo IPC service and performing Java operations. For the multiprocess setup, the Java side is connected as receiver here:

Now, if I remove the AndroidDownloadableFonts feature, then 
blink::FontUniqueNameLookupAndroid::EnsureServiceConnected()
crashes, which is called from content::TestBlinkWebUnitTestSupport::TestBlinkWebUnitTestSupport.

As an attempt at fixing it, similar to how it's done for multiprocess in RenderProcessHost, in 
content/test/test_blink_web_unit_test_support.cc
I can get the JavaInterfaces()
service_manager::InterfaceProvider* java_interfaces =  content::GetGlobalJavaInterfaces();
and I have a BinderMap:
mojo::BinderMap binders;

Can I somehow connect the Java interface to this BinderMap? If not, how could I make the test environment aware of the Java side Mojo interface?

Thanks for your help,

Dominik
Reply all
Reply to author
Forward
0 new messages