- Revision
- 273469
- Author
- achristen...@apple.com
- Date
- 2021-02-24 20:57:48 -0800 (Wed, 24 Feb 2021)
Log Message
Add stubs to enable SafariForWebKitDevelopment to launch
https://bugs.webkit.org/show_bug.cgi?id=222388
Reviewed by Myles Maxfield.
Source/_javascript_Core:
* _javascript_Core.xcodeproj/project.pbxproj:
* runtime/SymbolStubsForSafariCompatibility.mm: Added.
(WTF::String::String):
(WTF::JSONImpl::ObjectBase::getArray const):
(WTF::JSONImpl::ObjectBase::getValue const):
(WTF::JSONImpl::ObjectBase::getObject const):
(Inspector::BackendDispatcher::sendResponse):
Source/WebKit:
I manually verified that before this change, DYLD won't let it launch or it calls a missing selector,
but after this change it launches and loads web pages.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _inspectorDelegate]):
(-[WKWebView _setInspectorDelegate:]):
Modified Paths
Added Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (273468 => 273469)
--- trunk/Source/_javascript_Core/ChangeLog 2021-02-25 03:34:53 UTC (rev 273468)
+++ trunk/Source/_javascript_Core/ChangeLog 2021-02-25 04:57:48 UTC (rev 273469)
@@ -1,3 +1,18 @@
+2021-02-24 Alex Christensen <achristen...@webkit.org>
+
+ Add stubs to enable SafariForWebKitDevelopment to launch
+ https://bugs.webkit.org/show_bug.cgi?id=222388
+
+ Reviewed by Myles Maxfield.
+
+ * _javascript_Core.xcodeproj/project.pbxproj:
+ * runtime/SymbolStubsForSafariCompatibility.mm: Added.
+ (WTF::String::String):
+ (WTF::JSONImpl::ObjectBase::getArray const):
+ (WTF::JSONImpl::ObjectBase::getValue const):
+ (WTF::JSONImpl::ObjectBase::getObject const):
+ (Inspector::BackendDispatcher::sendResponse):
+
2021-02-24 Ryan Haddad <ryanhad...@apple.com>
Unreviewed, reverting r273373.
Modified: trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj (273468 => 273469)
--- trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj 2021-02-25 03:34:53 UTC (rev 273468)
+++ trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj 2021-02-25 04:57:48 UTC (rev 273469)
@@ -1792,6 +1792,7 @@
DCFDFBDA1D1F5D9E00FE3D72 /* B3TypeMap.h in Headers */ = {isa = PBXBuildFile; fileRef = DCFDFBD81D1F5D9800FE3D72 /* B3TypeMap.h */; };
DE26E9031CB5DD0500D2BE82 /* BuiltinExecutableCreator.h in Headers */ = {isa = PBXBuildFile; fileRef = DE26E9021CB5DD0500D2BE82 /* BuiltinExecutableCreator.h */; };
DEA7E2451BBC677F00D78440 /* JSTypedArrayViewPrototype.h in Headers */ = {isa = PBXBuildFile; fileRef = 53917E7C1B791106000EBD33 /* JSTypedArrayViewPrototype.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ DFBC2CA625E6D5B90081BDD1 /* SymbolStubsForSafariCompatibility.mm in Sources */ = {isa = PBXBuildFile; fileRef = DFBC2CA525E6D5790081BDD1 /* SymbolStubsForSafariCompatibility.mm */; };
E124A8F70E555775003091F1 /* OpaqueJSString.h in Headers */ = {isa = PBXBuildFile; fileRef = E124A8F50E555775003091F1 /* OpaqueJSString.h */; settings = {ATTRIBUTES = (Private, ); }; };
E307178324C7827100DF0644 /* IntlRelativeTimeFormat.h in Headers */ = {isa = PBXBuildFile; fileRef = A3BF885024480BE1001B9F35 /* IntlRelativeTimeFormat.h */; };
E307178424C7827700DF0644 /* IntlRelativeTimeFormatConstructor.h in Headers */ = {isa = PBXBuildFile; fileRef = A3BF884E24480BE0001B9F35 /* IntlRelativeTimeFormatConstructor.h */; };
@@ -4999,6 +5000,7 @@
DE26E9021CB5DD0500D2BE82 /* BuiltinExecutableCreator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BuiltinExecutableCreator.h; sourceTree = "<group>"; };
DE26E9061CB5DD9600D2BE82 /* BuiltinExecutableCreator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BuiltinExecutableCreator.cpp; sourceTree = "<group>"; };
DE5A09FF1BA3AC3E003D4424 /* IntrinsicEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IntrinsicEmitter.cpp; sourceTree = "<group>"; };
+ DFBC2CA525E6D5790081BDD1 /* SymbolStubsForSafariCompatibility.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SymbolStubsForSafariCompatibility.mm; sourceTree = "<group>"; };
E124A8F50E555775003091F1 /* OpaqueJSString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OpaqueJSString.h; sourceTree = "<group>"; };
E124A8F60E555775003091F1 /* OpaqueJSString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OpaqueJSString.cpp; sourceTree = "<group>"; };
E178633F0D9BEC0000D74E75 /* InitializeThreading.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InitializeThreading.h; sourceTree = "<group>"; };
@@ -7840,6 +7842,7 @@
705B41A81A6E501E00716757 /* SymbolObject.h */,
705B41A91A6E501E00716757 /* SymbolPrototype.cpp */,
705B41AA1A6E501E00716757 /* SymbolPrototype.h */,
+ DFBC2CA525E6D5790081BDD1 /* SymbolStubsForSafariCompatibility.mm */,
0F919D2715856770004A4E7D /* SymbolTable.cpp */,
14A396A60CD2933100B5B4FF /* SymbolTable.h */,
E39BF39822A2288B00BD183E /* SymbolTableInlines.h */,
@@ -11538,6 +11541,7 @@
E366441E254409B30001876F /* IntlListFormat.cpp in Sources */,
E38E8790254B978400F6F9E4 /* JSDateMath.cpp in Sources */,
536B319E1F735F160037FC33 /* LowLevelInterpreter.cpp in Sources */,
+ DFBC2CA625E6D5B90081BDD1 /* SymbolStubsForSafariCompatibility.mm in Sources */,
0FF4274A158EBE91004CB9FF /* udis86.c in Sources */,
0FF42740158EBE8B004CB9FF /* udis86_decode.c in Sources */,
0FF4274D158EBFE6004CB9FF /* udis86_itab_holder.c in Sources */,
Added: trunk/Source/_javascript_Core/runtime/SymbolStubsForSafariCompatibility.mm (0 => 273469)
--- trunk/Source/_javascript_Core/runtime/SymbolStubsForSafariCompatibility.mm (rev 0)
+++ trunk/Source/_javascript_Core/runtime/SymbolStubsForSafariCompatibility.mm 2021-02-25 04:57:48 UTC (rev 273469)
@@ -0,0 +1,72 @@
+/*
+* Copyright (C) 2021 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. ``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
+* 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.
+*/
+
+#import "JSExportMacros.h"
+
+// Note: nothing else should be included from this file to avoid strange linker problems.
+
+#if defined __MAC_OS_X_VERSION_MIN_REQUIRED && __MAC_OS_X_VERSION_MIN_REQUIRED < 110300
+
+// These linker symbols are needed to launch SafariForWebKitDevelopment on Catalina and Big Sur with an open source WebKit build.
+// Remove them after rdar://problem/74245355 is fixed and after we no longer support Big Sur.
+
+@class NSString;
+
+namespace WTF {
+
+class String {
+ JS_EXPORT_PRIVATE String(NSString *);
+};
+String::String(NSString *) { }
+
+template<typename, typename> class RefPtr { };
+template<typename> struct DumbPtrTraits { };
+
+namespace JSONImpl {
+class Array { };
+class Value { };
+class Object { };
+class ObjectBase {
+ JS_EXPORT_PRIVATE void getArray(String const&, RefPtr<Array, DumbPtrTraits<Array>>&) const;
+ JS_EXPORT_PRIVATE void getValue(String const&, RefPtr<Value, DumbPtrTraits<Value>>&) const;
+ JS_EXPORT_PRIVATE void getObject(String const&, RefPtr<Object, DumbPtrTraits<Object>>&) const;
+};
+void ObjectBase::getArray(String const&, RefPtr<Array, DumbPtrTraits<Array>>&) const { }
+void ObjectBase::getValue(String const&, RefPtr<Value, DumbPtrTraits<Value>>&) const { }
+void ObjectBase::getObject(String const&, RefPtr<Object, DumbPtrTraits<Object>>&) const { }
+} // namespace JSONImpl
+
+} // namespace WTF
+
+namespace Inspector {
+
+class BackendDispatcher {
+ JS_EXPORT_PRIVATE void sendResponse(long, WTF::RefPtr<WTF::JSONImpl::Object, WTF::DumbPtrTraits<WTF::JSONImpl::Object>>&&, bool);
+};
+void BackendDispatcher::sendResponse(long, WTF::RefPtr<WTF::JSONImpl::Object, WTF::DumbPtrTraits<WTF::JSONImpl::Object>>&&, bool) { }
+
+} // namespace Inspector
+
+#endif // __MAC_OS_X_VERSION_MIN_REQUIRED < 110300
Modified: trunk/Source/WebKit/ChangeLog (273468 => 273469)
--- trunk/Source/WebKit/ChangeLog 2021-02-25 03:34:53 UTC (rev 273468)
+++ trunk/Source/WebKit/ChangeLog 2021-02-25 04:57:48 UTC (rev 273469)
@@ -1,3 +1,17 @@
+2021-02-24 Alex Christensen <achristen...@webkit.org>
+
+ Add stubs to enable SafariForWebKitDevelopment to launch
+ https://bugs.webkit.org/show_bug.cgi?id=222388
+
+ Reviewed by Myles Maxfield.
+
+ I manually verified that before this change, DYLD won't let it launch or it calls a missing selector,
+ but after this change it launches and loads web pages.
+
+ * UIProcess/API/Cocoa/WKWebView.mm:
+ (-[WKWebView _inspectorDelegate]):
+ (-[WKWebView _setInspectorDelegate:]):
+
2021-02-24 Kate Cheney <katherine_che...@apple.com>
App-bound request parameter should be passed to main resource requests not the main frame
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (273468 => 273469)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm 2021-02-25 03:34:53 UTC (rev 273468)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm 2021-02-25 04:57:48 UTC (rev 273469)
@@ -1715,6 +1715,19 @@
_page->inspectorController().browserExtensionsDisabled(WTFMove(transformed));
}
+- (id <_WKInspectorDelegate>)_inspectorDelegate
+{
+ // This is needed to launch SafariForWebKitDevelopment on Big Sur with an open source WebKit build.
+ // FIXME: Remove this after we no longer support Big Sur.
+ return nil;
+}
+
+- (void)_setInspectorDelegate:(id<_WKInspectorDelegate>)delegate
+{
+ // This is needed to launch SafariForWebKitDevelopment on Big Sur with an open source WebKit build.
+ // FIXME: Remove this after we no longer support Big Sur.
+}
+
- (_WKFrameHandle *)_mainFrame
{
if (auto* frame = _page->mainFrame())