Bug 192352

Summary: Remove using namespace WebCore and WebKit under WebKit/Shared/API
Product: WebKit Reporter: Fujii Hironori <Hironori.Fujii>
Component: WebKit2Assignee: Fujii Hironori <Hironori.Fujii>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, darin, keith_miller, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 192449    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch none

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>