Skip to content

Commit

Permalink
put back some unrelated changes to SentryEvent+Private
Browse files Browse the repository at this point in the history
  • Loading branch information
armcknight committed Feb 21, 2023
1 parent e883d69 commit fa56319
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
17 changes: 16 additions & 1 deletion Sources/Sentry/SentryEvent.m
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#import "SentryEvent.h"
#import "NSDate+SentryExtras.h"
#import "NSDictionary+SentrySanitize.h"
#import "SentryBreadcrumb.h"
#import "SentryClient.h"
#import "SentryCurrentDate.h"
#import "SentryDebugMeta.h"
#import "SentryEvent+Private.h"
#import "SentryException.h"
#import "SentryId.h"
#import "SentryLevelMapper.h"
Expand All @@ -17,6 +17,21 @@

NS_ASSUME_NONNULL_BEGIN

@interface
SentryEvent ()

@property (nonatomic) BOOL isCrashEvent;

// We're storing serialized breadcrumbs to disk in JSON, and when we're reading them back (in
// the case of OOM), we end up with the serialized breadcrumbs again. Instead of turning those
// dictionaries into proper SentryBreadcrumb instances which then need to be serialized again in
// SentryEvent, we use this serializedBreadcrumbs property to set the pre-serialized
// breadcrumbs. It saves a LOT of work - especially turning an NSDictionary into a SentryBreadcrumb
// is silly when we're just going to do the opposite right after.
@property (nonatomic, strong) NSArray *serializedBreadcrumbs;

@end

@implementation SentryEvent

- (instancetype)init
Expand Down
11 changes: 1 addition & 10 deletions Sources/Sentry/include/SentryEvent+Private.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,12 @@
#import <Foundation/Foundation.h>

@interface
SentryEvent ()
SentryEvent (Private)

/**
* This indicates whether this event is a result of a crash.
*/
@property (nonatomic) BOOL isCrashEvent;

/**
* We're storing serialized breadcrumbs to disk in JSON, and when we're reading them back (in
* the case of OOM), we end up with the serialized breadcrumbs again. Instead of turning those
* dictionaries into proper SentryBreadcrumb instances which then need to be serialized again in
* SentryEvent, we use this serializedBreadcrumbs property to set the pre-serialized
* breadcrumbs. It saves a LOT of work - especially turning an NSDictionary into a SentryBreadcrumb
* is silly when we're just going to do the opposite right after.
*/
@property (nonatomic, strong) NSArray *serializedBreadcrumbs;

@property (nonatomic) uint64_t startSystemTime;
Expand Down

0 comments on commit fa56319

Please sign in to comment.