File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change
1
+ # v8.11.0
2
+ - [ fixed] Race condition crash in FUtilities.m. (#9096 )
3
+
1
4
# v8.10.0
2
5
- [ fixed] Fixed URL handling bug when path is a substring of host. (#8874 )
3
6
Original file line number Diff line number Diff line change @@ -295,10 +295,11 @@ + (NSError *)errorForStatus:(NSString *)status andReason:(NSString *)reason {
295
295
}
296
296
297
297
+ (NSNumber *)intForString : (NSString *)string {
298
- static NSCharacterSet *notDigits = nil ;
299
- if (!notDigits) {
300
- notDigits = [[NSCharacterSet decimalDigitCharacterSet ] invertedSet ];
301
- }
298
+ static dispatch_once_t once;
299
+ static NSCharacterSet *notDigits;
300
+ dispatch_once (&once, ^{
301
+ notDigits = [[NSCharacterSet decimalDigitCharacterSet ] invertedSet ];
302
+ });
302
303
if ([string rangeOfCharacterFromSet: notDigits].length == 0 ) {
303
304
NSInteger num;
304
305
NSScanner *scanner = [NSScanner scannerWithString: string];
You can’t perform that action at this time.
0 commit comments