Skip to content

Commit 786e703

Browse files
committed
Remove <wtf/Optional.h>
https://bugs.webkit.org/show_bug.cgi?id=226437 Reviewed by Chris Dumez. Source/JavaScriptCore: * <many files>: Remove include of <wtf/Optional.h>. * inspector/scripts/codegen/generate_cpp_backend_dispatcher_header.py: (CppBackendDispatcherHeaderGenerator._generate_secondary_header_includes): Don't generate an include of wtf/Optional.h; including WTFString.h takes care of this anyway. * inspector/scripts/codegen/generate_cpp_frontend_dispatcher_header.py: (CppFrontendDispatcherHeaderGenerator._generate_secondary_header_includes): Ditto. * inspector/scripts/codegen/generate_cpp_protocol_types_header.py: (CppProtocolTypesHeaderGenerator._generate_secondary_header_includes): Ditto. * inspector/scripts/codegen/generate_cpp_protocol_types_implementation.py: (CppProtocolTypesImplementationGenerator.generate_output): Generate an include of <optional> instead of <wtf/Optional.h>. * inspector/scripts/tests/expected/*: Regenerate. Source/WebCore: * <many files>: Removed include of <wtf/Optional.h>. * platform/graphics/Font.h: Tweaked style a bit. * Modules/geolocation/GeolocationClient.h: Added include of <optional>. * Modules/mediastream/DoubleRange.h: Ditto. * Modules/mediastream/LongRange.h: Ditto. * Modules/webauthn/AuthenticationExtensionsClientOutputs.h: Ditto. * css/CSSToLengthConversionData.h: Ditto. * css/DOMMatrix2DInit.h: Ditto. * dom/AddEventListenerOptions.h: Ditto. * dom/DeviceMotionData.h: Ditto. * dom/DeviceOrientationData.h: Ditto. * dom/SuccessOr.h: Ditto. * html/DateTimeFieldsState.h: Ditto. * html/ImageBitmapOptions.h: Ditto. * html/canvas/PredefinedColorSpace.h: Ditto. * layout/LayoutPhase.h: Ditto. * layout/MarginTypes.h: Ditto. * loader/ResourceLoadNotifier.h: Ditto. * page/RuntimeEnabledFeatures.h: Ditto. * page/ScrollOptions.h: Ditto. * platform/MediaCapabilitiesInfo.h: Ditto. * platform/cocoa/SystemBattery.h: Ditto. * platform/graphics/DecodingOptions.h: Ditto. * platform/graphics/DestinationColorSpace.h: Ditto. * platform/graphics/DisplayRefreshMonitorClient.h: Ditto. * platform/graphics/FloatLine.h: Ditto. * platform/graphics/gpu/GPURequestAdapterOptions.h: Ditto. * platform/graphics/x11/PlatformDisplayX11.h: Ditto. * platform/ios/SelectionGeometry.h: Ditto. * platform/mac/NSScrollerImpDetails.h: Ditto. * platform/network/DNS.h: Ditto. * platform/text/EncodingTables.h: Ditto. * platform/text/TextCodecCJK.h: Ditto. * platform/text/TextCodecUTF16.h: Ditto. * platform/text/TextFlags.h: Ditto. Source/WebCore/PAL: * pal/SessionID.h: Include <optional>. * pal/crypto/gcrypt/Utilities.h: Ditto. * pal/crypto/tasn1/Utilities.cpp: Removed include of <wtf/Optional.h>. Source/WebDriver: * SessionHost.h: Removed include of <wtf/Optional.h>. Source/WebKit: * <many files>: Removed include of <wtf/Optional.h>. Source/WebKitLegacy/mac: * DOM/DOMRangeInternal.h: Added import of <optional>. * WebView/WebGeolocationPosition.mm: Removed import of <wtf/Optional.h>. * WebView/WebGeolocationPositionInternal.h: Added import of <optional>. Source/WTF: * <many files>: Removed include of <wtf/Optional.h>. * WTF.xcodeproj/project.pbxproj: Removed Optional.h. * wtf/Markable.h: Added include of <optional>. * wtf/OptionSet.h: Ditto. * wtf/Optional.h: Emptied this file. On the Windows build system, we can't seem to build successfully without an empty file here. The copied forwarding header seems to linger even if we remove the original. Until we fix the Windows build system, if we want to support incremental builds, we need to keep this empty file around. * wtf/PrintStream.h: Added include of <optional>. * wtf/Seconds.h: Ditto. * wtf/StackTrace.h: Ditto. * wtf/StdLibExtras.h: Moved the valueOrCompute function here from Optional.h. Re-sorted the "using" at the bottom of the file. * wtf/URLHelpers.h: Added include of <optional>. * wtf/Vector.h: Ditto. Tools: * <many files>: Removed include of <wtf/Optional.h>. Canonical link: https://commits.webkit.org/238372@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278340 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent 2283824 commit 786e703

489 files changed

Lines changed: 267 additions & 633 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Source/JavaScriptCore/API/tests/testapi.mm‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
#import <pthread.h>
5151
#import <vector>
5252
#import <wtf/MemoryFootprint.h>
53-
#import <wtf/Optional.h>
5453
#import <wtf/DataLog.h>
5554
#import <wtf/RetainPtr.h>
5655

‎Source/JavaScriptCore/ChangeLog‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
2021-06-01 Darin Adler <darin@apple.com>
2+
3+
Remove <wtf/Optional.h>
4+
https://bugs.webkit.org/show_bug.cgi?id=226437
5+
6+
Reviewed by Chris Dumez.
7+
8+
* <many files>: Remove include of <wtf/Optional.h>.
9+
10+
* inspector/scripts/codegen/generate_cpp_backend_dispatcher_header.py:
11+
(CppBackendDispatcherHeaderGenerator._generate_secondary_header_includes): Don't generate
12+
an include of wtf/Optional.h; including WTFString.h takes care of this anyway.
13+
* inspector/scripts/codegen/generate_cpp_frontend_dispatcher_header.py:
14+
(CppFrontendDispatcherHeaderGenerator._generate_secondary_header_includes): Ditto.
15+
* inspector/scripts/codegen/generate_cpp_protocol_types_header.py:
16+
(CppProtocolTypesHeaderGenerator._generate_secondary_header_includes): Ditto.
17+
18+
* inspector/scripts/codegen/generate_cpp_protocol_types_implementation.py:
19+
(CppProtocolTypesImplementationGenerator.generate_output): Generate an include of <optional>
20+
instead of <wtf/Optional.h>.
21+
22+
* inspector/scripts/tests/expected/*: Regenerate.
23+
124
2021-06-01 Chris Dumez <cdumez@apple.com>
225

326
Rename Checked::unsafeGet() to Checked::value()

‎Source/JavaScriptCore/assembler/LinkBuffer.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
#include <wtf/DataLog.h>
4141
#include <wtf/FastMalloc.h>
4242
#include <wtf/Noncopyable.h>
43-
#include <wtf/Optional.h>
4443

4544
namespace JSC {
4645

‎Source/JavaScriptCore/assembler/MacroAssemblerARM64.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
#include "ARM64Assembler.h"
3131
#include "AbstractMacroAssembler.h"
3232
#include <wtf/MathExtras.h>
33-
#include <wtf/Optional.h>
3433

3534
namespace JSC {
3635

‎Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
#include "X86Assembler.h"
3131
#include "AbstractMacroAssembler.h"
3232
#include <array>
33-
#include <wtf/Optional.h>
3433

3534
namespace JSC {
3635

‎Source/JavaScriptCore/b3/B3Common.cpp‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
#include "DFGCommon.h"
3232
#include "FTLState.h"
3333
#include "Options.h"
34-
#include <wtf/Optional.h>
3534

3635
namespace JSC { namespace B3 {
3736

‎Source/JavaScriptCore/b3/B3Opcode.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929

3030
#include "B3Type.h"
3131
#include "B3Width.h"
32-
#include <wtf/Optional.h>
3332
#include <wtf/StdLibExtras.h>
3433

3534
namespace JSC { namespace B3 {

‎Source/JavaScriptCore/b3/air/AirArg.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
#include "B3Type.h"
3434
#include "B3Value.h"
3535
#include "B3Width.h"
36-
#include <wtf/Optional.h>
3736

3837
#if !ASSERT_ENABLED
3938
IGNORE_RETURN_TYPE_WARNINGS_BEGIN

‎Source/JavaScriptCore/bytecode/BytecodeGeneratorification.cpp‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
#include "StrongInlines.h"
3939
#include "UnlinkedCodeBlockGenerator.h"
4040
#include "UnlinkedMetadataTableInlines.h"
41-
#include <wtf/Optional.h>
4241

4342
namespace JSC {
4443

‎Source/JavaScriptCore/bytecode/UnlinkedFunctionExecutable.cpp‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
#include "SourceProvider.h"
4040
#include "Structure.h"
4141
#include "UnlinkedFunctionCodeBlock.h"
42-
#include <wtf/Optional.h>
4342

4443
namespace JSC {
4544

0 commit comments

Comments
 (0)