Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
Fix bug that +[WXSDKManager bridgeMgr] is not thread safe. (#2394)
Browse files Browse the repository at this point in the history
  • Loading branch information
wqyfavor authored and jianhan-he committed May 7, 2019
1 parent 1ff3ac1 commit 6dee825
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions ios/sdk/WeexSDK/Sources/Manager/WXSDKManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,14 @@ + (WXSDKManager *)sharedInstance
- (instancetype)init
{
if (self = [super init]){

_bridgeMgr = [[WXBridgeManager alloc] init];
}
return self;
}

+ (WXBridgeManager *)bridgeMgr
{
WXBridgeManager *bridgeMgr = [self sharedInstance].bridgeMgr;
if (!bridgeMgr) {
bridgeMgr = [[WXBridgeManager alloc] init];
[self sharedInstance].bridgeMgr = bridgeMgr;
}
return bridgeMgr;
return [self sharedInstance].bridgeMgr;
}

+ (id)instanceForID:(NSString *)identifier
Expand Down

0 comments on commit 6dee825

Please sign in to comment.