Add checks to thread record deserialization that can be resymbolicated.

This commit is contained in:
Matthew Chen 2020-06-30 14:29:51 -03:00
parent bcbb301ac8
commit 781ffa5741
6 changed files with 19 additions and 1 deletions

View File

@ -16,6 +16,7 @@ class NotificationServiceExtensionContext: NSObject, AppContext {
var shouldProcessIncomingMessages: Bool { true }
var hasUI: Bool { false }
func canPresentNotifications() -> Bool { true }
var didLastLaunchCrash: Bool { false }
let appLaunchTime = Date()
lazy var buildTime: Date = {

View File

@ -414,6 +414,11 @@ NSString *const ReportedApplicationStateDidChangeNotification = @"ReportedApplic
return YES;
}
- (BOOL)didLastLaunchCrash
{
return SignalApp.sharedApp.didLastLaunchCrash;
}
@end
NS_ASSUME_NONNULL_END

View File

@ -580,7 +580,7 @@ public extension ThreadRecord {
init(row: Row) {
// TODO: Remove these temporary checks.
if ThreadRecord.hasChecked.tryToSetFlag() {
if ThreadRecord.hasChecked.tryToSetFlag() || CurrentAppContext().didLastLaunchCrash {
ThreadRecord.check(checker: ThreadRowCheckerImpl(row: row))
}

View File

@ -194,6 +194,11 @@ NS_ASSUME_NONNULL_BEGIN
return YES;
}
- (BOOL)didLastLaunchCrash
{
return NO;
}
@end
#endif

View File

@ -129,6 +129,8 @@ NSString *NSStringForUIApplicationState(UIApplicationState value);
@property (nonatomic, readonly) BOOL hasUI;
@property (nonatomic, readonly) BOOL didLastLaunchCrash;
@end
id<AppContext> CurrentAppContext(void);

View File

@ -318,6 +318,11 @@ NS_ASSUME_NONNULL_BEGIN
return YES;
}
- (BOOL)didLastLaunchCrash
{
return NO;
}
@end
NS_ASSUME_NONNULL_END