Commit c2b55c36 authored by christian@webkit.org's avatar christian@webkit.org

2009-04-16 Christian Dywan <christian@twotoasts.de>

        Reviewed by Holger Freyther.

        http://bugs.webkit.org/show_bug.cgi?id=25042
        destroying webview widget directly causes crash.

        * tests/testwebframe.c:
        (test_webkit_web_frame_create_destroy): Add a test case for destroying
        a web view shortly after packing it in a window.

git-svn-id: svn://svn.chromium.org/blink/trunk@42591 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 7182117f
2009-04-16 Christian Dywan <christian@twotoasts.de>
Reviewed by Holger Freyther.
http://bugs.webkit.org/show_bug.cgi?id=25042
destroying webview widget directly causes crash.
* tests/testwebframe.c:
(test_webkit_web_frame_create_destroy): Add a test case for destroying
a web view shortly after packing it in a window.
2009-04-16 Xan Lopez <xlopez@igalia.com> 2009-04-16 Xan Lopez <xlopez@igalia.com>
Reviewed by Sam Weinig. Reviewed by Sam Weinig.
......
...@@ -30,14 +30,22 @@ ...@@ -30,14 +30,22 @@
static void test_webkit_web_frame_create_destroy(void) static void test_webkit_web_frame_create_destroy(void)
{ {
WebKitWebView* webView; WebKitWebView* webView;
g_test_bug("21837"); GtkWidget *window;
g_test_bug("21837");
webView = WEBKIT_WEB_VIEW(webkit_web_view_new()); webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
g_object_ref_sink(webView); g_object_ref_sink(webView);
g_assert_cmpint(G_OBJECT(webView)->ref_count, ==, 1); g_assert_cmpint(G_OBJECT(webView)->ref_count, ==, 1);
// This crashed with the original version // This crashed with the original version
g_object_unref(webView); g_object_unref(webView);
g_test_bug("25042");
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
gtk_container_add(GTK_CONTAINER(window), webView);
gtk_widget_show(window);
gtk_widget_show(webView);
gtk_widget_destroy(webView);
} }
static void test_webkit_web_frame_lifetime(void) static void test_webkit_web_frame_lifetime(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment