WebKit Bugzilla
Attachment 362056 Details for
Bug 194411
: [Mac] WebInspectorUI.framework does not need to be soft-linked anymore
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-194411-20190214132603.patch (text/plain), 20.88 KB, created by
BJ Burg
on 2019-02-14 13:26:04 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
BJ Burg
Created:
2019-02-14 13:26:04 PST
Size:
20.88 KB
patch
obsolete
>Subversion Revision: 241557 >diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog >index faaa1a8fac2e2be357872c396bc99b352f7795a4..e6362028afdb39b08948abd0465fb17830d6bb17 100644 >--- a/Source/WTF/ChangeLog >+++ b/Source/WTF/ChangeLog >@@ -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 NOBODY (OOPS!). >+ >+ * wtf/cocoa/SoftLinking.h: >+ Remove macro that now has no uses. >+ > 2019-02-13 Yusuke Suzuki <ysuzuki@apple.com> > > We should only make rope strings when concatenating strings long enough. >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 008f9d6544055b05bc01b4837bccc89989ac375c..b5e83593a4cf5c1061a452f057bbe79d2c58968c 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -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 NOBODY (OOPS!). >+ >+ * 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 Chris Dumez <cdumez@apple.com> > > [PSON] Introduce a WebContent Process cache >diff --git a/Source/WebKitLegacy/mac/ChangeLog b/Source/WebKitLegacy/mac/ChangeLog >index a0f8691eb377d1450cfc8127704875f347ceafb6..1192d40ead91fed6cd899e0878832bc33efbe44a 100644 >--- a/Source/WebKitLegacy/mac/ChangeLog >+++ b/Source/WebKitLegacy/mac/ChangeLog >@@ -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 NOBODY (OOPS!). >+ >+ * 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-12 Wenson Hsieh <wenson_hsieh@apple.com> > > Allow pages to trigger programmatic paste from script on iOS >diff --git a/Source/WTF/wtf/cocoa/SoftLinking.h b/Source/WTF/wtf/cocoa/SoftLinking.h >index e008322375a72933263b0bd4ecae6abfc78db539..47fb78ad826ecc0ad84975eee03985c24f4034a6 100644 >--- a/Source/WTF/wtf/cocoa/SoftLinking.h >+++ b/Source/WTF/wtf/cocoa/SoftLinking.h >@@ -84,19 +84,6 @@ > 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() \ > { \ >diff --git a/Source/WebKit/Configurations/WebKit.xcconfig b/Source/WebKit/Configurations/WebKit.xcconfig >index d9296a30be86a3c869237cf65a8623c9862a412e..479bd6d5b88b2eab1ac59886c678883d89769d95 100644 >--- a/Source/WebKit/Configurations/WebKit.xcconfig >+++ b/Source/WebKit/Configurations/WebKit.xcconfig >@@ -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; >diff --git a/Source/WebKit/UIProcess/mac/WebInspectorProxyMac.mm b/Source/WebKit/UIProcess/mac/WebInspectorProxyMac.mm >index 580c3f5822e03c925ae910d89cbb52d7b19c52a4..85447847f7e6b7e2f65fe66541b6498c2394e8b0 100644 >--- a/Source/WebKit/UIProcess/mac/WebInspectorProxyMac.mm >+++ b/Source/WebKit/UIProcess/mac/WebInspectorProxyMac.mm >@@ -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 >@@ -42,11 +42,8 @@ > #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 >diff --git a/Source/WebKit/WebProcess/WebPage/mac/WebInspectorUIMac.mm b/Source/WebKit/WebProcess/WebPage/mac/WebInspectorUIMac.mm >index 9ab4b40d09566ba1e13bc5d4eaa16434179c8937..8e41b0d15537c87080e54dc8511328bf3471b7f7 100644 >--- a/Source/WebKit/WebProcess/WebPage/mac/WebInspectorUIMac.mm >+++ b/Source/WebKit/WebProcess/WebPage/mac/WebInspectorUIMac.mm >@@ -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 >@@ -27,10 +27,6 @@ > #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() >diff --git a/Source/WebKitLegacy/mac/Configurations/WebKitLegacy.xcconfig b/Source/WebKitLegacy/mac/Configurations/WebKitLegacy.xcconfig >index ea1e1ddbc7150f7c5afa059333a2bce5fc81b7e1..5d4f859c391025e0b264beaac2d08a9121e1e41d 100644 >--- a/Source/WebKitLegacy/mac/Configurations/WebKitLegacy.xcconfig >+++ b/Source/WebKitLegacy/mac/Configurations/WebKitLegacy.xcconfig >@@ -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; >diff --git a/Source/WebKitLegacy/mac/WebCoreSupport/WebInspectorClient.mm b/Source/WebKitLegacy/mac/WebCoreSupport/WebInspectorClient.mm >index 28951a48c7dc472301210aa6625e58e164697c55..6315e68b6296bc7d6468d0f6197caa5d23b68856 100644 >--- a/Source/WebKitLegacy/mac/WebCoreSupport/WebInspectorClient.mm >+++ b/Source/WebKitLegacy/mac/WebCoreSupport/WebInspectorClient.mm >@@ -53,11 +53,8 @@ > #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)dealloc > > - (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: - >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index d9750ee42f028baa8311312f45a02594f64532d2..a3b89e48fad9685bc1926e545fbf99f0ed9bd638 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -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 NOBODY (OOPS!). >+ >+ 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 Chris Dumez <cdumez@apple.com> > > [PSON] Introduce a WebContent Process cache >diff --git a/Tools/DumpRenderTree/mac/TestRunnerMac.mm b/Tools/DumpRenderTree/mac/TestRunnerMac.mm >index c1378d9e3c57c7f73e1284fb686514d743dbfd76..742517cff710520bdaaa17af22ea7b9984a9de33 100644 >--- a/Tools/DumpRenderTree/mac/TestRunnerMac.mm >+++ b/Tools/DumpRenderTree/mac/TestRunnerMac.mm >@@ -77,10 +77,6 @@ > #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; >diff --git a/Tools/WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm b/Tools/WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm >index 54331330739feaa640578a041378e1ede9353150..a3be678a520df32a22b59ecba70209556e25d4c2 100644 >--- a/Tools/WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm >+++ b/Tools/WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm >@@ -30,12 +30,6 @@ > #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;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194411
:
361440
|
362046
|
362056
|
362126