Bug 22648 - Fix threading on Qt-port for Sampling tool
Summary: Fix threading on Qt-port for Sampling tool
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-04 08:12 PST by Gabor Loki
Modified: 2008-12-11 03:19 PST (History)
0 users

See Also:


Attachments
fix waitForThreadCompletion for sampling tool (2.15 KB, patch)
2008-12-04 08:16 PST, Gabor Loki
darin: review-
Details | Formatted Diff | Diff
fix waitForThreadCompletion for sampling tool (v2) (2.18 KB, patch)
2008-12-05 02:06 PST, Gabor Loki
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Loki 2008-12-04 08:12:54 PST
The Sampling tool fails on Qt-port. The problem is in the implementation of 'waitForThreadCompletion' function (wtf/ThreadingQt.cpp).

I am going to attach a patch which could fix this problem on Qt-port.
Comment 1 Gabor Loki 2008-12-04 08:16:39 PST
Created attachment 25739 [details]
fix waitForThreadCompletion for sampling tool

This patch fixes the threading for sampling tool on Qt-port.

I've did the same for Gtk, but I didn't test it.
Comment 2 Darin Adler 2008-12-04 09:13:11 PST
Comment on attachment 25739 [details]
fix waitForThreadCompletion for sampling tool

> +    if (result)
> +        *result = g_thread_join(thread);

I believe this is wrong. Even if we don't want to store the result, we do want to call g_thread_join so we wait for the thread to complete.
Comment 3 Gabor Loki 2008-12-05 02:06:14 PST
Created attachment 25767 [details]
fix waitForThreadCompletion for sampling tool (v2)

You are right. I missed that one.

Here is the proposed patch.
Comment 4 Darin Adler 2008-12-05 05:53:18 PST
Comment on attachment 25767 [details]
fix waitForThreadCompletion for sampling tool (v2)

r=me
Comment 5 Holger Freyther 2008-12-11 03:19:40 PST
Landed in r39204.