Changeset 244652 in webkit


Ignore:
Timestamp:
Apr 25, 2019 10:36:58 AM (5 years ago)
Author:
achristensen@apple.com
Message:

Remove DeprecatedOptional
https://bugs.webkit.org/show_bug.cgi?id=197161

Reviewed by Darin Adler.

Source/JavaScriptCore:

We need to keep a symbol exported from JavaScriptCore for binary compatibility with iOS12.
We need this symbol to be in a file that doesn't include anything because libcxx's implementation of
std::optional is actually std::1::optional, which has a different mangled name. This change will
prevent protocol errors from being reported if you are running the iOS12 simulator with a custom build of WebKit
and using the web inspector with it, but it's necessary to allow us to start using C++17 in WebKit.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • inspector/InspectorBackendDispatcher.cpp:
  • inspector/InspectorBackendDispatcher.h:
  • inspector/InspectorBackendDispatcherCompatibility.cpp: Added.

(Inspector::BackendDispatcher::reportProtocolError):

  • inspector/InspectorBackendDispatcherCompatibility.h: Added.

Source/WTF:

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/DeprecatedOptional.h: Removed.
Location:
trunk/Source
Files:
1 added
1 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r244620 r244652  
     12019-04-25  Alex Christensen  <achristensen@webkit.org>
     2
     3        Remove DeprecatedOptional
     4        https://bugs.webkit.org/show_bug.cgi?id=197161
     5
     6        Reviewed by Darin Adler.
     7
     8        We need to keep a symbol exported from JavaScriptCore for binary compatibility with iOS12.
     9        We need this symbol to be in a file that doesn't include anything because libcxx's implementation of
     10        std::optional is actually std::__1::optional, which has a different mangled name.  This change will
     11        prevent protocol errors from being reported if you are running the iOS12 simulator with a custom build of WebKit
     12        and using the web inspector with it, but it's necessary to allow us to start using C++17 in WebKit.
     13
     14        * JavaScriptCore.xcodeproj/project.pbxproj:
     15        * inspector/InspectorBackendDispatcher.cpp:
     16        * inspector/InspectorBackendDispatcher.h:
     17        * inspector/InspectorBackendDispatcherCompatibility.cpp: Added.
     18        (Inspector::BackendDispatcher::reportProtocolError):
     19        * inspector/InspectorBackendDispatcherCompatibility.h: Added.
     20
    1212019-04-24  Saam Barati  <sbarati@apple.com>
    222
  • trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj

    r244578 r244652  
    11051105                5B70CFE01DB69E6600EC23F9 /* AsyncFunctionPrototype.h in Headers */ = {isa = PBXBuildFile; fileRef = 5B70CFDA1DB69E5C00EC23F9 /* AsyncFunctionPrototype.h */; };
    11061106                5B70CFE21DB69E6600EC23F9 /* AsyncFunctionConstructor.h in Headers */ = {isa = PBXBuildFile; fileRef = 5B70CFDC1DB69E5C00EC23F9 /* AsyncFunctionConstructor.h */; };
     1107                5C4196622270E0000047B7CD /* InspectorBackendDispatcherCompatibility.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5C4196612270DFF30047B7CD /* InspectorBackendDispatcherCompatibility.cpp */; };
    11071108                5C4E8E961DBEBE620036F1FC /* JSONParseTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5C4E8E941DBEBDA20036F1FC /* JSONParseTest.cpp */; };
    11081109                5D5D8AD10E0D0EBE00F9C692 /* libedit.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5D5D8AD00E0D0EBE00F9C692 /* libedit.dylib */; };
     
    36863687                5B70CFDD1DB69E5C00EC23F9 /* AsyncFunctionConstructor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AsyncFunctionConstructor.cpp; sourceTree = "<group>"; };
    36873688                5B8243041DB7AA4900EA6384 /* AsyncFunctionPrototype.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = AsyncFunctionPrototype.js; sourceTree = "<group>"; };
     3689                5C4196612270DFF30047B7CD /* InspectorBackendDispatcherCompatibility.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorBackendDispatcherCompatibility.cpp; sourceTree = "<group>"; };
    36883690                5C4E8E941DBEBDA20036F1FC /* JSONParseTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSONParseTest.cpp; path = API/tests/JSONParseTest.cpp; sourceTree = "<group>"; };
    36893691                5C4E8E951DBEBDA20036F1FC /* JSONParseTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSONParseTest.h; path = API/tests/JSONParseTest.h; sourceTree = "<group>"; };
     
    82048206                                A593CF7A1840360300BFCE27 /* InspectorBackendDispatcher.cpp */,
    82058207                                A593CF7B1840360300BFCE27 /* InspectorBackendDispatcher.h */,
     8208                                5C4196612270DFF30047B7CD /* InspectorBackendDispatcherCompatibility.cpp */,
    82068209                                A5D0A1BA1862301B00C7B496 /* InspectorEnvironment.h */,
    82078210                                A5945594182479EB00CC3843 /* InspectorFrontendChannel.h */,
     
    1072410727                                5333BBDD2110F7E1007618EC /* DFGSpeculativeJIT64.cpp in Sources */,
    1072510728                                33B2A548226543BF005A0F79 /* FTLLowerDFGToB3.cpp in Sources */,
     10729                                5C4196622270E0000047B7CD /* InspectorBackendDispatcherCompatibility.cpp in Sources */,
    1072610730                                536B319E1F735F160037FC33 /* LowLevelInterpreter.cpp in Sources */,
    1072710731                                0FF4274A158EBE91004CB9FF /* udis86.c in Sources */,
  • trunk/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.cpp

    r244574 r244652  
    271271}
    272272
    273 void BackendDispatcher::reportProtocolError(WTF::DeprecatedOptional<long> relatedRequestId, CommonErrorCode errorCode, const String& errorMessage)
    274 {
    275     if (relatedRequestId)
    276         reportProtocolError(relatedRequestId.value(), errorCode, errorMessage);
    277     else
    278         reportProtocolError(WTF::nullopt, errorCode, errorMessage);
    279 }
    280 
    281273template<typename T>
    282274T BackendDispatcher::getPropertyValue(JSON::Object* object, const String& name, bool* out_optionalValueFound, T defaultValue, std::function<bool(JSON::Value&, T&)> asMethod, const char* typeName)
  • trunk/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.h

    r244574 r244652  
    3030#include "InspectorProtocolTypes.h"
    3131#include <functional>
    32 #include <wtf/DeprecatedOptional.h>
    3332#include <wtf/Optional.h>
    3433#include <wtf/RefCounted.h>
     
    111110    BackendDispatcher(Ref<FrontendRouter>&&);
    112111
    113     // This is necessary for some versions of Safari. Remove it when those versions of Safari are no longer supported.
    114     void reportProtocolError(WTF::DeprecatedOptional<long> relatedRequestId, CommonErrorCode, const String& errorMessage);
    115 
    116112    Ref<FrontendRouter> m_frontendRouter;
    117113    HashMap<String, SupplementalBackendDispatcher*> m_dispatchers;
  • trunk/Source/WTF/ChangeLog

    r244635 r244652  
     12019-04-25  Alex Christensen  <achristensen@webkit.org>
     2
     3        Remove DeprecatedOptional
     4        https://bugs.webkit.org/show_bug.cgi?id=197161
     5
     6        Reviewed by Darin Adler.
     7
     8        * WTF.xcodeproj/project.pbxproj:
     9        * wtf/CMakeLists.txt:
     10        * wtf/DeprecatedOptional.h: Removed.
     11
    1122019-04-24  Carlos Garcia Campos  <cgarcia@igalia.com>
    213
  • trunk/Source/WTF/WTF.xcodeproj/project.pbxproj

    r244574 r244652  
    469469                A5098AFF1C169E0700087797 /* SandboxSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SandboxSPI.h; sourceTree = "<group>"; };
    470470                A5098B011C16A4F900087797 /* SecuritySPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SecuritySPI.h; sourceTree = "<group>"; };
    471                 A561F30F1DF2642100FF675D /* DeprecatedOptional.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DeprecatedOptional.h; sourceTree = "<group>"; };
    472471                A5BA15F2182433A900A82E69 /* StringCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = StringCocoa.mm; sourceTree = "<group>"; };
    473472                A5BA15F41824348000A82E69 /* StringImplCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = StringImplCocoa.mm; sourceTree = "<group>"; };
     
    926925                                996B17841EBA441C007E10EB /* DebugUtilities.h */,
    927926                                0F2B66A417B6B4F700A7AE3F /* DeferrableRefCounted.h */,
    928                                 A561F30F1DF2642100FF675D /* DeprecatedOptional.h */,
    929927                                A8A4727E151A825A004123FF /* Deque.h */,
    930928                                A9A4727F151A825A004123FF /* DisallowCType.h */,
     
    15361534                                0F9D3360165DBA73005AD387 /* FilePrintStream.cpp in Sources */,
    15371535                                A331D95B21F24992009F02AA /* FileSystem.cpp in Sources */,
    1538                                 FE1E2C42224187C600F6B729 /* PlatformRegisters.cpp in Sources */,
    15391536                                A331D95D21F249E4009F02AA /* FileSystemCF.cpp in Sources */,
    15401537                                A331D95F21F249F6009F02AA /* FileSystemCocoa.mm in Sources */,
     
    15781575                                51F1752C1F3D486000C74950 /* PersistentDecoder.cpp in Sources */,
    15791576                                51F1752D1F3D486000C74950 /* PersistentEncoder.cpp in Sources */,
     1577                                FE1E2C42224187C600F6B729 /* PlatformRegisters.cpp in Sources */,
    15801578                                0F9D3362165DBA73005AD387 /* PrintStream.cpp in Sources */,
    15811579                                7AF023B52061E17000A8EFD6 /* ProcessPrivilege.cpp in Sources */,
     1580                                FE1E2C3B2240C06600F6B729 /* PtrTag.cpp in Sources */,
    15821581                                143F611F1565F0F900DB514A /* RAMSize.cpp in Sources */,
    15831582                                A3B725EC987446AD93F1A440 /* RandomDevice.cpp in Sources */,
     
    16301629                                1C181C911D307AB800F5FA16 /* UTextProviderLatin1.cpp in Sources */,
    16311630                                1C181C931D307AB800F5FA16 /* UTextProviderUTF16.cpp in Sources */,
    1632                                 FE1E2C3B2240C06600F6B729 /* PtrTag.cpp in Sources */,
    16331631                                A8A47469151A825B004123FF /* UTF8Conversion.cpp in Sources */,
    16341632                                7AFEC6B11EB22B5900DADE36 /* UUID.cpp in Sources */,
  • trunk/Source/WTF/wtf/CMakeLists.txt

    r244574 r244652  
    4848    DebugUtilities.h
    4949    DeferrableRefCounted.h
    50     DeprecatedOptional.h
    5150    Deque.h
    5251    DisallowCType.h
Note: See TracChangeset for help on using the changeset viewer.