File tree Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Original file line number Diff line number Diff line change 1212#define kCustomProtocolScheme @" wvjbscheme"
1313#define kQueueHasMessage @" __WVJB_QUEUE_MESSAGE__"
1414
15- #if TARGET_OS_IPHONE && defined(__IPHONE_5_0) && (__IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_5_0)
16- #define WVJB_WEAK_FALLBACK weak
17- #elif TARGET_OS_MAC && defined(__MAC_10_7) && (__MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_10_7)
18- #define WVJB_WEAK_FALLBACK weak
19- #else
20- #define WVJB_WEAK_FALLBACK unsafe_unretained
21- #endif
22-
2315#if defined __MAC_OS_X_VERSION_MAX_ALLOWED
2416 #import < WebKit/WebKit.h>
2517 #define WVJB_PLATFORM_OSX
Original file line number Diff line number Diff line change 88
99#import " WebViewJavascriptBridge.h"
1010
11+ #if __has_feature(objc_arc_weak)
12+ #define WVJB_WEAK __weak
13+ #else
14+ #define WVJB_WEAK __unsafe_unretained
15+ #endif
16+
17+
1118@implementation WebViewJavascriptBridge {
12- __weak WVJB_WEBVIEW_TYPE* _webView;
13- __weak id _webViewDelegate;
19+ WVJB_WEAK WVJB_WEBVIEW_TYPE* _webView;
20+ WVJB_WEAK id _webViewDelegate;
1421 NSMutableArray * _startupMessageQueue;
1522 NSMutableDictionary * _responseCallbacks;
1623 NSMutableDictionary * _messageHandlers;
You can’t perform that action at this time.
0 commit comments