Bug 195586 - Add Optional to Forward.h.
Summary: Add Optional to Forward.h.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ross Kirsling
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-03-11 17:47 PDT by Ross Kirsling
Modified: 2019-03-11 22:28 PDT (History)
3 users (show)

See Also:


Attachments
Patch (70.62 KB, patch)
2019-03-11 17:51 PDT, Ross Kirsling
no flags Details | Formatted Diff | Diff
Patch (70.65 KB, patch)
2019-03-11 17:56 PDT, Ross Kirsling
no flags Details | Formatted Diff | Diff
Patch for landing (69.88 KB, patch)
2019-03-11 21:03 PDT, Ross Kirsling
no flags Details | Formatted Diff | Diff

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