Changeset 241597 in webkit
- Timestamp:
- Feb 15, 2019 11:01:52 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r241593 r241597 1 2019-02-15 Brian Burg <bburg@apple.com> 2 3 [Mac] WebInspectorUI.framework does not need to be soft-linked anymore 4 https://bugs.webkit.org/show_bug.cgi?id=194411 5 <rdar://problem/47787614> 6 7 Reviewed by Joseph Pecoraro. 8 9 * wtf/cocoa/SoftLinking.h: 10 Remove macro that now has no uses. 11 1 12 2019-02-15 Commit Queue <commit-queue@webkit.org> 2 13 -
trunk/Source/WTF/wtf/cocoa/SoftLinking.h
r241586 r241597 85 85 } 86 86 87 #define SOFT_LINK_STAGED_FRAMEWORK(framework, unstagedLocation, version) \88 static void* framework##Library() \89 { \90 static void* frameworkLibrary = ^{ \91 void* result = dlopen("/System/Library/" #unstagedLocation "/" #framework ".framework/Versions/" #version "/" #framework, RTLD_LAZY); \92 if (!result) \93 result = dlopen("/System/Library/StagedFrameworks/Safari/" #framework ".framework/Versions/" #version "/" #framework, RTLD_LAZY); \94 RELEASE_ASSERT_WITH_MESSAGE(result, "%s", dlerror()); \95 return result; \96 }(); \97 return frameworkLibrary; \98 }99 100 87 #define SOFT_LINK_FRAMEWORK_IN_UMBRELLA(umbrella, framework) \ 101 88 static void* framework##Library() \ -
trunk/Source/WebKit/ChangeLog
r241595 r241597 1 2019-02-15 Brian Burg <bburg@apple.com> 2 3 [Mac] WebInspectorUI.framework does not need to be soft-linked anymore 4 https://bugs.webkit.org/show_bug.cgi?id=194411 5 <rdar://problem/47787614> 6 7 Reviewed by Joseph Pecoraro. 8 9 * Configurations/WebKit.xcconfig: 10 Conditionalize weak linking to WebInspectorUI.framework for Mac only. 11 12 * UIProcess/mac/WebInspectorProxyMac.mm: 13 (WebKit::WebInspectorProxy::inspectorPageURL): 14 (WebKit::WebInspectorProxy::inspectorTestPageURL): 15 (WebKit::WebInspectorProxy::inspectorBaseURL): 16 * WebProcess/WebPage/mac/WebInspectorUIMac.mm: 17 (WebKit::webInspectorUILocalizedStringsURL): 18 Rewrite uses of the bundle to exit early if bundle couldn't be loaded. 19 1 20 2019-02-15 Alex Christensen <achristensen@webkit.org> 2 21 -
trunk/Source/WebKit/Configurations/WebKit.xcconfig
r241586 r241597 128 128 WK_URL_FORMATTING_LDFLAGS_YES = -framework URLFormatting; 129 129 130 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); 130 WK_WEBINSPECTORUI_LDFLAGS = $(WK_WEBINSPECTORUI_LDFLAGS_$(WK_PLATFORM_NAME)); 131 WK_WEBINSPECTORUI_LDFLAGS_macosx = -weak_framework WebInspectorUI; 132 133 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); 131 134 132 135 // Prevent C++ standard library basic_stringstream, operator new, delete and their related exception types from being exported as weak symbols. -
trunk/Source/WebKit/UIProcess/mac/WebInspectorProxyMac.mm
r241586 r241597 1 1 /* 2 * Copyright (C) 2010 , 2014Apple Inc. All rights reserved.2 * Copyright (C) 2010-2019 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 43 43 #import <WebCore/InspectorFrontendClientLocal.h> 44 44 #import <WebCore/LocalizedStrings.h> 45 #import <wtf/SoftLinking.h>46 45 #import <wtf/text/Base64.h> 47 48 SOFT_LINK_STAGED_FRAMEWORK(WebInspectorUI, PrivateFrameworks, A)49 46 50 47 static const NSUInteger windowStyleMask = NSWindowStyleMaskTitled | NSWindowStyleMaskClosable | NSWindowStyleMaskMiniaturizable | NSWindowStyleMaskResizable | NSWindowStyleMaskFullSizeContentView; … … 725 722 String WebInspectorProxy::inspectorPageURL() 726 723 { 727 // Call the soft link framework function to dlopen it, then [NSBundle bundleWithIdentifier:] will work. 728 WebInspectorUILibrary(); 729 730 NSString *path = [[NSBundle bundleWithIdentifier:@"com.apple.WebInspectorUI"] pathForResource:@"Main" ofType:@"html"]; 731 ASSERT([path length]); 732 733 return [[NSURL fileURLWithPath:path isDirectory:NO] absoluteString]; 734 } 735 736 String WebInspectorProxy::inspectorTestPageURL() 737 { 738 // Call the soft link framework function to dlopen it, then [NSBundle bundleWithIdentifier:] will work. 739 WebInspectorUILibrary(); 740 741 NSString *path = [[NSBundle bundleWithIdentifier:@"com.apple.WebInspectorUI"] pathForResource:@"Test" ofType:@"html"]; 742 743 // We might not have a Test.html in Production builds. 724 NSBundle *bundle = [NSBundle bundleWithIdentifier:@"com.apple.WebInspectorUI"]; 725 if (!bundle) 726 return String(); 727 728 NSString *path = [bundle pathForResource:@"Main" ofType:@"html"]; 729 ASSERT(path && path.length); 744 730 if (!path) 745 731 return String(); 746 732 747 return [[NSURL fileURLWithPath:path isDirectory:NO] absoluteString]; 733 return [NSURL fileURLWithPath:path isDirectory:NO].absoluteString; 734 } 735 736 String WebInspectorProxy::inspectorTestPageURL() 737 { 738 NSBundle *bundle = [NSBundle bundleWithIdentifier:@"com.apple.WebInspectorUI"]; 739 if (!bundle) 740 return String(); 741 742 // We might not have a Test.html in Production builds. 743 NSString *path = [bundle pathForResource:@"Test" ofType:@"html"]; 744 if (!path) 745 return String(); 746 747 return [NSURL fileURLWithPath:path isDirectory:NO].absoluteString; 748 748 } 749 749 750 750 String WebInspectorProxy::inspectorBaseURL() 751 751 { 752 // Call the soft link framework function to dlopen it, then [NSBundle bundleWithIdentifier:] will work. 753 WebInspectorUILibrary(); 754 755 NSString *path = [[NSBundle bundleWithIdentifier:@"com.apple.WebInspectorUI"] resourcePath]; 756 ASSERT([path length]); 757 758 return [[NSURL fileURLWithPath:path isDirectory:YES] absoluteString]; 752 NSBundle *bundle = [NSBundle bundleWithIdentifier:@"com.apple.WebInspectorUI"]; 753 if (!bundle) 754 return String(); 755 756 NSString *path = bundle.resourcePath; 757 ASSERT(path && path.length); 758 759 return [NSURL fileURLWithPath:path isDirectory:YES].absoluteString; 759 760 } 760 761 -
trunk/Source/WebKit/WebProcess/WebPage/mac/WebInspectorUIMac.mm
r241586 r241597 1 1 /* 2 * Copyright (C) 2010 , 2014Apple Inc. All rights reserved.2 * Copyright (C) 2010-2019 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 28 28 #import "RemoteWebInspectorUI.h" 29 29 30 #import <wtf/SoftLinking.h>31 32 SOFT_LINK_STAGED_FRAMEWORK(WebInspectorUI, PrivateFrameworks, A)33 34 30 namespace WebKit { 35 31 … … 41 37 static String webInspectorUILocalizedStringsURL() 42 38 { 43 // Call the soft link framework function to dlopen it, then [NSBundle bundleWithIdentifier:] will work. 44 WebInspectorUILibrary(); 39 NSBundle *bundle = [NSBundle bundleWithIdentifier:@"com.apple.WebInspectorUI"]; 40 if (!bundle) 41 return String(); 45 42 46 NSString *path = [ [NSBundle bundleWithIdentifier:@"com.apple.WebInspectorUI"]pathForResource:@"localizedStrings" ofType:@"js"];47 if ( path.length)48 return [[NSURL fileURLWithPath:path isDirectory:NO] absoluteString];49 50 return String();43 NSString *path = [bundle pathForResource:@"localizedStrings" ofType:@"js"]; 44 if (!path) 45 return String(); 46 47 return [NSURL fileURLWithPath:path isDirectory:NO].absoluteString; 51 48 } 52 49 -
trunk/Source/WebKitLegacy/mac/ChangeLog
r241593 r241597 1 2019-02-15 Brian Burg <bburg@apple.com> 2 3 [Mac] WebInspectorUI.framework does not need to be soft-linked anymore 4 https://bugs.webkit.org/show_bug.cgi?id=194411 5 <rdar://problem/47787614> 6 7 Reviewed by Joseph Pecoraro. 8 9 * Configurations/WebKitLegacy.xcconfig: 10 Conditionalize weak linking to WebInspectorUI.framework for Mac only. 11 12 * WebCoreSupport/WebInspectorClient.mm: 13 (WebInspectorFrontendClient::localizedStringsURL): 14 (-[WebInspectorWindowController inspectorPagePath]): 15 (-[WebInspectorWindowController inspectorTestPagePath]): 16 Rewrite uses of the bundle to exit early if bundle couldn't be loaded. 17 1 18 2019-02-15 Commit Queue <commit-queue@webkit.org> 2 19 -
trunk/Source/WebKitLegacy/mac/Configurations/WebKitLegacy.xcconfig
r241586 r241597 93 93 WK_SECURITY_INTERFACE_LDFLAGS_macosx = -framework SecurityInterface; 94 94 95 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); 95 WK_WEBINSPECTORUI_LDFLAGS = $(WK_WEBINSPECTORUI_LDFLAGS_$(WK_PLATFORM_NAME)); 96 WK_WEBINSPECTORUI_LDFLAGS_macosx = -weak_framework WebInspectorUI; 97 98 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); 96 99 97 100 SECTORDER_FLAGS = $(SECTORDER_FLAGS_$(CONFIGURATION)); -
trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebInspectorClient.mm
r241586 r241597 54 54 #import <WebKitLegacy/DOMExtensions.h> 55 55 #import <algorithm> 56 #import <wtf/SoftLinking.h>57 56 #import <wtf/text/Base64.h> 58 59 SOFT_LINK_STAGED_FRAMEWORK(WebInspectorUI, PrivateFrameworks, A)60 57 61 58 using namespace WebCore; … … 225 222 String WebInspectorFrontendClient::localizedStringsURL() 226 223 { 227 // Call the soft link framework function to dlopen it, then [NSBundle bundleWithIdentifier:] will work. 228 WebInspectorUILibrary(); 229 230 NSString *path = [[NSBundle bundleWithIdentifier:@"com.apple.WebInspectorUI"] pathForResource:@"localizedStrings" ofType:@"js"]; 231 if ([path length]) 232 return [[NSURL fileURLWithPath:path] absoluteString]; 233 return String(); 224 NSBundle *bundle = [NSBundle bundleWithIdentifier:@"com.apple.WebInspectorUI"]; 225 if (!bundle) 226 return String(); 227 228 NSString *path = [bundle pathForResource:@"localizedStrings" ofType:@"js"]; 229 if (!path.length) 230 return String(); 231 232 return [NSURL fileURLWithPath:path isDirectory:NO].absoluteString; 234 233 } 235 234 … … 464 463 - (NSString *)inspectorPagePath 465 464 { 466 // Call the soft link framework function to dlopen it, then [NSBundle bundleWithIdentifier:] will work. 467 WebInspectorUILibrary(); 468 469 NSString *path = [[NSBundle bundleWithIdentifier:@"com.apple.WebInspectorUI"] pathForResource:@"Main" ofType:@"html"]; 470 ASSERT([path length]); 471 return path; 465 NSBundle *bundle = [NSBundle bundleWithIdentifier:@"com.apple.WebInspectorUI"]; 466 if (!bundle) 467 return nil; 468 469 return [bundle pathForResource:@"Main" ofType:@"html"]; 472 470 } 473 471 474 472 - (NSString *)inspectorTestPagePath 475 473 { 476 // Call the soft link framework function to dlopen it, then [NSBundle bundleWithIdentifier:] will work. 477 WebInspectorUILibrary(); 478 479 NSString *path = [[NSBundle bundleWithIdentifier:@"com.apple.WebInspectorUI"] pathForResource:@"Test" ofType:@"html"]; 474 NSBundle *bundle = [NSBundle bundleWithIdentifier:@"com.apple.WebInspectorUI"]; 475 if (!bundle) 476 return nil; 480 477 481 478 // We might not have a Test.html in Production builds. 482 if (!path) 483 return nil; 484 485 return path; 479 return [bundle pathForResource:@"Test" ofType:@"html"]; 486 480 } 487 481 -
trunk/Tools/ChangeLog
r241593 r241597 1 2019-02-15 Brian Burg <bburg@apple.com> 2 3 [Mac] WebInspectorUI.framework does not need to be soft-linked anymore 4 https://bugs.webkit.org/show_bug.cgi?id=194411 5 <rdar://problem/47787614> 6 7 Reviewed by Joseph Pecoraro. 8 9 Remove unnecessary soft linking macro usage. 10 11 * DumpRenderTree/mac/TestRunnerMac.mm: 12 (TestRunner::inspectorTestStubURL): 13 (SOFT_LINK_STAGED_FRAMEWORK): Deleted. 14 * WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm: 15 (WTR::TestRunner::inspectorTestStubURL): 16 1 17 2019-02-15 Commit Queue <commit-queue@webkit.org> 2 18 -
trunk/Tools/DumpRenderTree/mac/TestRunnerMac.mm
r241586 r241597 78 78 #import <wtf/WallTime.h> 79 79 80 #if !PLATFORM(IOS_FAMILY)81 #import <wtf/SoftLinking.h>82 #endif83 84 80 #if PLATFORM(IOS_FAMILY) 85 81 #import "UIKitSPI.h" … … 90 86 91 87 #if !PLATFORM(IOS_FAMILY) 92 SOFT_LINK_STAGED_FRAMEWORK(WebInspectorUI, PrivateFrameworks, A)93 88 94 89 @interface CommandValidationTarget : NSObject <NSValidatedUserInterfaceItem> … … 835 830 return nullptr; 836 831 #else 837 // Call the soft link framework function to dlopen it, then CFBundleGetBundleWithIdentifier will work.838 WebInspectorUILibrary();839 840 832 CFBundleRef inspectorBundle = CFBundleGetBundleWithIdentifier(CFSTR("com.apple.WebInspectorUI")); 841 833 if (!inspectorBundle) -
trunk/Tools/WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm
r241586 r241597 30 30 #import "InjectedBundle.h" 31 31 #import <JavaScriptCore/JSStringRefCF.h> 32 33 #if !PLATFORM(IOS_FAMILY)34 #import <wtf/SoftLinking.h>35 36 SOFT_LINK_STAGED_FRAMEWORK(WebInspectorUI, PrivateFrameworks, A)37 #endif38 32 39 33 namespace WTR { … … 77 71 return nullptr; 78 72 #else 79 // Call the soft link framework function to dlopen it, then CFBundleGetBundleWithIdentifier will work.80 WebInspectorUILibrary();81 82 73 CFBundleRef inspectorBundle = CFBundleGetBundleWithIdentifier(CFSTR("com.apple.WebInspectorUI")); 83 74 if (!inspectorBundle)
Note: See TracChangeset
for help on using the changeset viewer.