[Mac] WebInspectorUI.framework does not need to be soft-linked anymore
authorbburg@apple.com <bburg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Feb 2019 22:32:21 +0000 (22:32 +0000)
committerbburg@apple.com <bburg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Feb 2019 22:32:21 +0000 (22:32 +0000)
https://bugs.webkit.org/show_bug.cgi?id=194411
<rdar://problem/47787614>

Reviewed by Joseph Pecoraro.

Source/WebKit:

* Configurations/WebKit.xcconfig:
Conditionalize weak linking to WebInspectorUI.framework for Mac only.

* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::inspectorPageURL):
(WebKit::WebInspectorProxy::inspectorTestPageURL):
(WebKit::WebInspectorProxy::inspectorBaseURL):
* WebProcess/WebPage/mac/WebInspectorUIMac.mm:
(WebKit::webInspectorUILocalizedStringsURL):
Rewrite uses of the bundle to exit early if bundle couldn't be loaded.

Source/WebKitLegacy/mac:

* Configurations/WebKitLegacy.xcconfig:
Conditionalize weak linking to WebInspectorUI.framework for Mac only.

* WebCoreSupport/WebInspectorClient.mm:
(WebInspectorFrontendClient::localizedStringsURL):
(-[WebInspectorWindowController inspectorPagePath]):
(-[WebInspectorWindowController inspectorTestPagePath]):
Rewrite uses of the bundle to exit early if bundle couldn't be loaded.

Source/WTF:

* wtf/cocoa/SoftLinking.h:
Remove macro that now has no uses.

Tools:

Remove unnecessary soft linking macro usage.

* DumpRenderTree/mac/TestRunnerMac.mm:
(TestRunner::inspectorTestStubURL):
(SOFT_LINK_STAGED_FRAMEWORK): Deleted.
* WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm:
(WTR::TestRunner::inspectorTestStubURL):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@241564 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 files changed:
Source/WTF/ChangeLog
Source/WTF/wtf/cocoa/SoftLinking.h
Source/WebKit/ChangeLog
Source/WebKit/Configurations/WebKit.xcconfig
Source/WebKit/UIProcess/mac/WebInspectorProxyMac.mm
Source/WebKit/WebProcess/WebPage/mac/WebInspectorUIMac.mm
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/Configurations/WebKitLegacy.xcconfig
Source/WebKitLegacy/mac/WebCoreSupport/WebInspectorClient.mm
Tools/ChangeLog
Tools/DumpRenderTree/mac/TestRunnerMac.mm
Tools/WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm

index 9dbb6e2..190d7a2 100644 (file)
@@ -1,3 +1,14 @@
+2019-02-14  Brian Burg  <bburg@apple.com>
+
+        [Mac] WebInspectorUI.framework does not need to be soft-linked anymore
+        https://bugs.webkit.org/show_bug.cgi?id=194411
+        <rdar://problem/47787614>
+
+        Reviewed by Joseph Pecoraro.
+
+        * wtf/cocoa/SoftLinking.h:
+        Remove macro that now has no uses.
+
 2019-02-14  Ross Kirsling  <ross.kirsling@sony.com>
 
         [WTF] Add environment variable helpers
index e008322..47fb78a 100644 (file)
         return frameworkLibrary; \
     }
 
-#define SOFT_LINK_STAGED_FRAMEWORK(framework, unstagedLocation, version) \
-    static void* framework##Library() \
-    { \
-        static void* frameworkLibrary = ^{ \
-            void* result = dlopen("/System/Library/" #unstagedLocation "/" #framework ".framework/Versions/" #version "/" #framework, RTLD_LAZY); \
-            if (!result) \
-                result = dlopen("/System/Library/StagedFrameworks/Safari/" #framework ".framework/Versions/" #version "/" #framework, RTLD_LAZY); \
-            RELEASE_ASSERT_WITH_MESSAGE(result, "%s", dlerror()); \
-            return result; \
-        }(); \
-        return frameworkLibrary; \
-    }
-
 #define SOFT_LINK_FRAMEWORK_IN_UMBRELLA(umbrella, framework) \
     static void* framework##Library() \
     { \
index 800fff5..885a378 100644 (file)
@@ -1,3 +1,22 @@
+2019-02-14  Brian Burg  <bburg@apple.com>
+
+        [Mac] WebInspectorUI.framework does not need to be soft-linked anymore
+        https://bugs.webkit.org/show_bug.cgi?id=194411
+        <rdar://problem/47787614>
+
+        Reviewed by Joseph Pecoraro.
+
+        * Configurations/WebKit.xcconfig:
+        Conditionalize weak linking to WebInspectorUI.framework for Mac only.
+
+        * UIProcess/mac/WebInspectorProxyMac.mm:
+        (WebKit::WebInspectorProxy::inspectorPageURL):
+        (WebKit::WebInspectorProxy::inspectorTestPageURL):
+        (WebKit::WebInspectorProxy::inspectorBaseURL):
+        * WebProcess/WebPage/mac/WebInspectorUIMac.mm:
+        (WebKit::webInspectorUILocalizedStringsURL):
+        Rewrite uses of the bundle to exit early if bundle couldn't be loaded.
+
 2019-02-14  Michael Catanzaro  <mcatanzaro@igalia.com>
 
         [GTK] WebKitGTK+ -> WebKitGTK
index d9296a3..479bd6d 100644 (file)
@@ -127,7 +127,10 @@ WK_UIKIT_LDFLAGS_cocoatouch = -framework UIKit;
 WK_URL_FORMATTING_LDFLAGS = $(WK_URL_FORMATTING_LDFLAGS_$(WK_HAVE_URL_FORMATTING));
 WK_URL_FORMATTING_LDFLAGS_YES = -framework URLFormatting;
 
-FRAMEWORK_AND_LIBRARY_LDFLAGS = -lobjc -framework CFNetwork -framework CoreAudio -framework CoreFoundation -framework CoreGraphics -framework CoreText -framework Foundation -framework ImageIO -framework IOKit -framework WebKitLegacy -lnetwork $(WK_ACCESSIBILITY_LDFLAGS) $(WK_APPKIT_LDFLAGS) $(WK_ASSERTION_SERVICES_LDFLAGS) $(WK_CARBON_LDFLAGS) $(WK_CORE_PDF_LDFLAGS) $(WK_CORE_PREDICTION_LDFLAGS) $(WK_CORE_SERVICES_LDFLAGS) $(WK_DEVICE_IDENTITY_LDFLAGS) $(WK_GRAPHICS_SERVICES_LDFLAGS) $(WK_IOSURFACE_LDFLAGS) $(WK_LIBSANDBOX_LDFLAGS) $(WK_LIBWEBRTC_LDFLAGS) $(WK_MOBILE_CORE_SERVICES_LDFLAGS) $(WK_MOBILE_GESTALT_LDFLAGS) $(WK_OPENGL_LDFLAGS) $(WK_PDFKIT_LDFLAGS) $(WK_PROXIMITY_NETWORKING_LDFLAGS) $(WK_SAFE_BROWSING_LDFLAGS) $(WK_SECURITY_INTERFACE_LDFLAGS) $(WK_UIKIT_LDFLAGS) $(WK_URL_FORMATTING_LDFLAGS);
+WK_WEBINSPECTORUI_LDFLAGS = $(WK_WEBINSPECTORUI_LDFLAGS_$(WK_PLATFORM_NAME));
+WK_WEBINSPECTORUI_LDFLAGS_macosx = -weak_framework WebInspectorUI;
+
+FRAMEWORK_AND_LIBRARY_LDFLAGS = -lobjc -framework CFNetwork -framework CoreAudio -framework CoreFoundation -framework CoreGraphics -framework CoreText -framework Foundation -framework ImageIO -framework IOKit -framework WebKitLegacy -lnetwork $(WK_ACCESSIBILITY_LDFLAGS) $(WK_APPKIT_LDFLAGS) $(WK_ASSERTION_SERVICES_LDFLAGS) $(WK_CARBON_LDFLAGS) $(WK_CORE_PDF_LDFLAGS) $(WK_CORE_PREDICTION_LDFLAGS) $(WK_CORE_SERVICES_LDFLAGS) $(WK_DEVICE_IDENTITY_LDFLAGS) $(WK_GRAPHICS_SERVICES_LDFLAGS) $(WK_IOSURFACE_LDFLAGS) $(WK_LIBSANDBOX_LDFLAGS) $(WK_LIBWEBRTC_LDFLAGS) $(WK_MOBILE_CORE_SERVICES_LDFLAGS) $(WK_MOBILE_GESTALT_LDFLAGS) $(WK_OPENGL_LDFLAGS) $(WK_PDFKIT_LDFLAGS) $(WK_PROXIMITY_NETWORKING_LDFLAGS) $(WK_SAFE_BROWSING_LDFLAGS) $(WK_SECURITY_INTERFACE_LDFLAGS) $(WK_UIKIT_LDFLAGS) $(WK_URL_FORMATTING_LDFLAGS) $(WK_WEBINSPECTORUI_LDFLAGS);
 
 // Prevent C++ standard library basic_stringstream, operator new, delete and their related exception types from being exported as weak symbols.
 UNEXPORTED_SYMBOL_LDFLAGS = -Wl,-unexported_symbol -Wl,__ZTISt9bad_alloc -Wl,-unexported_symbol -Wl,__ZTISt9exception -Wl,-unexported_symbol -Wl,__ZTSSt9bad_alloc -Wl,-unexported_symbol -Wl,__ZTSSt9exception -Wl,-unexported_symbol -Wl,__ZdlPvS_ -Wl,-unexported_symbol -Wl,__ZnwmPv -Wl,-unexported_symbol -Wl,__Znwm -Wl,-unexported_symbol -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEEC2EOS4_ -Wl,-unexported_symbol -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEEC1EOS4_ -Wl,-unexported_symbol -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEEaSEDn -Wl,-unexported_symbol -Wl,__ZNKSt3__18functionIFvN7WebCore12PolicyActionEEEclES2_ -Wl,-unexported_symbol -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEE4swapERS4_ -Wl,-unexported_symbol -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEEC1ERKS4_ -Wl,-unexported_symbol -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEEC2ERKS4_ -Wl,-unexported_symbol -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEED1Ev -Wl,-unexported_symbol -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEED2Ev -Wl,-unexported_symbol -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEEaSERKS4_ -Wl,-unexported_symbol -Wl,__ZTVNSt3__117bad_function_callE -Wl,-unexported_symbol -Wl,__ZTCNSt3__118basic_stringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE0_NS_13basic_istreamIcS2_EE -Wl,-unexported_symbol -Wl,__ZTCNSt3__118basic_stringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE0_NS_14basic_iostreamIcS2_EE -Wl,-unexported_symbol -Wl,__ZTCNSt3__118basic_stringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE16_NS_13basic_ostreamIcS2_EE -Wl,-unexported_symbol -Wl,__ZTTNSt3__118basic_stringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE -Wl,-unexported_symbol -Wl,__ZTVNSt3__115basic_stringbufIcNS_11char_traitsIcEENS_9allocatorIcEEEE -Wl,-unexported_symbol -Wl,__ZTVNSt3__118basic_stringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE -Wl,-unexported_symbol -Wl,__ZTCNSt3__118basic_stringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE8_NS_13basic_ostreamIcS2_EE;
index 580c3f5..8544784 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010, 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2010-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
 #import <WebCore/CertificateInfo.h>
 #import <WebCore/InspectorFrontendClientLocal.h>
 #import <WebCore/LocalizedStrings.h>
-#import <wtf/SoftLinking.h>
 #import <wtf/text/Base64.h>
 
-SOFT_LINK_STAGED_FRAMEWORK(WebInspectorUI, PrivateFrameworks, A)
-
 static const NSUInteger windowStyleMask = NSWindowStyleMaskTitled | NSWindowStyleMaskClosable | NSWindowStyleMaskMiniaturizable | NSWindowStyleMaskResizable | NSWindowStyleMaskFullSizeContentView;
 
 // The time we keep our WebView alive before closing it and its process.
@@ -724,38 +721,42 @@ void WebInspectorProxy::platformStartWindowDrag()
 
 String WebInspectorProxy::inspectorPageURL()
 {
-    // Call the soft link framework function to dlopen it, then [NSBundle bundleWithIdentifier:] will work.
-    WebInspectorUILibrary();
+    NSBundle *bundle = [NSBundle bundleWithIdentifier:@"com.apple.WebInspectorUI"];
+    if (!bundle)
+        return String();
 
-    NSString *path = [[NSBundle bundleWithIdentifier:@"com.apple.WebInspectorUI"] pathForResource:@"Main" ofType:@"html"];
-    ASSERT([path length]);
+    NSString *path = [bundle pathForResource:@"Main" ofType:@"html"];
+    ASSERT(path && path.length);
+    if (!path)
+        return String();
 
-    return [[NSURL fileURLWithPath:path isDirectory:NO] absoluteString];
+    return [NSURL fileURLWithPath:path isDirectory:NO].absoluteString;
 }
 
 String WebInspectorProxy::inspectorTestPageURL()
 {
-    // Call the soft link framework function to dlopen it, then [NSBundle bundleWithIdentifier:] will work.
-    WebInspectorUILibrary();
-
-    NSString *path = [[NSBundle bundleWithIdentifier:@"com.apple.WebInspectorUI"] pathForResource:@"Test" ofType:@"html"];
+    NSBundle *bundle = [NSBundle bundleWithIdentifier:@"com.apple.WebInspectorUI"];
+    if (!bundle)
+        return String();
 
     // We might not have a Test.html in Production builds.
+    NSString *path = [bundle pathForResource:@"Main" ofType:@"html"];
     if (!path)
         return String();
 
-    return [[NSURL fileURLWithPath:path isDirectory:NO] absoluteString];
+    return [NSURL fileURLWithPath:path isDirectory:NO].absoluteString;
 }
 
 String WebInspectorProxy::inspectorBaseURL()
 {
-    // Call the soft link framework function to dlopen it, then [NSBundle bundleWithIdentifier:] will work.
-    WebInspectorUILibrary();
+    NSBundle *bundle = [NSBundle bundleWithIdentifier:@"com.apple.WebInspectorUI"];
+    if (!bundle)
+        return String();
 
-    NSString *path = [[NSBundle bundleWithIdentifier:@"com.apple.WebInspectorUI"] resourcePath];
-    ASSERT([path length]);
+    NSString *path = bundle.resourcePath;
+    ASSERT(path && path.length);
 
-    return [[NSURL fileURLWithPath:path isDirectory:YES] absoluteString];
+    return [NSURL fileURLWithPath:path isDirectory:YES].absoluteString;
 }
 
 } // namespace WebKit
index 9ab4b40..8e41b0d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010, 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2010-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
 #import "WebInspectorUI.h"
 #import "RemoteWebInspectorUI.h"
 
-#import <wtf/SoftLinking.h>
-
-SOFT_LINK_STAGED_FRAMEWORK(WebInspectorUI, PrivateFrameworks, A)
-
 namespace WebKit {
 
 bool WebInspectorUI::canSave()
@@ -40,14 +36,15 @@ bool WebInspectorUI::canSave()
 
 static String webInspectorUILocalizedStringsURL()
 {
-    // Call the soft link framework function to dlopen it, then [NSBundle bundleWithIdentifier:] will work.
-    WebInspectorUILibrary();
-
-    NSString *path = [[NSBundle bundleWithIdentifier:@"com.apple.WebInspectorUI"] pathForResource:@"localizedStrings" ofType:@"js"];
-    if (path.length)
-        return [[NSURL fileURLWithPath:path isDirectory:NO] absoluteString];
-
-    return String();
+    NSBundle *bundle = [NSBundle bundleWithIdentifier:@"com.apple.WebInspectorUI"];
+    if (!bundle)
+        return String();
+
+    NSString *path = [bundle pathForResource:@"localizedStrings" ofType:@"js"];
+    if (!path)
+        return String();
+    
+    return [NSURL fileURLWithPath:path isDirectory:NO].absoluteString;
 }
 
 String WebInspectorUI::localizedStringsURL()
index 20e6c6f..fef6350 100644 (file)
@@ -1,3 +1,20 @@
+2019-02-14  Brian Burg  <bburg@apple.com>
+
+        [Mac] WebInspectorUI.framework does not need to be soft-linked anymore
+        https://bugs.webkit.org/show_bug.cgi?id=194411
+        <rdar://problem/47787614>
+
+        Reviewed by Joseph Pecoraro.
+
+        * Configurations/WebKitLegacy.xcconfig:
+        Conditionalize weak linking to WebInspectorUI.framework for Mac only.
+
+        * WebCoreSupport/WebInspectorClient.mm:
+        (WebInspectorFrontendClient::localizedStringsURL):
+        (-[WebInspectorWindowController inspectorPagePath]):
+        (-[WebInspectorWindowController inspectorTestPagePath]):
+        Rewrite uses of the bundle to exit early if bundle couldn't be loaded.
+
 2019-02-14  Ross Kirsling  <ross.kirsling@sony.com>
 
         [WTF] Add environment variable helpers
index ea1e1dd..5d4f859 100644 (file)
@@ -92,7 +92,10 @@ WK_MOBILE_GESTALT_LDFLAGS_cocoatouch = -lMobileGestalt;
 WK_SECURITY_INTERFACE_LDFLAGS = $(WK_SECURITY_INTERFACE_LDFLAGS_$(WK_PLATFORM_NAME));
 WK_SECURITY_INTERFACE_LDFLAGS_macosx = -framework SecurityInterface;
 
-OTHER_LDFLAGS = -lobjc -lsqlite3 -framework CFNetwork -framework CoreFoundation -framework CoreGraphics -framework CoreText -framework Foundation -framework ImageIO -framework IOKit $(WK_APPKIT_LDFLAGS) $(WK_CARBON_LDFLAGS) $(WK_GRAPHICS_SERVICES_LDFLAGS) $(WK_MOBILE_CORE_SERVICES_LDFLAGS) $(WK_MOBILE_GESTALT_LDFLAGS) $(WK_SECURITY_INTERFACE_LDFLAGS);
+WK_WEBINSPECTORUI_LDFLAGS = $(WK_WEBINSPECTORUI_LDFLAGS_$(WK_PLATFORM_NAME));
+WK_WEBINSPECTORUI_LDFLAGS_macosx = -weak_framework WebInspectorUI;
+
+OTHER_LDFLAGS = -lobjc -lsqlite3 -framework CFNetwork -framework CoreFoundation -framework CoreGraphics -framework CoreText -framework Foundation -framework ImageIO -framework IOKit $(WK_APPKIT_LDFLAGS) $(WK_CARBON_LDFLAGS) $(WK_GRAPHICS_SERVICES_LDFLAGS) $(WK_MOBILE_CORE_SERVICES_LDFLAGS) $(WK_MOBILE_GESTALT_LDFLAGS) $(WK_SECURITY_INTERFACE_LDFLAGS) $(WK_WEBINSPECTORUI_LDFLAGS);
 
 SECTORDER_FLAGS = $(SECTORDER_FLAGS_$(CONFIGURATION));
 SECTORDER_FLAGS_Production[sdk=iphoneos*] = -Wl,-order_file,$(SDKROOT)/AppleInternal/OrderFiles/WebKitLegacy.order;
index 28951a4..6315e68 100644 (file)
 #import <WebCore/ScriptController.h>
 #import <WebKitLegacy/DOMExtensions.h>
 #import <algorithm>
-#import <wtf/SoftLinking.h>
 #import <wtf/text/Base64.h>
 
-SOFT_LINK_STAGED_FRAMEWORK(WebInspectorUI, PrivateFrameworks, A)
-
 using namespace WebCore;
 using namespace Inspector;
 
@@ -224,13 +221,15 @@ void WebInspectorFrontendClient::startWindowDrag()
 
 String WebInspectorFrontendClient::localizedStringsURL()
 {
-    // Call the soft link framework function to dlopen it, then [NSBundle bundleWithIdentifier:] will work.
-    WebInspectorUILibrary();
+    NSBundle *bundle = [NSBundle bundleWithIdentifier:@"com.apple.WebInspectorUI"];
+    if (!bundle)
+        return String();
 
-    NSString *path = [[NSBundle bundleWithIdentifier:@"com.apple.WebInspectorUI"] pathForResource:@"localizedStrings" ofType:@"js"];
-    if ([path length])
-        return [[NSURL fileURLWithPath:path] absoluteString];
-    return String();
+    NSString *path = [bundle pathForResource:@"localizedStrings" ofType:@"js"];
+    if (!path.length)
+        return String();
+    
+    return [NSURL fileURLWithPath:path isDirectory:NO].absoluteString;
 }
 
 void WebInspectorFrontendClient::bringToFront()
@@ -463,26 +462,21 @@ void WebInspectorFrontendClient::append(const String& suggestedURL, const String
 
 - (NSString *)inspectorPagePath
 {
-    // Call the soft link framework function to dlopen it, then [NSBundle bundleWithIdentifier:] will work.
-    WebInspectorUILibrary();
+    NSBundle *bundle = [NSBundle bundleWithIdentifier:@"com.apple.WebInspectorUI"];
+    if (!bundle)
+        return nil;
 
-    NSString *path = [[NSBundle bundleWithIdentifier:@"com.apple.WebInspectorUI"] pathForResource:@"Main" ofType:@"html"];
-    ASSERT([path length]);
-    return path;
+    return [bundle pathForResource:@"Main" ofType:@"html"];
 }
 
 - (NSString *)inspectorTestPagePath
 {
-    // Call the soft link framework function to dlopen it, then [NSBundle bundleWithIdentifier:] will work.
-    WebInspectorUILibrary();
-
-    NSString *path = [[NSBundle bundleWithIdentifier:@"com.apple.WebInspectorUI"] pathForResource:@"Test" ofType:@"html"];
-
-    // We might not have a Test.html in Production builds.
-    if (!path)
+    NSBundle *bundle = [NSBundle bundleWithIdentifier:@"com.apple.WebInspectorUI"];
+    if (!bundle)
         return nil;
 
-    return path;
+    // We might not have a Test.html in Production builds.
+    return [bundle pathForResource:@"Test" ofType:@"html"];
 }
 
 // MARK: -
index 3b94482..d0fce28 100644 (file)
@@ -1,3 +1,19 @@
+2019-02-14  Brian Burg  <bburg@apple.com>
+
+        [Mac] WebInspectorUI.framework does not need to be soft-linked anymore
+        https://bugs.webkit.org/show_bug.cgi?id=194411
+        <rdar://problem/47787614>
+
+        Reviewed by Joseph Pecoraro.
+
+        Remove unnecessary soft linking macro usage.
+
+        * DumpRenderTree/mac/TestRunnerMac.mm:
+        (TestRunner::inspectorTestStubURL):
+        (SOFT_LINK_STAGED_FRAMEWORK): Deleted.
+        * WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm:
+        (WTR::TestRunner::inspectorTestStubURL):
+
 2019-02-14  Aakash Jain  <aakash_jain@apple.com>
 
         [ews-app] status bubble should fetch builder name info from BuilderMapping table
index c1378d9..742517c 100644 (file)
 #import <wtf/RetainPtr.h>
 #import <wtf/WallTime.h>
 
-#if !PLATFORM(IOS_FAMILY)
-#import <wtf/SoftLinking.h>
-#endif
-
 #if PLATFORM(IOS_FAMILY)
 #import "UIKitSPI.h"
 #import <WebKit/WebCoreThread.h>
@@ -89,7 +85,6 @@
 #endif
 
 #if !PLATFORM(IOS_FAMILY)
-SOFT_LINK_STAGED_FRAMEWORK(WebInspectorUI, PrivateFrameworks, A)
 
 @interface CommandValidationTarget : NSObject <NSValidatedUserInterfaceItem>
 {
@@ -834,9 +829,6 @@ JSRetainPtr<JSStringRef> TestRunner::inspectorTestStubURL()
 #if PLATFORM(IOS_FAMILY)
     return nullptr;
 #else
-    // Call the soft link framework function to dlopen it, then CFBundleGetBundleWithIdentifier will work.
-    WebInspectorUILibrary();
-
     CFBundleRef inspectorBundle = CFBundleGetBundleWithIdentifier(CFSTR("com.apple.WebInspectorUI"));
     if (!inspectorBundle)
         return nullptr;
index 5433133..a3be678 100644 (file)
 #import "InjectedBundle.h"
 #import <JavaScriptCore/JSStringRefCF.h>
 
-#if !PLATFORM(IOS_FAMILY)
-#import <wtf/SoftLinking.h>
-
-SOFT_LINK_STAGED_FRAMEWORK(WebInspectorUI, PrivateFrameworks, A)
-#endif
-
 namespace WTR {
 
 void TestRunner::platformInitialize()
@@ -76,9 +70,6 @@ JSRetainPtr<JSStringRef> TestRunner::inspectorTestStubURL()
 #if PLATFORM(IOS_FAMILY)
     return nullptr;
 #else
-    // Call the soft link framework function to dlopen it, then CFBundleGetBundleWithIdentifier will work.
-    WebInspectorUILibrary();
-
     CFBundleRef inspectorBundle = CFBundleGetBundleWithIdentifier(CFSTR("com.apple.WebInspectorUI"));
     if (!inspectorBundle)
         return nullptr;