Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(143)

Unified Diff: webkit/tools/test_shell/test_shell_gtk.cc

Issue 13214: Handle destruction of test shell properly. (Closed)
Patch Set: Created 12 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/tools/test_shell/test_shell.cc ('k') | webkit/tools/test_shell/webwidget_host_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/test_shell_gtk.cc
diff --git a/webkit/tools/test_shell/test_shell_gtk.cc b/webkit/tools/test_shell/test_shell_gtk.cc
index fa093465348ef7c111a05a7a208356517639756a..35b4e690089840fa864d55d11851fe14019b9b34 100644
--- a/webkit/tools/test_shell/test_shell_gtk.cc
+++ b/webkit/tools/test_shell/test_shell_gtk.cc
@@ -135,13 +135,17 @@ bool TestShell::CreateNewWindow(const std::wstring& startingURL,
}
void TestShell::PlatformCleanUp() {
+ // The GTK widgets will be destroyed, which will free the associated
+ // objects. So we don't need the scoped_ptr to free the webViewHost.
+ m_webViewHost.release();
}
// GTK callbacks ------------------------------------------------------
namespace {
// Callback for when the main window is destroyed.
-void MainWindowDestroyed(GtkWindow* window, TestShell* shell) {
+gboolean MainWindowDestroyed(GtkWindow* window, TestShell* shell) {
+
TestShell::RemoveWindowFromList(GTK_WIDGET(window));
if (TestShell::windowList()->empty() || shell->is_modal()) {
@@ -150,6 +154,8 @@ void MainWindowDestroyed(GtkWindow* window, TestShell* shell) {
}
delete shell;
+
+ return FALSE; // Don't stop this message.
}
// Callback for when you click the back button.
« no previous file with comments | « webkit/tools/test_shell/test_shell.cc ('k') | webkit/tools/test_shell/webwidget_host_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698