Reland: Add a sanity check that process picked for a SiteInstance is a suitable host.

This would've caught incorrect process reuse in issue 780661 earlier,
as the isolated origin subframe wouldn't have been allowed to committed
into a process already marked as used by another site.

This is a reland of
The original CL was reverted because this CHECK was failing in a
test where unmatched ServiceWorker process reuse allowed reusing an
unsuitable process.  This CL now fixes this case in

Bug: 780661, 780089, 782349
Change-Id: I5bded5918adda85ff256d3d66d2a641095fd6c9a
Reviewed-by: Charlie Reis <>
Commit-Queue: Alex Moshchuk <>
Cr-Commit-Position: refs/heads/master@{#516585}
2 files changed