Bug 95861

Summary: [Chromium] Define new setSharedWorkerRepository function in preparation for removing WebKitPlatformSupport::sharedWorkerRepository()
Product: WebKit Reporter: Mark Pilgrim (Google) <pilgrim>
Component: WebKit Misc.Assignee: Mark Pilgrim (Google) <pilgrim>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, dglazkov, fishd, haraken, jamesr, tkent+wkapi, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 82948, 85768    
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Mark Pilgrim (Google) 2012-09-05 09:24:56 PDT
[Chromium] Define new setSharedWorkerRepository function in preparation for removing WebKitPlatformSupport::sharedWorkerRepository()
Comment 1 Mark Pilgrim (Google) 2012-09-05 09:26:06 PDT
Created attachment 162265 [details]
Patch
Comment 2 Mark Pilgrim (Google) 2012-09-05 09:26:25 PDT
*** Bug 94481 has been marked as a duplicate of this bug. ***
Comment 3 Adam Barth 2012-09-05 10:33:53 PDT
Comment on attachment 162265 [details]
Patch

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

> Source/WebKit/chromium/src/SharedWorkerRepository.cpp:71
> +static void setSharedWorkerRepository(WebKit::WebSharedWorkerRepository* repository)

I'm not sure how Chromium patch will call this function given that it's not exposed in any headers.

> Source/WebKit/chromium/src/SharedWorkerRepository.cpp:276
> +    repository = s_sharedWorkerRepository;
> +    if (!repository)
> +        repository = WebKit::webKitPlatformSupport()->sharedWorkerRepository();

I would have made this into a static helper function because you've repeated it several times.
Comment 4 Mark Pilgrim (Google) 2012-09-06 08:02:26 PDT
Created attachment 162507 [details]
Patch
Comment 5 Mark Pilgrim (Google) 2012-09-06 08:03:12 PDT
Nits addressed, WebKit.h export added.
Comment 6 WebKit Review Bot 2012-09-06 08:03:35 PDT
Please wait for approval from abarth@webkit.org, dglazkov@chromium.org, fishd@chromium.org, jamesr@chromium.org or tkent@chromium.org before submitting, as this patch contains changes to the Chromium public API. See also https://trac.webkit.org/wiki/ChromiumWebKitAPI.
Comment 7 Adam Barth 2012-09-06 10:44:17 PDT
Comment on attachment 162507 [details]
Patch

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

> Source/WebKit/chromium/public/WebKit.h:34
> +#include "WebSharedWorkerRepository.h"

You don't need this #include.  You can just forward declare WebSharedWorkerRepository

> Source/WebKit/chromium/src/SharedWorkerRepository.cpp:65
> +void setSharedWorkerRepository(WebSharedWorkerRepository* repository)

Maybe we should put this function in WebSharedWorkerRepository.h rather than WebKit.h?
Comment 8 Mark Pilgrim (Google) 2012-09-10 10:39:43 PDT
Created attachment 163162 [details]
Patch
Comment 9 Mark Pilgrim (Google) 2012-09-10 10:44:12 PDT
Comment on attachment 163162 [details]
Patch

Nits addressed, moved everything out of Webkit.h and into more appropriate header files.
Comment 10 Adam Barth 2012-09-10 10:47:59 PDT
Thanks!
Comment 11 WebKit Review Bot 2012-09-10 12:07:25 PDT
Comment on attachment 163162 [details]
Patch

Clearing flags on attachment: 163162

Committed r128087: <http://trac.webkit.org/changeset/128087>
Comment 12 WebKit Review Bot 2012-09-10 12:07:29 PDT
All reviewed patches have been landed.  Closing bug.