Commit 79d8c296 authored by mdjones's avatar mdjones Committed by Commit bot

Don't remove DistillabilityService on RenderFrameHost switch

If the RenderFrameHost is swapped, it usually means the old host will
be destroyed. Manual cleanup of the mojo service should not be
necessary since the attached interfaces will be removed during
destruction.

BUG=624260

Review-Url: https://codereview.chromium.org/2185733002
Cr-Commit-Position: refs/heads/master@{#408244}
parent 688299af
......@@ -85,10 +85,6 @@ void DistillabilityDriver::RenderFrameHostChanged(
// or from a native page), the service needs to be attached to that host.
mojo_needs_setup_ = true;
SetupMojoService(new_host);
// Clean up the service on the old host if possible.
if (!old_host || !old_host->GetInterfaceRegistry()) return;
old_host->GetInterfaceRegistry()
->RemoveInterface<mojom::DistillabilityService>();
}
void DistillabilityDriver::DidStartProvisionalLoadForFrame(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment