mojo: Fix Blink's shutdown sequence in AxProviderImplTest
commit23e04e72e8121a372fcbaf779fde9faae2bc772f
authorskyostil <skyostil@chromium.org>
Mon, 1 Jun 2015 18:16:45 +0000 (1 11:16 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 1 Jun 2015 18:18:17 +0000 (1 18:18 +0000)
treef4f3b53a2977222f3ef955214a002896ad4634b8
parentff2fa0ca2adff9a5546a072c6f180df07dcd5fe1
mojo: Fix Blink's shutdown sequence in AxProviderImplTest

This patch ensures the sequence used to tear down Blink in
AxProviderImplTest matches the real implementation in RenderThreadImpl.
Specifically, we need to shut down the scheduler before terminating
Blink, because otherwise the scheduler might keep pointers to tasks
that live on the Blink heap and access freed memory in its destructor.

We also add an assertion to the renderer scheduler that it is shut down
explicitly.

Note that Blink cannot shut down the scheduler internally because of
crbug.com/467369. We expect that this depedency can be cleaned up once
the message loop is better integrated with the scheduler
(crbug.com/465354) and when the Blink repository has been merged into
Chromium.

BUG=463143

Review URL: https://codereview.chromium.org/1145973011

Cr-Commit-Position: refs/heads/master@{#332221}
components/html_viewer/ax_provider_impl_unittest.cc
components/html_viewer/html_viewer.cc
components/html_viewer/setup.cc
components/scheduler/renderer/renderer_scheduler_impl.cc
components/scheduler/renderer/renderer_scheduler_impl.h