I'm trying to connect the browser and renderer processes using Mojo. I want the renderer process to call the function on the browser process. I imitated some of the existing Chromium code that uses Mojo but it's not working. The Mojo interface function is not being called when the caller in the remote process is attempting to call it.--Here is the patch: https://codereview.chromium.org/1566603003Explanation of files:- leak_detector_monitor.mojom: The LeakDetectorMonitor interface that exposes a single function, StoreLeakReport().- leak_detector_monitor_impl.(cc|h): Implements the LeakDetectorMonitor interface. StoreLeakReport() doesn't actually do anything. It just logs a message. Exposes a Create() function.- leak_detector_monitor_client.(cc|h): Singleton class that connects to LeakDetectorMonitorImpl using the ServiceRegistry and calls StoreLeakReport().- chrome/browser/chrome_content_browser_client.cc: Add LeakDetectorMonitorImpl::Create() to the service registry.- chrome/renderer/chrome_render_process_observer.cc: Initialize LeakDetectorMonitorClient.The log is shown below (Chrome on Chrome OS). The new interface is registered with the service registry in chrome_content_browser_client.cc and leak_detector_monitor_client.cc connects to it successfully. However, there is no logging from either the Create() function or the StoreLeakReport() function in leak_detector_monitor_impl.cc.What am I doing wrong?Simon========================================================================[3662:3662:0105/180101:ERROR:chrome_content_browser_client.cc(2648)] Adding LeakDetectorMonitorImpl service[3662:3662:0105/180101:ERROR:chrome_content_browser_client.cc(2648)] Adding LeakDetectorMonitorImpl service[3920:3920:0105/180101:ERROR:leak_detector_monitor_client.cc(44)] Connecting to remote service[3920:3920:0105/180101:ERROR:leak_detector_monitor_client.cc(46)] result: 1[3920:3920:0105/180101:ERROR:leak_detector_monitor_client.cc(56)] LeakDetectorMonitorClient::OnLeakFound[3920:3920:0105/180101:ERROR:leak_detector_monitor_client.cc(58)] Done[3662:3662:0105/180101:ERROR:chrome_content_browser_client.cc(2648)] Adding LeakDetectorMonitorImpl service[4110:4110:0105/180101:ERROR:chrome_content_browser_client.cc(2648)] Adding LeakDetectorMonitorImpl service[4110:4110:0105/180101:ERROR:chrome_content_browser_client.cc(2648)] Adding LeakDetectorMonitorImpl service[4345:4345:0105/180101:ERROR:leak_detector_monitor_client.cc(44)] Connecting to remote service[4345:4345:0105/180101:ERROR:leak_detector_monitor_client.cc(46)] result: 1[4345:4345:0105/180101:ERROR:leak_detector_monitor_client.cc(56)] LeakDetectorMonitorClient::OnLeakFound[4345:4345:0105/180101:ERROR:leak_detector_monitor_client.cc(58)] Done[4110:4110:0105/180101:ERROR:chrome_content_browser_client.cc(2648)] Adding LeakDetectorMonitorImpl service[4548:4548:0105/180101:ERROR:chrome_content_browser_client.cc(2648)] Adding LeakDetectorMonitorImpl service[4548:4548:0105/180101:ERROR:chrome_content_browser_client.cc(2648)] Adding LeakDetectorMonitorImpl service[4810:4810:0105/180101:ERROR:leak_detector_monitor_client.cc(44)] Connecting to remote service[4810:4810:0105/180101:ERROR:leak_detector_monitor_client.cc(46)] result: 1[4810:4810:0105/180101:ERROR:leak_detector_monitor_client.cc(56)] LeakDetectorMonitorClient::OnLeakFound[4548:4548:0105/180102:ERROR:chrome_content_browser_client.cc(2648)] Adding LeakDetectorMonitorImpl service[5034:5034:0105/180102:ERROR:chrome_content_browser_client.cc(2648)] Adding LeakDetectorMonitorImpl service[5034:5034:0105/180102:ERROR:chrome_content_browser_client.cc(2648)] Adding LeakDetectorMonitorImpl service[5292:5292:0105/180102:ERROR:leak_detector_monitor_client.cc(44)] Connecting to remote service[5292:5292:0105/180102:ERROR:leak_detector_monitor_client.cc(46)] result: 1[5292:5292:0105/180102:ERROR:leak_detector_monitor_client.cc(56)] LeakDetectorMonitorClient::OnLeakFound[5292:5292:0105/180102:ERROR:leak_detector_monitor_client.cc(58)] Done[5034:5034:0105/180102:ERROR:chrome_content_browser_client.cc(2648)] Adding LeakDetectorMonitorImpl service
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
--
You received this message because you are subscribed to the Google Groups "chromium-mojo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-moj...@chromium.org.
To post to this group, send email to chromi...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-mojo/CACuR13cCx94T9FiOQZMMvwJtNWvcWsXmayGzVaRU-yvyKp2RFQ%40mail.gmail.com.
Perhaps the problem is that the renderer process is attempting to call the remote function immediately after connecting, without letting the remote process call Create() first. If that's the case, then how can we guarantee that a call to the remote function occurs after Create()?