Bug 54309 - Add a SyncMessageState class to CoreIPC::Connection
Summary: Add a SyncMessageState class to CoreIPC::Connection
Status: RESOLVED FIXED
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
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-11 13:53 PST by Anders Carlsson
Modified: 2011-02-11 14:36 PST (History)
1 user (show)

See Also:


Attachments
Patch (3.91 KB, patch)
2011-02-11 13:56 PST, 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-02-11 13:53:01 PST
Add a SyncMessageState class to CoreIPC::Connection
Comment 1 Anders Carlsson 2011-02-11 13:56:00 PST
Created attachment 82168 [details]
Patch
Comment 2 Adam Roben (:aroben) 2011-02-11 13:59:30 PST
Comment on attachment 82168 [details]
Patch

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

> Source/WebKit2/Platform/CoreIPC/Connection.cpp:59
> +    RunLoop* m_runLoop;
> +
> +    typedef HashMap<RunLoop*, SyncMessageState*> SyncMessageStateMap;
> +    static SyncMessageStateMap& syncMessageStateMap()
> +    {
> +        DEFINE_STATIC_LOCAL(SyncMessageStateMap, syncMessageStateMap, ());
> +        return syncMessageStateMap;
> +    }
> +
> +    static Mutex& syncMessageStateMapMutex()
> +    {
> +        DEFINE_STATIC_LOCAL(Mutex, syncMessageStateMapMutex, ());
> +        return syncMessageStateMapMutex;
> +    }

I personally don't like function members to follow data members.

> Source/WebKit2/Platform/CoreIPC/Connection.h:263
> +    class SyncMessageState;
> +    friend class SyncMessageState;

I didn't think the first declaration was necessary. But maybe it is so that the compiler knows it's a nested class?
Comment 3 Anders Carlsson 2011-02-11 14:03:19 PST
Committed r78368: <http://trac.webkit.org/changeset/78368>
Comment 4 Build Bot 2011-02-11 14:36:40 PST
Attachment 82168 [details] did not build on win:
Build output: http://queues.webkit.org/results/7870775