diff options
author | simonjam@chromium.org <simonjam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-19 22:30:58 +0000 |
---|---|---|
committer | simonjam@chromium.org <simonjam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-19 22:30:58 +0000 |
commit | 81ede7d907f3564ecf2faf70d72b0b3068e3c467 (patch) | |
tree | dec996cf4e9c77e36b0a8371b874dada962645ab /content/shell/webkit_test_controller.cc | |
parent | ffa46b90f0806e80a591c2b76cc43e366311a37b (diff) | |
download | chromium_src-81ede7d907f3564ecf2faf70d72b0b3068e3c467.zip chromium_src-81ede7d907f3564ecf2faf70d72b0b3068e3c467.tar.gz chromium_src-81ede7d907f3564ecf2faf70d72b0b3068e3c467.tar.bz2 |
Close the main window in WebKitTestController::DiscardMainWindow().
This fixes the crash when running DRT tests with content_shell. We need to make
sure all of the RenderViewHosts are deleted before shutting down the IO thread.
BUG=None
Review URL: https://codereview.chromium.org/12600031
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@189136 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/shell/webkit_test_controller.cc')
-rw-r--r-- | content/shell/webkit_test_controller.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/content/shell/webkit_test_controller.cc b/content/shell/webkit_test_controller.cc index 3b3680f..1c7202c 100644 --- a/content/shell/webkit_test_controller.cc +++ b/content/shell/webkit_test_controller.cc @@ -413,12 +413,14 @@ void WebKitTestController::DiscardMainWindow() { // loop. Otherwise, we're already outside of the message loop, and we just // discard the main window. WebContentsObserver::Observe(NULL); - main_window_ = NULL; - current_pid_ = base::kNullProcessId; if (is_running_test_) { Shell::CloseAllWindows(); MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure()); + } else if (main_window_) { + main_window_->Close(); } + main_window_ = NULL; + current_pid_ = base::kNullProcessId; } void WebKitTestController::SendTestConfiguration() { |