[Webkit-unassigned] [Bug 32441] New: [GTK] Fails fast/parser/xhtml-close-while-parsing.xhtml

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Dec 11 11:07:19 PST 2009


https://bugs.webkit.org/show_bug.cgi?id=32441

           Summary: [GTK] Fails
                    fast/parser/xhtml-close-while-parsing.xhtml
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Keywords: Gtk
          Severity: Normal
          Priority: P2
         Component: WebKit Gtk
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: gns at gnome.org


This test fails because, javascript stops execution when we destroy the
WebView, here:

    window.close();
    if (window.layoutTestController)
        layoutTestController.notifyDone();

The notifyDone() call is never reached. If we delay the destruction of the
webView with g_idle_add the test passes (see diff bellow). The problem is that,
with that change, another test starts failing:
fast/dom/location-new-window-no-crash.html. It fails because the webView is not
destroyed when it checks for it:

testWindow.close();

if (window.layoutTestController) {
    function doneHandler()
    {
        if (testWindow.closed) {
            layoutTestController.notifyDone();
            return;
        }
        setTimeout(doneHandler, 0);
    }
    doneHandler();
}

We are either doing something wrong in our WebView destruction code, or this
setTimeout-based loop is not letting the mainloop run. No clue what to do, so
I'll skip the test that is failing right now.


diff --git a/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp
b/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp
index fd1e3c6..178e2af 100644
--- a/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp
+++ b/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp
@@ -694,13 +694,25 @@ static void webViewStatusBarTextChanged(WebKitWebView*
vie
w, const gchar* messag
     }
 }

-static gboolean webViewClose(WebKitWebView* view)
+static gboolean webViewCloseReal(gpointer data)
 {
-    ASSERT(view);
+    WebKitWebView* view = static_cast<WebKitWebView*>(data);

     webViewList = g_slist_remove(webViewList, view);
     g_object_unref(view);

+    return FALSE;
+}
+
+static gboolean webViewClose(WebKitWebView* view)
+{
+    ASSERT(view);
+
+    // If we destroy the view here, the rest of the test's script has
+    // no chance to run, which may cause notifyDone() to not be
+    // called, so schedule its destruction.
+    g_idle_add(webViewCloseReal, view);
+
     return TRUE;
 }

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list