Bug 50128 - [Qt][WK2] webkit2 does not compile on OS X
Summary: [Qt][WK2] webkit2 does not compile on OS X
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.6
: P2 Normal
Assignee: Nobody
URL:
Keywords: Qt, QtTriaged
Depends on:
Blocks:
 
Reported: 2010-11-28 03:02 PST by Jan Erik Hanssen
Modified: 2010-12-15 04:34 PST (History)
3 users (show)

See Also:


Attachments
Patch (1.36 KB, patch)
2010-11-28 03:06 PST, Jan Erik Hanssen
no flags Details | Formatted Diff | Diff
Patch (3.80 KB, patch)
2010-12-06 16:14 PST, Jan Erik Hanssen
no flags Details | Formatted Diff | Diff
Patch (3.37 KB, patch)
2010-12-10 13:51 PST, Jan Erik Hanssen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Erik Hanssen 2010-11-28 03:02:54 PST
The Qt webkit2 port does not compile on OS X
Comment 1 Jan Erik Hanssen 2010-11-28 03:06:15 PST
Created attachment 74969 [details]
Patch

prctl(2) is Linux specific, it's not part of POSIX unfortunately
Comment 2 Kenneth Rohde Christiansen 2010-11-28 10:17:25 PST
Comment on attachment 74969 [details]
Patch

unfortunately the above code was introduced to fix something, that now needs special handling on mac. i will r+ but you need to take this up with the person who introduced the above code.
Comment 3 Jan Erik Hanssen 2010-12-06 16:14:27 PST
Created attachment 75747 [details]
Patch

New patch with a generic implementation for killing all child processes when the parent dies. This will not be invoked if the parent is killed with SIGKILL though.
Comment 4 WebKit Review Bot 2010-12-06 16:16:37 PST
Attachment 75747 [details] did not pass style-queue:

Failed to run "[u'git', u'reset', u'--hard', u'HEAD']" exit_code: 128
error: Could not write new index file.
fatal: Could not reset index file to revision 'HEAD'.


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Eric Seidel (no email) 2010-12-10 00:07:42 PST
Comment on attachment 75747 [details]
Patch

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

> WebKit2/UIProcess/Launcher/qt/ProcessLauncherQt.cpp:91
> +        : QProcess(parent), m_pid(0)

webkit normally puts each of these on its own line.
Comment 6 Balazs Kelemen 2010-12-10 04:37:33 PST
Comment on attachment 75747 [details]
Patch

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

> WebKit2/UIProcess/Launcher/qt/ProcessLauncherQt.cpp:75
> +#if defined Q_OS_UNIX
> +Q_GLOBAL_STATIC(QSet<Q_PID>, processes);

Maybe using a WTF::HashSet would be more WebKitish. Furthermore, WTF::HashSet is stored in FastMalloc memory and
I think the less we mixing the FastMalloc and the standard heap is the better.

> WebKit2/UIProcess/Launcher/qt/ProcessLauncherQt.cpp:84
> +static void cleanupProcesses()
> +{
> +    QSet<Q_PID>::ConstIterator it = processes()->begin();
> +    while (it != processes()->end()) {
> +        kill(*it, SIGINT);
> +        ++it;
> +    }
> +}

We can do it more platform independently by storing QProcess pointers and use QProcess::kill.

> WebKit2/UIProcess/Launcher/qt/ProcessLauncherQt.cpp:110
> +        processes()->remove(m_pid);
> +        m_pid = 0;

m_pid = 0 seems to be useless here.
Comment 7 Jan Erik Hanssen 2010-12-10 13:51:28 PST
Created attachment 76251 [details]
Patch
Comment 8 Eric Seidel (no email) 2010-12-13 00:28:14 PST
Comment on attachment 76251 [details]
Patch

Looks sane to me.
Comment 9 Andreas Kling 2010-12-15 00:39:08 PST
Comment on attachment 76251 [details]
Patch

Looks sane indeed, r=me
Comment 10 WebKit Commit Bot 2010-12-15 04:34:23 PST
Comment on attachment 76251 [details]
Patch

Clearing flags on attachment: 76251

Committed r74108: <http://trac.webkit.org/changeset/74108>
Comment 11 WebKit Commit Bot 2010-12-15 04:34:29 PST
All reviewed patches have been landed.  Closing bug.