Authored by 孙凯

删除 web view 失败统计 review by daiqiang

@@ -45,17 +45,6 @@ void yher_webViewDidFinishLoad(id self, SEL _cmd,id webView) @@ -45,17 +45,6 @@ void yher_webViewDidFinishLoad(id self, SEL _cmd,id webView)
45 [[YH_EventCollector sharedInstance] timeEventEndWithWebView:webView status:YHEventLoadStatusSuc]; 45 [[YH_EventCollector sharedInstance] timeEventEndWithWebView:webView status:YHEventLoadStatusSuc];
46 } 46 }
47 47
48 -void yher_webViewDidFailLoadWithError(id self, SEL _cmd,id webView,NSError* error)  
49 -{  
50 - SEL selector = NSSelectorFromString(@"yher_webViewDidFailLoadWithError");  
51 - ((void(*)(id, SEL, id,id))objc_msgSend)(self, selector, webView,error);  
52 -  
53 - if (![YHEventReport sharedInstance].isPerformanceTrackEnabled||![YHEventReport sharedInstance].isControllerPerformanceTrackEnable) {  
54 - return;  
55 - }  
56 - [[YH_EventCollector sharedInstance] timeEventEndWithWebView:webView status:YHEventLoadStatusFailed];  
57 -}  
58 -  
59 - (void)yher_webViewSetDelegate:(id<UIWebViewDelegate>)delegate { 48 - (void)yher_webViewSetDelegate:(id<UIWebViewDelegate>)delegate {
60 [self yher_webViewSetDelegate:delegate]; 49 [self yher_webViewSetDelegate:delegate];
61 50
@@ -67,12 +56,6 @@ void yher_webViewDidFailLoadWithError(id self, SEL _cmd,id webView,NSError* erro @@ -67,12 +56,6 @@ void yher_webViewDidFailLoadWithError(id self, SEL _cmd,id webView,NSError* erro
67 Method dis_swizzledMethod = class_getInstanceMethod(class, @selector(webViewDidFinishLoad:)); 56 Method dis_swizzledMethod = class_getInstanceMethod(class, @selector(webViewDidFinishLoad:));
68 method_exchangeImplementations(dis_originMethod, dis_swizzledMethod); 57 method_exchangeImplementations(dis_originMethod, dis_swizzledMethod);
69 } 58 }
70 -  
71 - if (class_addMethod(class, NSSelectorFromString(@"yher_webViewDidFailLoadWithError"), (IMP)yher_webViewDidFailLoadWithError, "v@:@@")) {  
72 - Method dis_originMethod = class_getInstanceMethod(class, NSSelectorFromString(@"yher_webViewDidFailLoadWithError"));  
73 - Method dis_swizzledMethod = class_getInstanceMethod(class, @selector(webView:didFailLoadWithError:));  
74 - method_exchangeImplementations(dis_originMethod, dis_swizzledMethod);  
75 - }  
76 } @catch (NSException *exception) { 59 } @catch (NSException *exception) {
77 YHLog(@"%@ error: %@", self, exception); 60 YHLog(@"%@ error: %@", self, exception);
78 } 61 }