|
@@ -46,7 +46,7 @@ NS_INLINE NSString *YH_Objectkey(id anyObject) { |
|
@@ -46,7 +46,7 @@ NS_INLINE NSString *YH_Objectkey(id anyObject) { |
46
|
@property (nonatomic, strong) NSMutableArray *tabViewControllerArray;
|
46
|
@property (nonatomic, strong) NSMutableArray *tabViewControllerArray;
|
47
|
/**页面调用链*/
|
47
|
/**页面调用链*/
|
48
|
@property (nonatomic, strong) NSMutableArray *pageChains;
|
48
|
@property (nonatomic, strong) NSMutableArray *pageChains;
|
49
|
-@property (nonatomic, strong) NSLock *lock;
|
49
|
+//@property (nonatomic, strong) NSLock *lock;
|
50
|
@end
|
50
|
@end
|
51
|
|
51
|
|
52
|
|
52
|
|
|
@@ -68,8 +68,8 @@ NS_INLINE NSString *YH_Objectkey(id anyObject) { |
|
@@ -68,8 +68,8 @@ NS_INLINE NSString *YH_Objectkey(id anyObject) { |
68
|
self.serialQueue = dispatch_queue_create([kYHEventReportQueue UTF8String], DISPATCH_QUEUE_SERIAL);
|
68
|
self.serialQueue = dispatch_queue_create([kYHEventReportQueue UTF8String], DISPATCH_QUEUE_SERIAL);
|
69
|
self.timedEvents = [NSMutableDictionary dictionary];
|
69
|
self.timedEvents = [NSMutableDictionary dictionary];
|
70
|
self.pageChains = [NSMutableArray array];
|
70
|
self.pageChains = [NSMutableArray array];
|
71
|
- self.lock = [[NSLock alloc] init];
|
|
|
72
|
- self.lock.name = @"com.yoho.buy.EventCollector";
|
71
|
+// self.lock = [[NSLock alloc] init];
|
|
|
72
|
+// self.lock.name = @"com.yoho.buy.EventCollector";
|
73
|
NSArray *tabAry= @[];
|
73
|
NSArray *tabAry= @[];
|
74
|
self.tabViewControllerArray = [NSMutableArray arrayWithArray:tabAry];
|
74
|
self.tabViewControllerArray = [NSMutableArray arrayWithArray:tabAry];
|
75
|
|
75
|
|
|
@@ -645,26 +645,27 @@ NS_INLINE NSString *YH_Objectkey(id anyObject) { |
|
@@ -645,26 +645,27 @@ NS_INLINE NSString *YH_Objectkey(id anyObject) { |
645
|
if (!viewController) {
|
645
|
if (!viewController) {
|
646
|
return;
|
646
|
return;
|
647
|
}
|
647
|
}
|
648
|
-
|
|
|
649
|
- [self.lock lock];
|
648
|
+ NSParameterAssert(NSThread.isMainThread);
|
|
|
649
|
+// [self.lock lock];
|
650
|
|
650
|
|
651
|
if (self.pageChains.count > 10) {
|
651
|
if (self.pageChains.count > 10) {
|
652
|
[self.pageChains removeObjectAtIndex:0];
|
652
|
[self.pageChains removeObjectAtIndex:0];
|
653
|
}
|
653
|
}
|
654
|
[self.pageChains addObject:[NSString stringWithFormat:@"%@",[viewController class]]];
|
654
|
[self.pageChains addObject:[NSString stringWithFormat:@"%@",[viewController class]]];
|
655
|
|
655
|
|
656
|
- [self.lock unlock];
|
656
|
+// [self.lock unlock];
|
657
|
}
|
657
|
}
|
658
|
|
658
|
|
659
|
- (NSString *)pageChainStr
|
659
|
- (NSString *)pageChainStr
|
660
|
{
|
660
|
{
|
661
|
- [self.lock lock];
|
661
|
+ NSParameterAssert(NSThread.isMainThread);
|
|
|
662
|
+// [self.lock lock];
|
662
|
if (!self.pageChains || self.pageChains.count == 0) {
|
663
|
if (!self.pageChains || self.pageChains.count == 0) {
|
663
|
return @"";
|
664
|
return @"";
|
664
|
}
|
665
|
}
|
665
|
|
666
|
|
666
|
NSString *resultChain = [[[self.pageChains reverseObjectEnumerator] allObjects] componentsJoinedByString:@","];
|
667
|
NSString *resultChain = [[[self.pageChains reverseObjectEnumerator] allObjects] componentsJoinedByString:@","];
|
667
|
- [self.lock unlock];
|
668
|
+// [self.lock unlock];
|
668
|
|
669
|
|
669
|
return resultChain;
|
670
|
return resultChain;
|
670
|
}
|
671
|
}
|