Skip to content

Commit ccfaa36

Browse files
Merge pull request #2322 from nnnlog/master
change priority of DispatchQueue
2 parents dc7bc50 + 6a0c192 commit ccfaa36

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

flutter_inappwebview_ios/ios/Classes/InAppWebView/InAppWebView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2072,7 +2072,7 @@ public class InAppWebView: WKWebView, UIScrollViewDelegate, WKUIDelegate,
20722072
if let scheme = challenge.protectionSpace.protocol, scheme == "https" {
20732073
// workaround for ProtectionSpace SSL Certificate
20742074
// https://github.com/pichillilorenzo/flutter_inappwebview/issues/1678
2075-
DispatchQueue.global(qos: .background).async {
2075+
DispatchQueue.global().async {
20762076
if let sslCertificate = challenge.protectionSpace.sslCertificate {
20772077
DispatchQueue.main.async {
20782078
InAppWebView.sslCertificatesMap[challenge.protectionSpace.host] = sslCertificate
@@ -2092,7 +2092,7 @@ public class InAppWebView: WKWebView, UIScrollViewDelegate, WKUIDelegate,
20922092
break
20932093
case 1:
20942094
// workaround for https://github.com/pichillilorenzo/flutter_inappwebview/issues/1924
2095-
DispatchQueue.global(qos: .background).async {
2095+
DispatchQueue.global().async {
20962096
let exceptions = SecTrustCopyExceptions(serverTrust)
20972097
SecTrustSetExceptions(serverTrust, exceptions)
20982098
let credential = URLCredential(trust: serverTrust)

flutter_inappwebview_ios/ios/Classes/InAppWebView/WebViewChannelDelegate.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,7 @@ public class WebViewChannelDelegate: ChannelDelegate {
965965
}
966966
// workaround for ProtectionSpace.toMap() SSL Certificate
967967
// https://github.com/pichillilorenzo/flutter_inappwebview/issues/1678
968-
DispatchQueue.global(qos: .background).async {
968+
DispatchQueue.global().async {
969969
let arguments = challenge.toMap()
970970
DispatchQueue.main.async { [weak self] in
971971
if self?.channel == nil {
@@ -997,7 +997,7 @@ public class WebViewChannelDelegate: ChannelDelegate {
997997
}
998998
// workaround for ProtectionSpace.toMap() SSL Certificate
999999
// https://github.com/pichillilorenzo/flutter_inappwebview/issues/1678
1000-
DispatchQueue.global(qos: .background).async {
1000+
DispatchQueue.global().async {
10011001
let arguments = challenge.toMap()
10021002
DispatchQueue.main.async { [weak self] in
10031003
if self?.channel == nil {
@@ -1029,7 +1029,7 @@ public class WebViewChannelDelegate: ChannelDelegate {
10291029
}
10301030
// workaround for ProtectionSpace.toMap() SSL Certificate
10311031
// https://github.com/pichillilorenzo/flutter_inappwebview/issues/1678
1032-
DispatchQueue.global(qos: .background).async {
1032+
DispatchQueue.global().async {
10331033
let arguments = challenge.toMap()
10341034
DispatchQueue.main.async { [weak self] in
10351035
if self?.channel == nil {
@@ -1142,7 +1142,7 @@ public class WebViewChannelDelegate: ChannelDelegate {
11421142
}
11431143
// workaround for ProtectionSpace.toMap() SSL Certificate
11441144
// https://github.com/pichillilorenzo/flutter_inappwebview/issues/1678
1145-
DispatchQueue.global(qos: .background).async {
1145+
DispatchQueue.global().async {
11461146
let arguments = challenge.toMap()
11471147
DispatchQueue.main.async { [weak self] in
11481148
if self?.channel == nil {

flutter_inappwebview_macos/macos/Classes/InAppWebView/InAppWebView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1455,7 +1455,7 @@ public class InAppWebView: WKWebView, WKUIDelegate,
14551455
if let scheme = challenge.protectionSpace.protocol, scheme == "https" {
14561456
// workaround for ProtectionSpace SSL Certificate
14571457
// https://github.com/pichillilorenzo/flutter_inappwebview/issues/1678
1458-
DispatchQueue.global(qos: .background).async {
1458+
DispatchQueue.global().async {
14591459
if let sslCertificate = challenge.protectionSpace.sslCertificate {
14601460
DispatchQueue.main.async {
14611461
InAppWebView.sslCertificatesMap[challenge.protectionSpace.host] = sslCertificate
@@ -1475,7 +1475,7 @@ public class InAppWebView: WKWebView, WKUIDelegate,
14751475
break
14761476
case 1:
14771477
// workaround for https://github.com/pichillilorenzo/flutter_inappwebview/issues/1924
1478-
DispatchQueue.global(qos: .background).async {
1478+
DispatchQueue.global().async {
14791479
let exceptions = SecTrustCopyExceptions(serverTrust)
14801480
SecTrustSetExceptions(serverTrust, exceptions)
14811481
let credential = URLCredential(trust: serverTrust)

flutter_inappwebview_macos/macos/Classes/InAppWebView/WebViewChannelDelegate.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -928,7 +928,7 @@ public class WebViewChannelDelegate: ChannelDelegate {
928928
}
929929
// workaround for ProtectionSpace.toMap() SSL Certificate
930930
// https://github.com/pichillilorenzo/flutter_inappwebview/issues/1678
931-
DispatchQueue.global(qos: .background).async {
931+
DispatchQueue.global().async {
932932
let arguments = challenge.toMap()
933933
DispatchQueue.main.async { [weak self] in
934934
if self?.channel == nil {
@@ -960,7 +960,7 @@ public class WebViewChannelDelegate: ChannelDelegate {
960960
}
961961
// workaround for ProtectionSpace.toMap() SSL Certificate
962962
// https://github.com/pichillilorenzo/flutter_inappwebview/issues/1678
963-
DispatchQueue.global(qos: .background).async {
963+
DispatchQueue.global().async {
964964
let arguments = challenge.toMap()
965965
DispatchQueue.main.async { [weak self] in
966966
if self?.channel == nil {
@@ -992,7 +992,7 @@ public class WebViewChannelDelegate: ChannelDelegate {
992992
}
993993
// workaround for ProtectionSpace.toMap() SSL Certificate
994994
// https://github.com/pichillilorenzo/flutter_inappwebview/issues/1678
995-
DispatchQueue.global(qos: .background).async {
995+
DispatchQueue.global().async {
996996
let arguments = challenge.toMap()
997997
DispatchQueue.main.async { [weak self] in
998998
if self?.channel == nil {
@@ -1105,7 +1105,7 @@ public class WebViewChannelDelegate: ChannelDelegate {
11051105
}
11061106
// workaround for ProtectionSpace.toMap() SSL Certificate
11071107
// https://github.com/pichillilorenzo/flutter_inappwebview/issues/1678
1108-
DispatchQueue.global(qos: .background).async {
1108+
DispatchQueue.global().async {
11091109
let arguments = challenge.toMap()
11101110
DispatchQueue.main.async { [weak self] in
11111111
if self?.channel == nil {

0 commit comments

Comments
 (0)