Revert of [ServiceManager] Avoid ServiceManager using destroyed Instances (patchset #3 id:40001 of https://codereview.chromium.org/2458193002/ )
Reason for revert:
Suspect causing failure here:
https://build.chromium.org/p/chromium.mac/builders/ios-simulator/builds/6991
Original issue's description:
> [ServiceManager] Avoid ServiceManager using destroyed Instances
>
> Currently, ServiceManager can use a destroyed Instance to service an
> incoming connection request. This occurs as follows:
>
> - Service A connects to Service B, creating an Instance for Service B
> that is a child of (and owned by) the Instance for Service A
> - Service A experiences an error and calls
> ServiceManager::OnInstanceError()
> - ServiceManager removes the Instance for Service A from its
> identity_to_instance_ map and has that Instance destroyed
> - When that Instance is destroyed, it also destroys the Instance for
> Service B
> - In the Instance destructor, the Instance for Service B calls
> ServiceManager::OnInstanceStopped(). However, that method does *not*
> remove that Instance from its identity_to_instance_ map.
> - A new connection request comes in for Service B, which the
> ServiceManager uses the now-destroyed Instance for Service B to
> service.
>
> This CL addresses this issue by having Instance call
> ServiceManager::OnInstanceUnreachable() in its destructor.
>
> Committed: https://crrev.com/c63f6de0cbef73cc6f0238219af33b7e4098374e
> Cr-Commit-Position: refs/heads/master@{#428715}
[email protected],[email protected]
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review-Url: https://codereview.chromium.org/2463093002
Cr-Commit-Position: refs/heads/master@{#428733}
1 file changed