Bug 95861 - [Chromium] Define new setSharedWorkerRepository function in preparation for removing WebKitPlatformSupport::sharedWorkerRepository()
Summary: [Chromium] Define new setSharedWorkerRepository function in preparation for r...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Pilgrim (Google)
URL:
Keywords:
: 94481 (view as bug list)
Depends on:
Blocks: 82948 85768
  Show dependency treegraph
 
Reported: 2012-09-05 09:24 PDT by Mark Pilgrim (Google)
Modified: 2012-12-11 12:50 PST (History)
7 users (show)

See Also:


Attachments
Patch (5.30 KB, patch)
2012-09-05 09:26 PDT, Mark Pilgrim (Google)
no flags Details | Formatted Diff | Diff
Patch (5.66 KB, patch)
2012-09-06 08:02 PDT, Mark Pilgrim (Google)
no flags Details | Formatted Diff | Diff
Patch (5.39 KB, patch)
2012-09-10 10:39 PDT, Mark Pilgrim (Google)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.