-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add setting to disable OOM reporting (#345)
Disables background OOM reporting by default
- Loading branch information
Showing
14 changed files
with
143 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
...s/fixtures/ios-swift-cocoapods/iOSTestApp/scenarios/ReportBackgroundOOMsEnabledScenario.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#import "Scenario.h" | ||
|
||
@interface ReportBackgroundOOMsEnabledScenario : Scenario | ||
|
||
@end |
19 changes: 19 additions & 0 deletions
19
...s/fixtures/ios-swift-cocoapods/iOSTestApp/scenarios/ReportBackgroundOOMsEnabledScenario.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#import "ReportBackgroundOOMsEnabledScenario.h" | ||
#import <signal.h> | ||
|
||
@implementation ReportBackgroundOOMsEnabledScenario | ||
|
||
- (void)startBugsnag { | ||
self.config.shouldAutoCaptureSessions = NO; | ||
self.config.reportBackgroundOOMs = YES; | ||
[super startBugsnag]; | ||
} | ||
|
||
- (void)run { | ||
[Bugsnag leaveBreadcrumbWithMessage:@"Crumb left before crash"]; | ||
[Bugsnag configuration].releaseStage = @"beta"; | ||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(6 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ | ||
raise(SIGKILL); | ||
}); | ||
} | ||
@end |
5 changes: 5 additions & 0 deletions
5
...ft-cocoapods/iOSTestApp/scenarios/ReportOOMsDisabledReportBackgroundOOMsEnabledScenario.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#import "Scenario.h" | ||
|
||
@interface ReportOOMsDisabledReportBackgroundOOMsEnabledScenario : Scenario | ||
|
||
@end |
18 changes: 18 additions & 0 deletions
18
...ft-cocoapods/iOSTestApp/scenarios/ReportOOMsDisabledReportBackgroundOOMsEnabledScenario.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#import "ReportOOMsDisabledReportBackgroundOOMsEnabledScenario.h" | ||
#import <signal.h> | ||
|
||
@implementation ReportOOMsDisabledReportBackgroundOOMsEnabledScenario | ||
|
||
- (void)startBugsnag { | ||
self.config.shouldAutoCaptureSessions = NO; | ||
self.config.reportOOMs = NO; | ||
self.config.reportBackgroundOOMs = YES; | ||
[super startBugsnag]; | ||
} | ||
|
||
- (void)run { | ||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(6 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ | ||
raise(SIGKILL); | ||
}); | ||
} | ||
@end |
5 changes: 5 additions & 0 deletions
5
features/fixtures/ios-swift-cocoapods/iOSTestApp/scenarios/ReportOOMsDisabledScenario.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#import "Scenario.h" | ||
|
||
@interface ReportOOMsDisabledScenario : Scenario | ||
|
||
@end |
18 changes: 18 additions & 0 deletions
18
features/fixtures/ios-swift-cocoapods/iOSTestApp/scenarios/ReportOOMsDisabledScenario.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
|
||
#import "ReportOOMsDisabledScenario.h" | ||
#import <signal.h> | ||
|
||
@implementation ReportOOMsDisabledScenario | ||
|
||
- (void)startBugsnag { | ||
self.config.shouldAutoCaptureSessions = NO; | ||
self.config.reportOOMs = NO; | ||
[super startBugsnag]; | ||
} | ||
|
||
- (void)run { | ||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(6 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ | ||
raise(SIGKILL); | ||
}); | ||
} | ||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters