Bug 59954 - Need a way to handle CoreIPC messages on the connection work queue
Summary: Need a way to handle CoreIPC messages on the connection work queue
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Anders Carlsson
Depends on:
Reported: 2011-05-02 12:27 PDT by Anders Carlsson
Modified: 2011-05-02 12:41 PDT (History)
0 users

See Also:

Patch (4.18 KB, patch)
2011-05-02 12:29 PDT, Anders Carlsson
aroben: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anders Carlsson 2011-05-02 12:27:15 PDT
Need a way to handle CoreIPC messages on the connection work queue
Comment 1 Anders Carlsson 2011-05-02 12:29:41 PDT
Created attachment 91957 [details]
Comment 2 Adam Roben (:aroben) 2011-05-02 12:34:27 PDT
Comment on attachment 91957 [details]

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

> Source/WebKit2/ChangeLog:10
> +        member function, willProcessMessageOnClientRunLoop which should return true if the message
> +        was processed and false otherwise. Users of Connection can use addQueueClient to add clients

I'd say "should return true if the message should be forwarded to the Connection::Client's run loop for processing and false otherwise". (Note that this reverses the meaning of the return value.) That seems slightly closer in spirit to Cocoa delegate methods that start with "will".

> Source/WebKit2/Platform/CoreIPC/Connection.cpp:242
> +void Connection::addQueueClient(QueueClient* queueClient)
> +{
> +    MutexLocker locker(m_connectionQueueClientsMutex);
> +    m_connectionQueueClients.append(queueClient);
> +}

Should we assert that the client isn't already in m_connectionQueueClients?

> Source/WebKit2/Platform/CoreIPC/Connection.h:108
> +    protected:
> +        virtual ~QueueClient() { }
> +
> +    public:
> +        virtual bool willProcessMessageOnClientRunLoop(Connection*, MessageID, ArgumentDecoder*) = 0;

Maybe reverse these sections?
Comment 3 Anders Carlsson 2011-05-02 12:41:32 PDT
Committed r85503: <http://trac.webkit.org/changeset/85503>