Hi team,
I'm following up on an issue I found when the browser process makes a Mojo connection to a service in the renderer process. The behavior is surprising to me, but possibly working as intended.
The TLDR is:
2. Before the pipe is bound, the page gets reloaded, which creates a new LocalDOMWindow in the renderer.
3. The pending receiver from step 1 gets bound to a new implementation of the Mojo interface, which is a Supplement<LocalDOMWindow>.
The result is that an object associated with the old document on the browser side is connected to a service for the new document on the renderer side.
This only seems to happen for reloads and same-origin navigation. (It was easy to manually repro the bug with a same-origin navigation but the same test with a cross-origin navigation never triggered the bug.) 
I tried changing to use associated interfaces (so instead of GetRemoteInterfaces, call GetRemoteAssociatedInterfaces), but that didn't fix the bug.
My questions are:
1. Is there something that prevents this bug from happening on a cross-origin navigation? I wasn't able to convince myself by looking at the code. It seems pretty bad if we can have a Mojo pipe where the endpoints believe they're dealing with different origins.
Thanks!
Ben