Merge branch 'mkirk/overzealous-assert'

pull/1/head
Michael Kirk 7 years ago
commit d070693b72

@ -205,7 +205,7 @@ class AppStoreVersionService: NSObject {
let task = URLSession.ephemeral.dataTask(with: lookupURL) { (data, _, error) in let task = URLSession.ephemeral.dataTask(with: lookupURL) { (data, _, error) in
guard let data = data else { guard let data = data else {
owsFail("\(self.logTag) in \(#function) data was unexpectedly nil") Logger.warn("\(self.logTag) in \(#function) data was unexpectedly nil")
reject(OWSErrorMakeUnableToProcessServerResponseError()) reject(OWSErrorMakeUnableToProcessServerResponseError())
return return
} }
@ -214,7 +214,7 @@ class AppStoreVersionService: NSObject {
let decoder = JSONDecoder() let decoder = JSONDecoder()
let resultSet = try decoder.decode(AppStoreLookupResultSet.self, from: data) let resultSet = try decoder.decode(AppStoreLookupResultSet.self, from: data)
guard let appStoreRecord = resultSet.results.first else { guard let appStoreRecord = resultSet.results.first else {
owsFail("\(self.logTag) in \(#function) record was unexpectedly nil") Logger.warn("\(self.logTag) in \(#function) record was unexpectedly nil")
reject(OWSErrorMakeUnableToProcessServerResponseError()) reject(OWSErrorMakeUnableToProcessServerResponseError())
return return
} }

@ -81,10 +81,10 @@ NS_ASSUME_NONNULL_BEGIN
success:(void (^)(NSSet<SignalRecipient *> *recipients))success success:(void (^)(NSSet<SignalRecipient *> *recipients))success
failure:(void (^)(NSError *error))failure failure:(void (^)(NSError *error))failure
{ {
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ OWSLegacyContactDiscoveryOperation *operation =
OWSLegacyContactDiscoveryOperation *operation = [[OWSLegacyContactDiscoveryOperation alloc] initWithRecipientIdsToLookup:recipientIdsToLookup.allObjects];
[[OWSLegacyContactDiscoveryOperation alloc] initWithRecipientIdsToLookup:recipientIdsToLookup.allObjects];
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
NSArray<NSOperation *> *operationAndDependencies = [operation.dependencies arrayByAddingObject:operation]; NSArray<NSOperation *> *operationAndDependencies = [operation.dependencies arrayByAddingObject:operation];
[self.contactIntersectionQueue addOperations:operationAndDependencies waitUntilFinished:YES]; [self.contactIntersectionQueue addOperations:operationAndDependencies waitUntilFinished:YES];

@ -145,7 +145,6 @@ NS_ASSUME_NONNULL_BEGIN
- (CGFloat)statusBarHeight - (CGFloat)statusBarHeight
{ {
OWSFail(@"%@ in %s unexpected for share extension", self.logTag, __PRETTY_FUNCTION__);
return 20; return 20;
} }

Loading…
Cancel
Save