Title: [241586] trunk

Diff

Modified: trunk/Source/WTF/ChangeLog (241585 => 241586)


--- trunk/Source/WTF/ChangeLog	2019-02-15 14:24:21 UTC (rev 241585)
+++ trunk/Source/WTF/ChangeLog	2019-02-15 16:11:06 UTC (rev 241586)
@@ -1,3 +1,16 @@
+2019-02-15  Truitt Savell  <[email protected]>
+
+        Unreviewed, rolling out r241564.
+
+        Caused 50+ Timeouts on Mac WK2, mostly in the http/ directory
+
+        Reverted changeset:
+
+        "[Mac] WebInspectorUI.framework does not need to be soft-
+        linked anymore"
+        https://bugs.webkit.org/show_bug.cgi?id=194411
+        https://trac.webkit.org/changeset/241564
+
 2019-02-15  Dominik Infuehr  <[email protected]>
 
         Fix deadlock on Linux/x64 between SamplingProfiler and VMTraps

Modified: trunk/Source/WTF/wtf/cocoa/SoftLinking.h (241585 => 241586)


--- trunk/Source/WTF/wtf/cocoa/SoftLinking.h	2019-02-15 14:24:21 UTC (rev 241585)
+++ trunk/Source/WTF/wtf/cocoa/SoftLinking.h	2019-02-15 16:11:06 UTC (rev 241586)
@@ -84,6 +84,19 @@
         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() \
     { \

Modified: trunk/Source/WebKit/ChangeLog (241585 => 241586)


--- trunk/Source/WebKit/ChangeLog	2019-02-15 14:24:21 UTC (rev 241585)
+++ trunk/Source/WebKit/ChangeLog	2019-02-15 16:11:06 UTC (rev 241586)
@@ -1,3 +1,16 @@
+2019-02-15  Truitt Savell  <[email protected]>
+
+        Unreviewed, rolling out r241564.
+
+        Caused 50+ Timeouts on Mac WK2, mostly in the http/ directory
+
+        Reverted changeset:
+
+        "[Mac] WebInspectorUI.framework does not need to be soft-
+        linked anymore"
+        https://bugs.webkit.org/show_bug.cgi?id=194411
+        https://trac.webkit.org/changeset/241564
+
 2019-02-15  Carlos Garcia Campos  <[email protected]>
 
         Unreviewed. Fix GTK+ build after r241556

Modified: trunk/Source/WebKit/Configurations/WebKit.xcconfig (241585 => 241586)


--- trunk/Source/WebKit/Configurations/WebKit.xcconfig	2019-02-15 14:24:21 UTC (rev 241585)
+++ trunk/Source/WebKit/Configurations/WebKit.xcconfig	2019-02-15 16:11:06 UTC (rev 241586)
@@ -127,11 +127,8 @@
 WK_URL_FORMATTING_LDFLAGS = $(WK_URL_FORMATTING_LDFLAGS_$(WK_HAVE_URL_FORMATTING));
 WK_URL_FORMATTING_LDFLAGS_YES = -framework URLFormatting;
 
-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);
 
-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__18functionIFvN7WebCore12PolicyActionEE
 ED1Ev -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_traitsIcEE
 NS_9allocatorIcEEEE8_NS_13basic_ostreamIcS2_EE;
 

Modified: trunk/Source/WebKit/UIProcess/mac/WebInspectorProxyMac.mm (241585 => 241586)


--- trunk/Source/WebKit/UIProcess/mac/WebInspectorProxyMac.mm	2019-02-15 14:24:21 UTC (rev 241585)
+++ trunk/Source/WebKit/UIProcess/mac/WebInspectorProxyMac.mm	2019-02-15 16:11:06 UTC (rev 241586)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010-2019 Apple Inc. All rights reserved.
+ * Copyright (C) 2010, 2014 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -42,8 +42,11 @@
 #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.
@@ -721,42 +724,38 @@
 
 String WebInspectorProxy::inspectorPageURL()
 {
-    NSBundle *bundle = [NSBundle bundleWithIdentifier:@"com.apple.WebInspectorUI"];
-    if (!bundle)
-        return String();
+    // Call the soft link framework function to dlopen it, then [NSBundle bundleWithIdentifier:] will work.
+    WebInspectorUILibrary();
 
-    NSString *path = [bundle pathForResource:@"Main" ofType:@"html"];
-    ASSERT(path && path.length);
-    if (!path)
-        return String();
+    NSString *path = [[NSBundle bundleWithIdentifier:@"com.apple.WebInspectorUI"] pathForResource:@"Main" ofType:@"html"];
+    ASSERT([path length]);
 
-    return [NSURL fileURLWithPath:path isDirectory:NO].absoluteString;
+    return [[NSURL fileURLWithPath:path isDirectory:NO] absoluteString];
 }
 
 String WebInspectorProxy::inspectorTestPageURL()
 {
-    NSBundle *bundle = [NSBundle bundleWithIdentifier:@"com.apple.WebInspectorUI"];
-    if (!bundle)
-        return String();
+    // 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.
-    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()
 {
-    NSBundle *bundle = [NSBundle bundleWithIdentifier:@"com.apple.WebInspectorUI"];
-    if (!bundle)
-        return String();
+    // Call the soft link framework function to dlopen it, then [NSBundle bundleWithIdentifier:] will work.
+    WebInspectorUILibrary();
 
-    NSString *path = bundle.resourcePath;
-    ASSERT(path && path.length);
+    NSString *path = [[NSBundle bundleWithIdentifier:@"com.apple.WebInspectorUI"] resourcePath];
+    ASSERT([path length]);
 
-    return [NSURL fileURLWithPath:path isDirectory:YES].absoluteString;
+    return [[NSURL fileURLWithPath:path isDirectory:YES] absoluteString];
 }
 
 } // namespace WebKit

Modified: trunk/Source/WebKit/WebProcess/WebPage/mac/WebInspectorUIMac.mm (241585 => 241586)


--- trunk/Source/WebKit/WebProcess/WebPage/mac/WebInspectorUIMac.mm	2019-02-15 14:24:21 UTC (rev 241585)
+++ trunk/Source/WebKit/WebProcess/WebPage/mac/WebInspectorUIMac.mm	2019-02-15 16:11:06 UTC (rev 241586)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010-2019 Apple Inc. All rights reserved.
+ * Copyright (C) 2010, 2014 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -27,6 +27,10 @@
 #import "WebInspectorUI.h"
 #import "RemoteWebInspectorUI.h"
 
+#import <wtf/SoftLinking.h>
+
+SOFT_LINK_STAGED_FRAMEWORK(WebInspectorUI, PrivateFrameworks, A)
+
 namespace WebKit {
 
 bool WebInspectorUI::canSave()
@@ -36,15 +40,14 @@
 
 static String webInspectorUILocalizedStringsURL()
 {
-    NSBundle *bundle = [NSBundle bundleWithIdentifier:@"com.apple.WebInspectorUI"];
-    if (!bundle)
-        return String();
+    // Call the soft link framework function to dlopen it, then [NSBundle bundleWithIdentifier:] will work.
+    WebInspectorUILibrary();
 
-    NSString *path = [bundle pathForResource:@"localizedStrings" ofType:@"js"];
-    if (!path)
-        return String();
-    
-    return [NSURL fileURLWithPath:path isDirectory:NO].absoluteString;
+    NSString *path = [[NSBundle bundleWithIdentifier:@"com.apple.WebInspectorUI"] pathForResource:@"localizedStrings" ofType:@"js"];
+    if (path.length)
+        return [[NSURL fileURLWithPath:path isDirectory:NO] absoluteString];
+
+    return String();
 }
 
 String WebInspectorUI::localizedStringsURL()

Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (241585 => 241586)


--- trunk/Source/WebKitLegacy/mac/ChangeLog	2019-02-15 14:24:21 UTC (rev 241585)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog	2019-02-15 16:11:06 UTC (rev 241586)
@@ -1,3 +1,16 @@
+2019-02-15  Truitt Savell  <[email protected]>
+
+        Unreviewed, rolling out r241564.
+
+        Caused 50+ Timeouts on Mac WK2, mostly in the http/ directory
+
+        Reverted changeset:
+
+        "[Mac] WebInspectorUI.framework does not need to be soft-
+        linked anymore"
+        https://bugs.webkit.org/show_bug.cgi?id=194411
+        https://trac.webkit.org/changeset/241564
+
 2019-02-14  Brian Burg  <[email protected]>
 
         [Mac] WebInspectorUI.framework does not need to be soft-linked anymore

Modified: trunk/Source/WebKitLegacy/mac/Configurations/WebKitLegacy.xcconfig (241585 => 241586)


--- trunk/Source/WebKitLegacy/mac/Configurations/WebKitLegacy.xcconfig	2019-02-15 14:24:21 UTC (rev 241585)
+++ trunk/Source/WebKitLegacy/mac/Configurations/WebKitLegacy.xcconfig	2019-02-15 16:11:06 UTC (rev 241586)
@@ -92,11 +92,8 @@
 WK_SECURITY_INTERFACE_LDFLAGS = $(WK_SECURITY_INTERFACE_LDFLAGS_$(WK_PLATFORM_NAME));
 WK_SECURITY_INTERFACE_LDFLAGS_macosx = -framework SecurityInterface;
 
-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);
 
-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;
 SECTORDER_FLAGS_Production[sdk=macosx*] = -Wl,-order_file,mac/WebKit.order;

Modified: trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebInspectorClient.mm (241585 => 241586)


--- trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebInspectorClient.mm	2019-02-15 14:24:21 UTC (rev 241585)
+++ trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebInspectorClient.mm	2019-02-15 16:11:06 UTC (rev 241586)
@@ -53,8 +53,11 @@
 #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;
 
@@ -221,15 +224,13 @@
 
 String WebInspectorFrontendClient::localizedStringsURL()
 {
-    NSBundle *bundle = [NSBundle bundleWithIdentifier:@"com.apple.WebInspectorUI"];
-    if (!bundle)
-        return String();
+    // Call the soft link framework function to dlopen it, then [NSBundle bundleWithIdentifier:] will work.
+    WebInspectorUILibrary();
 
-    NSString *path = [bundle pathForResource:@"localizedStrings" ofType:@"js"];
-    if (!path.length)
-        return String();
-    
-    return [NSURL fileURLWithPath:path isDirectory:NO].absoluteString;
+    NSString *path = [[NSBundle bundleWithIdentifier:@"com.apple.WebInspectorUI"] pathForResource:@"localizedStrings" ofType:@"js"];
+    if ([path length])
+        return [[NSURL fileURLWithPath:path] absoluteString];
+    return String();
 }
 
 void WebInspectorFrontendClient::bringToFront()
@@ -462,21 +463,26 @@
 
 - (NSString *)inspectorPagePath
 {
-    NSBundle *bundle = [NSBundle bundleWithIdentifier:@"com.apple.WebInspectorUI"];
-    if (!bundle)
-        return nil;
+    // Call the soft link framework function to dlopen it, then [NSBundle bundleWithIdentifier:] will work.
+    WebInspectorUILibrary();
 
-    return [bundle pathForResource:@"Main" ofType:@"html"];
+    NSString *path = [[NSBundle bundleWithIdentifier:@"com.apple.WebInspectorUI"] pathForResource:@"Main" ofType:@"html"];
+    ASSERT([path length]);
+    return path;
 }
 
 - (NSString *)inspectorTestPagePath
 {
-    NSBundle *bundle = [NSBundle bundleWithIdentifier:@"com.apple.WebInspectorUI"];
-    if (!bundle)
+    // 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)
         return nil;
 
-    // We might not have a Test.html in Production builds.
-    return [bundle pathForResource:@"Test" ofType:@"html"];
+    return path;
 }
 
 // MARK: -

Modified: trunk/Tools/ChangeLog (241585 => 241586)


--- trunk/Tools/ChangeLog	2019-02-15 14:24:21 UTC (rev 241585)
+++ trunk/Tools/ChangeLog	2019-02-15 16:11:06 UTC (rev 241586)
@@ -1,3 +1,16 @@
+2019-02-15  Truitt Savell  <[email protected]>
+
+        Unreviewed, rolling out r241564.
+
+        Caused 50+ Timeouts on Mac WK2, mostly in the http/ directory
+
+        Reverted changeset:
+
+        "[Mac] WebInspectorUI.framework does not need to be soft-
+        linked anymore"
+        https://bugs.webkit.org/show_bug.cgi?id=194411
+        https://trac.webkit.org/changeset/241564
+
 2019-02-15  Saam barati  <[email protected]>
 
         [WebAssembly] Write a new register allocator for Air O0 and make BBQ use it

Modified: trunk/Tools/DumpRenderTree/mac/TestRunnerMac.mm (241585 => 241586)


--- trunk/Tools/DumpRenderTree/mac/TestRunnerMac.mm	2019-02-15 14:24:21 UTC (rev 241585)
+++ trunk/Tools/DumpRenderTree/mac/TestRunnerMac.mm	2019-02-15 16:11:06 UTC (rev 241586)
@@ -77,6 +77,10 @@
 #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>
@@ -85,6 +89,7 @@
 #endif
 
 #if !PLATFORM(IOS_FAMILY)
+SOFT_LINK_STAGED_FRAMEWORK(WebInspectorUI, PrivateFrameworks, A)
 
 @interface CommandValidationTarget : NSObject <NSValidatedUserInterfaceItem>
 {
@@ -829,6 +834,9 @@
 #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;

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm (241585 => 241586)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm	2019-02-15 14:24:21 UTC (rev 241585)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm	2019-02-15 16:11:06 UTC (rev 241586)
@@ -30,6 +30,12 @@
 #import "InjectedBundle.h"
 #import <_javascript_Core/JSStringRefCF.h>
 
+#if !PLATFORM(IOS_FAMILY)
+#import <wtf/SoftLinking.h>
+
+SOFT_LINK_STAGED_FRAMEWORK(WebInspectorUI, PrivateFrameworks, A)
+#endif
+
 namespace WTR {
 
 void TestRunner::platformInitialize()
@@ -70,6 +76,9 @@
 #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;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to