Bug 126131

Summary: [GTK] Downloads are broken with the network process enabled
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, commit-queue, danw, gns, mrobinson, rakuco
Priority: P2 Keywords: Gtk
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 126258    
Bug Blocks: 108832, 126114    
Attachments:
Description Flags
Patch mrobinson: review+

Description Carlos Garcia Campos 2013-12-22 03:13:11 PST
All unit tests crash or timeout.

$ ../../Tools/Scripts/run-gtk-tests --verbose --no-xvfb Programs/WebKit2APITests/TestDownloads
TEST: Programs/WebKit2APITests/TestDownloads... (pid=2843)
  /webkit2/Downloads/local-file:                                       OK
  /webkit2/Downloads/local-file-error:                                 OK
  /webkit2/Downloads/remote-file:                                      OK
  /webkit2/Downloads/remote-file-error:                                OK
  /webkit2/Downloads/policy-decision-download:                         OK
  /webkit2/WebKitWebView/download-uri:                                 OK
PASS: Programs/WebKit2APITests/TestDownloads

$ WEBKIT_USE_NETWORK_PROCESS=1 ../../Tools/Scripts/run-gtk-tests --verbose --no-xvfb Programs/WebKit2APITests/TestDownloads
TEST: Programs/WebKit2APITests/TestDownloads... (pid=2926)
  /webkit2/Downloads/local-file:                                       FAIL
GTester: last random seed: R02S57a2eee4f1b241d7699b7ee2d77abf61
(pid=2930)
  /webkit2/Downloads/local-file-error:                                 FAIL
GTester: last random seed: R02S33e0866d248195d78c521eff0e438e79
(pid=2933)
  /webkit2/Downloads/remote-file:                                      FAIL
GTester: last random seed: R02S8f9b1ae1ed5aa43f290021a8f26b9d88
(pid=2936)
  /webkit2/Downloads/remote-file-error:                                FAIL
GTester: last random seed: R02S0c7a293ca9e38eb50b55799878cc2906
(pid=2939)
TEST: Programs/WebKit2APITests/TestDownloads: TIMEOUT
Comment 1 Carlos Garcia Campos 2013-12-27 01:22:16 PST
Patch in bug https://bugs.webkit.org/show_bug.cgi?id=126258 fixes all test cases except /webkit2/Downloads/policy-decision-download that still times out:

$ WEBKIT_USE_NETWORK_PROCESS=1 Programs/WebKit2APITests/TestDownloads -s /webkit2/Downloads/policy-decision-download
/webkit2/Downloads/local-file: OK
/webkit2/Downloads/local-file-error: OK
/webkit2/Downloads/remote-file: OK
/webkit2/Downloads/remote-file-error: OK
/webkit2/WebKitWebView/download-uri: OK
Comment 2 Carlos Garcia Campos 2013-12-27 03:12:01 PST
Created attachment 220056 [details]
Patch

$ WEBKIT_USE_NETWORK_PROCESS=1 Programs/WebKit2APITests/TestDownloads -p /webkit2/Downloads/policy-decision-download
/webkit2/Downloads/policy-decision-download: OK
Comment 3 Martin Robinson 2013-12-27 16:41:32 PST
Comment on attachment 220056 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=220056&action=review

> Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp:729
>      if (d->client()->usesAsyncCallbacks())
>          handle->client()->didReceiveResponseAsync(handle.get(), d->m_response);
> -    else
> +    else {
>          handle->client()->didReceiveResponse(handle.get(), d->m_response);
> +        continueAfterDidReceiveResponse(handle.get());
> +    }

Early return here maybe?
Comment 4 Carlos Garcia Campos 2013-12-28 00:32:57 PST
Committed r161109: <http://trac.webkit.org/changeset/161109>