I am trying to postpone when we start queuing IPCs to a renderer. Current behavior: queueing starts when RenderProcessHostImpl is constructed. Desired behavior (I think): queueing starts when RenderProcessHostImpl::Init is called. The motivation here is https://crbug.com/813045
If queueing starts in RPHI::Init, then I need to decide what is the state of RPHI::GetRendererInterface (mojom::RendererPtr) prior to the RPHI::Init call. I think this state should be consistent with the state of RPHI::GetRendererInterface after a renderer process crashes. AFAICT, RPHI::ProcessDied doesn't reset RPHI::renderer_interface_ and so RPHI::GetRendererInterface keeps returning a non-null value but all IPCs are discarded.
I am currently trying to replicate this behavior (this behavior = non-null RPHI::GetRendererInterface that discards IPCs) into a freshly constructed RPHI, but I guess we can also discuss returning null from RPHI::GetRendererInterface in both cases (case1: freshly constructed RPHI; case2: RPHI wrapping a crashed/dead/gone process). The main reason I went with a non-null/discarding approach is that 1) quite a few cases are happy with discarding an IPC and 2) I haven't yet encountered a case where the IPC should be queued (and the code path is broken because it doesn't guarantee that RPHI::Init will be called).
Note that similar decision/discussion also applies to RenderFrameHostImpl::GetRemoteInterfaces().
How do I bind an associated interface ptr to a pipe connected to /dev/null?
This is what I have for regular interface ptrs:
template <typename T>void BindInterfaceToClosedPipe(T* interface_ptr) {typename T::PtrInfoType info(mojo::ScopedMessagePipeHandle(), 0u);interface_ptr->Bind(std::move(info));}
This is what I tried for associated interface ptrs:
This fails with:template <typename T>void BindAssociatedInterfaceToClosedPipe(T* associated_interface_ptr) {mojo::ScopedInterfaceEndpointHandle h1, h2;mojo::ScopedInterfaceEndpointHandle::CreatePairPendingAssociation(&h1, &h2);typename T::PtrInfoType info(std::move(h2), 0u);associated_interface_ptr->Bind(std::move(info));}
[196374:196374:0604/112350.225723:FATAL:interface_endpoint_client.cc(227)] Check failed: !handle_.pending_association().#0 0x7f7ef461f61c base::debug::StackTrace::StackTrace()#1 0x7f7ef45696db logging::LogMessage::~LogMessage()#2 0x7f7ef4f75f38 mojo::InterfaceEndpointClient::Accept()#3 0x7f7ef1f597ed content::mojom::RendererProxy::SetIsLockedToSite()
...
#5 0x7f7ef278e5b5 content::SiteInstanceImpl::LockToOriginIfNeeded()
...
--
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/e073873c-2c54-494f-b563-02e5e76b4e0e%40chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-mojo/CALQVofpeN%2B%3DD2f4gYOmgaMJ5h9-FE040P51JqgbGNKAd4MSKYQ%40mail.gmail.com.
What Lucas said is really the only option, though I find it pretty disagreeable that we'd ever use that API in non-testing code. Someone recently tripped over this unnecessary use of it, for example, and I imagine a lot of time was wasted trying to figure out what was going on.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-mojo+unsubscribe@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/e073873c-2c54-494f-b563-02e5e76b4e0e%40chromium.org.
--
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-mojo+unsubscribe@chromium.org.
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/e073873c-2c54-494f-b563-02e5e76b4e0e%40chromium.org.
--
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 view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-mojo/CALQVofpeN%2B%3DD2f4gYOmgaMJ5h9-FE040P51JqgbGNKAd4MSKYQ%40mail.gmail.com.
--
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/CAA_NCUGUqjQkAMopay5a4TExVHef_Z2X7bOARj%3DvX16GV6OKOA%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-mojo+unsubscribe@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/e073873c-2c54-494f-b563-02e5e76b4e0e%40chromium.org.
--
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-mojo+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-mojo/CALQVofpeN%2B%3DD2f4gYOmgaMJ5h9-FE040P51JqgbGNKAd4MSKYQ%40mail.gmail.com.
--
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-mojo+unsubscribe@chromium.org.