Skip to content

Commit

Permalink
Merge pull request #450 from crmo/fix447
Browse files Browse the repository at this point in the history
UIWebView call loadRequest multiple times lead to deadlock in iOS12.

Fixes #447.
  • Loading branch information
dpogue authored Mar 6, 2019
2 parents f8b99a9 + 6d9bf0c commit 83e5929
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,14 @@ - (void)webViewDidFinishLoad:(UIWebView*)webView
break;

case STATE_WAITING_FOR_LOAD_FINISH:
if (_loadCount == 1) {
// fix call loadRequest multiple times just callback webViewDidFinishLoad once time in iOS 12
if (@available(iOS 12.0, *)) {
fireCallback = YES;
_state = STATE_IDLE;
} else {
if (_loadCount == 1) {
fireCallback = YES;
_state = STATE_IDLE;
}
}
_loadCount -= 1;
break;
Expand Down

0 comments on commit 83e5929

Please sign in to comment.