Bug 195586

Summary: Add Optional to Forward.h.
Product: WebKit Reporter: Ross Kirsling <ross.kirsling>
Component: Web Template FrameworkAssignee: Ross Kirsling <ross.kirsling>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, darin, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch for landing none

Description Ross Kirsling 2019-03-11 17:47:45 PDT
Add Optional to Forward.h.
Comment 1 Ross Kirsling 2019-03-11 17:51:14 PDT
Created attachment 364321 [details]
Patch
Comment 2 Ross Kirsling 2019-03-11 17:56:42 PDT
Created attachment 364323 [details]
Patch
Comment 3 Darin Adler 2019-03-11 18:53:07 PDT
Comment on attachment 364323 [details]
Patch

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

After a while I stopped commenting on all the different files where I think we can omit the newly added includes of Forward.h, but I think we can remove most of them.

> Source/JavaScriptCore/debugger/DebuggerParseData.h:30
> +#include <wtf/Forward.h>
>  #include <wtf/Vector.h>

Vector.h includes Forward.h so no need to add it.

> Source/JavaScriptCore/jit/PCToCodeOriginMap.h:33
> +#include <wtf/Forward.h>

Vector.h includes Forward.h so no need to add it.

> Source/JavaScriptCore/runtime/AbstractModuleRecord.h:30
> +#include <wtf/Forward.h>

ListHashSet.h includes HashSet.h which includes Forward.h so no need to add it.

> Source/JavaScriptCore/wasm/WasmStreamingParser.h:33
> +#include <wtf/Forward.h>

Vector.h includes Forward.h so no need to add it.

> Source/WTF/wtf/CPUTime.h:28
> +#include <wtf/Forward.h>

I think this include isn’t needed. Not 100% sure.

> Source/WebCore/Modules/encryptedmedia/MediaKeyStatusMap.h:36
> +#include <wtf/Forward.h>

Ref.h includes Forward.h so this include isn’t needed.

> Source/WebCore/Modules/webauthn/apdu/ApduCommand.h:34
> +#include <wtf/Forward.h>

Vector.h includes Forward.h so this include isn’t needed.

> Source/WebCore/Modules/webauthn/apdu/ApduResponse.h:34
> +#include <wtf/Forward.h>

Vector.h includes Forward.h so this include isn’t needed.

> Source/WebCore/Modules/webauthn/fido/FidoHidMessage.h:37
> +#include <wtf/Forward.h>

Deque.h includes Vector.h which includes Forward.h so this include isn’t needed.

> Source/WebCore/Modules/webdatabase/SQLTransaction.h:37
> +#include <wtf/Forward.h>

Deque.h includes Vector.h which includes Forward.h so this include isn’t needed.

> Source/WebCore/Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.h:32
> +#include <wtf/Forward.h>

HashMap.h includes Forward.h so this include isn’t needed.

> Source/WebCore/Modules/webgpu/WHLSL/WHLSLGatherEntryPointItems.h:31
> +#include <wtf/Forward.h>

Vector.h includes Forward.h so this include isn’t needed.

> Source/WebCore/Modules/webgpu/WHLSL/WHLSLPrepare.h:32
> +#include <wtf/Forward.h>

WTFString.h includes something that includes Forward.h so this include isn’t needed.

> Source/WebCore/Modules/webgpu/WebGPU.h:31
> +#include <wtf/Forward.h>

Guessing this isn’t needed, not sure.

> Source/WebCore/Modules/webgpu/WebGPUCommandBuffer.h:35
> +#include <wtf/Forward.h>
>  #include <wtf/Ref.h>
>  #include <wtf/RefCounted.h>
>  #include <wtf/RefPtr.h>

RefPtr.h includes Ref.h, and that in turn includes Forward.h so both Forward.h and Ref.h includes can be deleted here.

> Source/WebCore/animation/WebAnimation.h:35
>  #include <wtf/Ref.h>

Could delete this since RefPtr.h includes Ref.h.

> Source/WebCore/dom/TextDecoder.h:30
> +#include <wtf/Forward.h>

No need for this since WTFString.h already includes it.

> Source/WebCore/dom/UserGestureIndicator.h:29
> +#include <wtf/Forward.h>

No need, this includes Vector.h and other headers that take care of Forward.h.

> Source/WebCore/html/HTMLAllCollection.h:29
> +#include <wtf/Forward.h>

Seems likely this can be omitted, but not sure.
Comment 4 Ross Kirsling 2019-03-11 19:31:17 PDT
Sounds good! Along the way I found myself questioning just how aggressive to be in avoiding adding includes, but I figured I'd start from a more conservative approach to be safe. :)
Comment 5 Ross Kirsling 2019-03-11 21:03:00 PDT
Created attachment 364344 [details]
Patch for landing
Comment 6 WebKit Commit Bot 2019-03-11 22:27:51 PDT
Comment on attachment 364344 [details]
Patch for landing

Clearing flags on attachment: 364344

Committed r242776: <https://trac.webkit.org/changeset/242776>
Comment 7 WebKit Commit Bot 2019-03-11 22:27:53 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Radar WebKit Bug Importer 2019-03-11 22:28:18 PDT
<rdar://problem/48798098>