Bug 139987

Summary: Move Pasteboard code out of WebProcessPool and into its own singleton class
Product: WebKit Reporter: Sam Weinig <sam>
Component: New BugsAssignee: Sam Weinig <sam>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, mkwst
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch andersca: review+

Description Sam Weinig 2014-12-29 09:34:12 PST
Move Pasteboard code out of WebProcessPool and into its own singleton class
Comment 1 Sam Weinig 2014-12-29 09:37:00 PST
Created attachment 243797 [details]
Patch
Comment 2 Anders Carlsson 2014-12-29 09:47:38 PST
Comment on attachment 243797 [details]
Patch

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

> Source/WebKit2/Shared/WebPasteboardProxy.cpp:40
> +    static WebPasteboardProxy* proxy;
> +    static dispatch_once_t once;
> +    dispatch_once(&once, ^{
> +        proxy = new WebPasteboardProxy;
> +    });

You can use LazyNeverDestroyed here.

> Source/WebKit2/Shared/WebPasteboardProxy.messages.in:57
> +#if !PLATFORM(COCOA)
> +    // FIXME: This a dummy message, to avoid breaking the build for platforms that don't require
> +    // any synchronous messages, and should be removed when <rdar://problem/8775115> is fixed.
> +    Dummy() -> (bool dummyReturn)
> +#endif

I don't think this is needed.

> Source/WebKit2/UIProcess/WebProcessPool.cpp:-1169
> -    if (decoder.messageReceiverName() == Messages::WebProcessPool::messageReceiverName()) {
> -        didReceiveSyncWebProcessPoolMessage(connection, decoder, replyEncoder);
> -        return;
> -    }

I think we stil need this for now since I moved the message handling code to WebProcessPool.
Comment 3 Sam Weinig 2014-12-29 10:19:57 PST
Created attachment 243799 [details]
Patch
Comment 4 Sam Weinig 2014-12-29 10:23:45 PST
Committed r177794: <http://trac.webkit.org/changeset/177794>