Changeset 246726 in webkit
- Timestamp:
- Jun 23, 2019 8:44:50 PM (5 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r246725 r246726 1 2019-06-23 Dan Bernstein <mitz@apple.com> 2 3 Platform font class gets needlessly initialized in the Networking process 4 https://bugs.webkit.org/show_bug.cgi?id=199140 5 6 Reviewed by Tim Horton. 7 8 * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in: Revert a change that was made in 9 r246702, which is not needed anymore. 10 * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb: Ditto. 11 12 * Shared/Cocoa/ArgumentCodersCocoa.mm: 13 (IPC::platformColorClass): Added getter that uses NSClassFromString, thereby avoiding 14 initializing the class. 15 (IPC::platformFontClass): Ditto. 16 (IPC::typeFromObject): Changed to use the above getters instead of +class. 17 1 18 2019-06-23 Simon Fraser <simon.fraser@apple.com> 2 19 -
trunk/Source/WebKit/NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in
r246702 r246726 96 96 (allow file-read* 97 97 ;; Basic system paths 98 (subpath "/Library/Fonts") ;; Needed to serialize font data types <rdar://problem/50164879>99 98 (subpath "/Library/Frameworks") 100 99 (subpath "/Library/Managed Preferences") -
trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb
r246702 r246726 73 73 ) 74 74 75 ;; Read-only preferences and data76 (allow file-read*77 ;; Basic system paths78 (subpath "/Library/Fonts") ;; Needed to serialize font data types <rdar://problem/50164879>79 )80 81 75 ;; Security framework 82 76 (allow mach-lookup -
trunk/Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm
r243116 r246726 78 78 #pragma mark - Helpers 79 79 80 static Class platformColorClass() 81 { 82 static Class colorClass; 83 static std::once_flag flag; 84 std::call_once(flag, [] { 85 #if USE(APPKIT) 86 colorClass = NSClassFromString(@"NSColor"); 87 #else 88 colorClass = NSClassFromString(@"UIColor"); 89 #endif 90 }); 91 return colorClass; 92 } 93 94 static Class platformFontClass() 95 { 96 static Class fontClass; 97 static std::once_flag flag; 98 std::call_once(flag, [] { 99 #if USE(APPKIT) 100 fontClass = NSClassFromString(@"NSFont"); 101 #else 102 fontClass = NSClassFromString(@"UIFont"); 103 #endif 104 }); 105 return fontClass; 106 } 107 80 108 static NSType typeFromObject(id object) 81 109 { … … 85 113 if ([object isKindOfClass:[NSArray class]]) 86 114 return NSType::Array; 87 if ([object isKindOfClass: [PlatformColor class]])115 if ([object isKindOfClass:platformColorClass()]) 88 116 return NSType::Color; 89 117 if ([object isKindOfClass:[NSData class]]) … … 93 121 if ([object isKindOfClass:[NSDictionary class]]) 94 122 return NSType::Dictionary; 95 if ([object isKindOfClass: [PlatformFont class]])123 if ([object isKindOfClass:platformFontClass()]) 96 124 return NSType::Font; 97 125 if ([object isKindOfClass:[NSNumber class]])
Note: See TracChangeset
for help on using the changeset viewer.