Bug 192352 - Remove using namespace WebCore and WebKit under WebKit/Shared/API
Summary: Remove using namespace WebCore and WebKit under WebKit/Shared/API
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Fujii Hironori
URL:
Keywords: InRadar
Depends on:
Blocks: 192449
  Show dependency treegraph
 
Reported: 2018-12-03 21:46 PST by Fujii Hironori
Modified: 2018-12-05 20:09 PST (History)
4 users (show)

See Also:


Attachments
Patch (53.34 KB, patch)
2018-12-03 21:52 PST, Fujii Hironori
no flags Details | Formatted Diff | Diff
Patch (59.47 KB, patch)
2018-12-03 21:59 PST, Fujii Hironori
no flags Details | Formatted Diff | Diff
Patch (59.46 KB, patch)
2018-12-03 22:14 PST, Fujii Hironori
no flags Details | Formatted Diff | Diff
Patch (59.39 KB, patch)
2018-12-03 22:40 PST, Fujii Hironori
no flags Details | Formatted Diff | Diff
Patch (59.41 KB, patch)
2018-12-03 23:27 PST, Fujii Hironori
no flags Details | Formatted Diff | Diff
Patch (58.22 KB, patch)
2018-12-04 18:17 PST, Fujii Hironori
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fujii Hironori 2018-12-03 21:46:59 PST
Remove using namespace WebCore and WebKit under WebKit/Shared/API

Bug 191995 – Remove "using namespace WebCore" under Source/WebKit/WebProcess/InjectedBundle/API
Bug 192301 – Remove "using namespace WebKit" under Source/WebKit/WebProcess/InjectedBundle/API
Comment 1 Fujii Hironori 2018-12-03 21:52:22 PST
Created attachment 356464 [details]
Patch
Comment 2 Fujii Hironori 2018-12-03 21:59:59 PST
Created attachment 356465 [details]
Patch
Comment 3 Fujii Hironori 2018-12-03 22:14:34 PST
Created attachment 356467 [details]
Patch
Comment 4 Fujii Hironori 2018-12-03 22:40:21 PST
Created attachment 356472 [details]
Patch
Comment 5 Fujii Hironori 2018-12-03 23:27:11 PST
Created attachment 356473 [details]
Patch
Comment 6 Alex Christensen 2018-12-04 08:21:55 PST
Comment on attachment 356473 [details]
Patch

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

> Source/WebKit/Shared/API/APIURLRequest.cpp:34
> -using namespace WebCore;
> -using namespace WebKit;
> -
>  namespace API {
>  
> -URLRequest::URLRequest(const ResourceRequest& request)
> +URLRequest::URLRequest(const WebCore::ResourceRequest& request)

If you just move the "using namespace X;" to after the "namespace Y {" then the "using" has that scope, doesn't mess with unified builds, and requires less invasive changes to the existing code.
Comment 7 Fujii Hironori 2018-12-04 17:34:31 PST
Comment on attachment 356473 [details]
Patch

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

>> Source/WebKit/Shared/API/APIURLRequest.cpp:34
>> +URLRequest::URLRequest(const WebCore::ResourceRequest& request)
> 
> If you just move the "using namespace X;" to after the "namespace Y {" then the "using" has that scope, doesn't mess with unified builds, and requires less invasive changes to the existing code.

Oh, that's right. Thank you very much for catching.
Comment 8 Fujii Hironori 2018-12-04 18:17:33 PST
Created attachment 356566 [details]
Patch
Comment 9 Fujii Hironori 2018-12-04 22:53:17 PST
Comment on attachment 356566 [details]
Patch

Clearing flags on attachment: 356566

Committed r238887: <https://trac.webkit.org/changeset/238887>
Comment 10 Fujii Hironori 2018-12-04 22:53:20 PST
All reviewed patches have been landed.  Closing bug.
Comment 11 Radar WebKit Bug Importer 2018-12-04 22:54:34 PST
<rdar://problem/46478178>