diff options
author | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-05 09:34:52 +0000 |
---|---|---|
committer | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-05 09:34:52 +0000 |
commit | 51f919efe33c7a3c49beed6d5b21722c53a060b0 (patch) | |
tree | ce4995847a64e0b462fc81f58e05f3ef6ba83c22 | |
parent | e5dfab45dcc64c17f20dca8f92d623a14615cea0 (diff) | |
download | chromium_src-51f919efe33c7a3c49beed6d5b21722c53a060b0.zip chromium_src-51f919efe33c7a3c49beed6d5b21722c53a060b0.tar.gz chromium_src-51f919efe33c7a3c49beed6d5b21722c53a060b0.tar.bz2 |
[content shell] close the main window during the destructor
We can't invoke DiscardMainWindow() from the destructor since the destructor
is invoked from outside of the message loop, and DiscardMainWindow interacts
with the message loop.
BUG=111316
R=thakis@chromium.org
Review URL: https://codereview.chromium.org/12431002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@186144 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | content/shell/webkit_test_controller.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/content/shell/webkit_test_controller.cc b/content/shell/webkit_test_controller.cc index 7c2448d..d5cb423 100644 --- a/content/shell/webkit_test_controller.cc +++ b/content/shell/webkit_test_controller.cc @@ -177,6 +177,11 @@ WebKitTestController::WebKitTestController() WebKitTestController::~WebKitTestController() { DCHECK(CalledOnValidThread()); CHECK(instance_ == this); + // We can't invoke DiscardMainWindow() here as the destructor of + // WebKitTestController is invoked outside of the message loop, but + // DiscardMainWindow interacts with the message loop. + if (main_window_) + main_window_->Close(); instance_ = NULL; } |