Bug 177107

Summary: [WPE][GTK] Crash in webkit_web_resource_get_data_finish()
Product: WebKit Reporter: Michael Catanzaro <mcatanzaro>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Severity: Normal CC: berto, bugs-noreply, buildbot, cgarcia, gustavo, mcatanzaro, sfanxiang
Priority: P2    
Version: Other   
Hardware: PC   
OS: Linux   
See Also: https://bugs.webkit.org/show_bug.cgi?id=186276
Description Flags
Patch mcatanzaro: review+

Description Michael Catanzaro 2017-09-18 16:06:29 PDT
Created attachment 321146 [details]

I don't know how to reproduce this crash, but it occurred for me once today when I had broken WebKit so badly that resource loads never finished, started loading something, and used Ctrl+C. Backtrace attached. The problem is that resourceDataCallback always returns a success result with g_task_return_boolean(), but that's wrong if the callback was canceled. It should probably check if wkData is nullptr and use g_task_return_error() in that case.
Comment 1 Carlos Garcia Campos 2017-10-02 12:38:11 PDT
Created attachment 322411 [details]
Comment 2 Build Bot 2017-10-02 12:40:21 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment 3 Michael Catanzaro 2017-10-02 12:45:10 PDT
Comment on attachment 322411 [details]

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

Nice test

> Source/WebKit/ChangeLog:25
> +2017-10-02  Carlos Garcia Campos  <cgarcia@igalia.com>
> +
> +        [GTK][WPE] WebProcess should run cleanup on quit to release resources
> +        https://bugs.webkit.org/show_bug.cgi?id=168126
> +
> +        Reviewed by NOBODY (OOPS!).
> +
> +        Do not call exit on sync message send failure for GTK and WPE ports.
> +
> +        * WebProcess/WebProcess.cpp:
> +        (WebKit::WebProcess::initializeConnection):
> +

Fix the changelog
Comment 4 Carlos Garcia Campos 2017-10-02 12:48:47 PDT
Committed r222735: <http://trac.webkit.org/changeset/222735>
Comment 5 Carlos Garcia Campos 2017-10-04 03:44:42 PDT
*** Bug 175870 has been marked as a duplicate of this bug. ***