[Webkit-unassigned] [Bug 21837] critical error in Gtk FrameLoaderClient::frameLoaderDestroyed()
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Dec 3 03:45:28 PST 2008
https://bugs.webkit.org/show_bug.cgi?id=21837
------- Comment #10 from jmalonzo at gmail.com 2008-12-03 03:45 PDT -------
(From update of attachment 25494)
> +static void test_webkit_web_frame_lifetime(void)
> +{
> + WebKitWebView* webView;
> + WebKitWebFrame* webFrame;
> + g_test_bug("21837");
> +
> + webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
> + g_object_ref_sink(webView);
> + g_assert_cmpint(G_OBJECT(webView)->ref_count, ==, 1);
> + webFrame = webkit_web_view_get_main_frame(webView);
> + g_assert_cmpint(G_OBJECT(webFrame)->ref_count, ==, 1);
> +
> + // Add dummy reference on the WebKitWebFrame to keep it alive
> + g_object_ref(webFrame);
> + g_assert_cmpint(G_OBJECT(webFrame)->ref_count, ==, 2);
> +
> + // This crashed with the original version
> + g_object_unref(webView);
> +
> + // Make sure that the frame got deleted as well. We did this
> + // by adding an extra ref on the WebKitWebFrame and we should
> + // be the one holding the last reference.
> + g_assert_cmpint(G_OBJECT(webFrame)->ref_count, ==, 1);
> + g_object_unref(webFrame);
> +}
Do we really want to support having a webView (and Page) destroyed without
destroying the mainFrame first?
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list