diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-10 20:57:33 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-10 20:57:33 +0000 |
commit | a2d106884aff55bfc84579c28348ee160ef6e2f4 (patch) | |
tree | af29d72f0cf016206bc370ecbf2722b095ee4684 /chrome/test | |
parent | 90457b015a57f062d90498e10fbad57d3162f0a3 (diff) | |
download | chromium_src-a2d106884aff55bfc84579c28348ee160ef6e2f4.zip chromium_src-a2d106884aff55bfc84579c28348ee160ef6e2f4.tar.gz chromium_src-a2d106884aff55bfc84579c28348ee160ef6e2f4.tar.bz2 |
Hopefully fix flaky RenderViewTest
This is speculative because the flaky crash does not
reproduce locally.
It seems that some pending tasks were being added to
the message loop. If we were unlucky, they were being
executed after WebKit shutdown, which was leading
to a crash. This patch executes pending tasks before
shutting down WebKit.
TEST=Covered by unit_tests.
BUG=21508
Review URL: http://codereview.chromium.org/194072
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25915 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r-- | chrome/test/render_view_test.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/chrome/test/render_view_test.cc b/chrome/test/render_view_test.cc index 9cc0ecd..83081a6 100644 --- a/chrome/test/render_view_test.cc +++ b/chrome/test/render_view_test.cc @@ -110,10 +110,14 @@ void RenderViewTest::TearDown() { view_ = NULL; mock_process_.reset(); - WebKit::shutdown(); + // After resetting the view_ and mock_process_ we may get some new tasks + // which need to be processed before shutting down WebKit + // (http://crbug.com/21508). msg_loop_.RunAllPending(); + WebKit::shutdown(); + mock_keyboard_.reset(); platform_->PlatformUninitialize(); |