Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (244573 => 244574)
--- trunk/Source/_javascript_Core/ChangeLog 2019-04-24 00:24:27 UTC (rev 244573)
+++ trunk/Source/_javascript_Core/ChangeLog 2019-04-24 00:29:55 UTC (rev 244574)
@@ -1,3 +1,17 @@
+2019-04-23 Commit Queue <[email protected]>
+
+ Unreviewed, rolling out r244558.
+ https://bugs.webkit.org/show_bug.cgi?id=197219
+
+ Causing crashes on iOS Sim Release and Debug (Requested by
+ ShawnRoberts on #webkit).
+
+ Reverted changeset:
+
+ "Remove DeprecatedOptional"
+ https://bugs.webkit.org/show_bug.cgi?id=197161
+ https://trac.webkit.org/changeset/244558
+
2019-04-23 Devin Rousso <[email protected]>
Web Inspector: Uncaught Exception: null is not an object (evaluating 'this.ownerDocument.frameIdentifier')
Modified: trunk/Source/_javascript_Core/inspector/InspectorBackendDispatcher.cpp (244573 => 244574)
--- trunk/Source/_javascript_Core/inspector/InspectorBackendDispatcher.cpp 2019-04-24 00:24:27 UTC (rev 244573)
+++ trunk/Source/_javascript_Core/inspector/InspectorBackendDispatcher.cpp 2019-04-24 00:29:55 UTC (rev 244574)
@@ -270,6 +270,14 @@
m_protocolErrors.append(std::tuple<CommonErrorCode, String>(errorCode, errorMessage));
}
+void BackendDispatcher::reportProtocolError(WTF::DeprecatedOptional<long> relatedRequestId, CommonErrorCode errorCode, const String& errorMessage)
+{
+ if (relatedRequestId)
+ reportProtocolError(relatedRequestId.value(), errorCode, errorMessage);
+ else
+ reportProtocolError(WTF::nullopt, errorCode, errorMessage);
+}
+
template<typename T>
T BackendDispatcher::getPropertyValue(JSON::Object* object, const String& name, bool* out_optionalValueFound, T defaultValue, std::function<bool(JSON::Value&, T&)> asMethod, const char* typeName)
{
Modified: trunk/Source/_javascript_Core/inspector/InspectorBackendDispatcher.h (244573 => 244574)
--- trunk/Source/_javascript_Core/inspector/InspectorBackendDispatcher.h 2019-04-24 00:24:27 UTC (rev 244573)
+++ trunk/Source/_javascript_Core/inspector/InspectorBackendDispatcher.h 2019-04-24 00:29:55 UTC (rev 244574)
@@ -29,6 +29,7 @@
#include "InspectorFrontendRouter.h"
#include "InspectorProtocolTypes.h"
#include <functional>
+#include <wtf/DeprecatedOptional.h>
#include <wtf/Optional.h>
#include <wtf/RefCounted.h>
#include <wtf/text/WTFString.h>
@@ -109,6 +110,9 @@
private:
BackendDispatcher(Ref<FrontendRouter>&&);
+ // This is necessary for some versions of Safari. Remove it when those versions of Safari are no longer supported.
+ void reportProtocolError(WTF::DeprecatedOptional<long> relatedRequestId, CommonErrorCode, const String& errorMessage);
+
Ref<FrontendRouter> m_frontendRouter;
HashMap<String, SupplementalBackendDispatcher*> m_dispatchers;
Modified: trunk/Source/WTF/ChangeLog (244573 => 244574)
--- trunk/Source/WTF/ChangeLog 2019-04-24 00:24:27 UTC (rev 244573)
+++ trunk/Source/WTF/ChangeLog 2019-04-24 00:29:55 UTC (rev 244574)
@@ -1,3 +1,17 @@
+2019-04-23 Commit Queue <[email protected]>
+
+ Unreviewed, rolling out r244558.
+ https://bugs.webkit.org/show_bug.cgi?id=197219
+
+ Causing crashes on iOS Sim Release and Debug (Requested by
+ ShawnRoberts on #webkit).
+
+ Reverted changeset:
+
+ "Remove DeprecatedOptional"
+ https://bugs.webkit.org/show_bug.cgi?id=197161
+ https://trac.webkit.org/changeset/244558
+
2019-04-23 Alex Christensen <[email protected]>
Remove DeprecatedOptional
Modified: trunk/Source/WTF/WTF.xcodeproj/project.pbxproj (244573 => 244574)
--- trunk/Source/WTF/WTF.xcodeproj/project.pbxproj 2019-04-24 00:24:27 UTC (rev 244573)
+++ trunk/Source/WTF/WTF.xcodeproj/project.pbxproj 2019-04-24 00:29:55 UTC (rev 244574)
@@ -468,6 +468,7 @@
A3EE5C3F21FFACA200FABD61 /* SchedulePairMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SchedulePairMac.mm; sourceTree = "<group>"; };
A5098AFF1C169E0700087797 /* SandboxSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SandboxSPI.h; sourceTree = "<group>"; };
A5098B011C16A4F900087797 /* SecuritySPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SecuritySPI.h; sourceTree = "<group>"; };
+ A561F30F1DF2642100FF675D /* DeprecatedOptional.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DeprecatedOptional.h; sourceTree = "<group>"; };
A5BA15F2182433A900A82E69 /* StringCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = StringCocoa.mm; sourceTree = "<group>"; };
A5BA15F41824348000A82E69 /* StringImplCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = StringImplCocoa.mm; sourceTree = "<group>"; };
A5BA15F7182435A600A82E69 /* AtomicStringImplCF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AtomicStringImplCF.cpp; sourceTree = "<group>"; };
@@ -924,6 +925,7 @@
A8A4727A151A825A004123FF /* DateMath.h */,
996B17841EBA441C007E10EB /* DebugUtilities.h */,
0F2B66A417B6B4F700A7AE3F /* DeferrableRefCounted.h */,
+ A561F30F1DF2642100FF675D /* DeprecatedOptional.h */,
A8A4727E151A825A004123FF /* Deque.h */,
A9A4727F151A825A004123FF /* DisallowCType.h */,
0F4570421BE5B58F0062A629 /* Dominators.h */,
@@ -1533,6 +1535,7 @@
A8A473C3151A825B004123FF /* FastMalloc.cpp in Sources */,
0F9D3360165DBA73005AD387 /* FilePrintStream.cpp in Sources */,
A331D95B21F24992009F02AA /* FileSystem.cpp in Sources */,
+ FE1E2C42224187C600F6B729 /* PlatformRegisters.cpp in Sources */,
A331D95D21F249E4009F02AA /* FileSystemCF.cpp in Sources */,
A331D95F21F249F6009F02AA /* FileSystemCocoa.mm in Sources */,
A331D96121F24A0A009F02AA /* FileSystemMac.mm in Sources */,
@@ -1574,10 +1577,8 @@
51F1752B1F3D486000C74950 /* PersistentCoders.cpp in Sources */,
51F1752C1F3D486000C74950 /* PersistentDecoder.cpp in Sources */,
51F1752D1F3D486000C74950 /* PersistentEncoder.cpp in Sources */,
- FE1E2C42224187C600F6B729 /* PlatformRegisters.cpp in Sources */,
0F9D3362165DBA73005AD387 /* PrintStream.cpp in Sources */,
7AF023B52061E17000A8EFD6 /* ProcessPrivilege.cpp in Sources */,
- FE1E2C3B2240C06600F6B729 /* PtrTag.cpp in Sources */,
143F611F1565F0F900DB514A /* RAMSize.cpp in Sources */,
A3B725EC987446AD93F1A440 /* RandomDevice.cpp in Sources */,
A8A47414151A825B004123FF /* RandomNumber.cpp in Sources */,
@@ -1628,6 +1629,7 @@
1C181C8F1D307AB800F5FA16 /* UTextProvider.cpp in Sources */,
1C181C911D307AB800F5FA16 /* UTextProviderLatin1.cpp in Sources */,
1C181C931D307AB800F5FA16 /* UTextProviderUTF16.cpp in Sources */,
+ FE1E2C3B2240C06600F6B729 /* PtrTag.cpp in Sources */,
A8A47469151A825B004123FF /* UTF8Conversion.cpp in Sources */,
7AFEC6B11EB22B5900DADE36 /* UUID.cpp in Sources */,
0F66B2921DC97BAB004A1D3F /* WallTime.cpp in Sources */,
Modified: trunk/Source/WTF/wtf/CMakeLists.txt (244573 => 244574)
--- trunk/Source/WTF/wtf/CMakeLists.txt 2019-04-24 00:24:27 UTC (rev 244573)
+++ trunk/Source/WTF/wtf/CMakeLists.txt 2019-04-24 00:29:55 UTC (rev 244574)
@@ -47,6 +47,7 @@
DateMath.h
DebugUtilities.h
DeferrableRefCounted.h
+ DeprecatedOptional.h
Deque.h
DisallowCType.h
Dominators.h
Added: trunk/Source/WTF/wtf/DeprecatedOptional.h (0 => 244574)
--- trunk/Source/WTF/wtf/DeprecatedOptional.h (rev 0)
+++ trunk/Source/WTF/wtf/DeprecatedOptional.h 2019-04-24 00:29:55 UTC (rev 244574)
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2014, 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// This file contains a deprecated version of std::optional which a released
+// version of Safari uses. Once Safari stops using this, we can remove this.
+// New code should use WTF::Optional.
+
+#pragma once
+
+#include <type_traits>
+#include <wtf/Optional.h>
+
+namespace std {
+
+template <class T>
+class optional : private WTF::OptionalBase<T> {
+public:
+ explicit constexpr operator bool() const __NOEXCEPT { return WTF::OptionalBase<T>::init_; }
+ constexpr T const& value() const& { return WTF::OptionalBase<T>::storage_.value_; }
+};
+
+}
+
+namespace WTF {
+
+template<typename T> using DeprecatedOptional = std::optional<T>;
+
+} // namespace WTF