Skip to content

Commit

Permalink
Only show error screens for SSL errors when the url matches the curre…
Browse files Browse the repository at this point in the history
…nt visit. This prevents erroring out the entire visit when a 3rd party resource is requested on a page with an SSL error.
  • Loading branch information
jayohms committed Mar 20, 2024
1 parent e0176f8 commit 3bf26ca
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -783,10 +783,12 @@ class TurboSession internal constructor(
handler.cancel()

val visitError = WebSslError.from(error)
logEvent("onReceivedSslError", "error" to visitError, "url" to error.url)

logEvent("onReceivedSslError", "error" to visitError)
reset()
callback { it.onReceivedError(visitError) }
if (currentVisit?.location == error.url) {
reset()
callback { it.onReceivedError(visitError) }
}
}

override fun onRenderProcessGone(view: WebView, detail: RenderProcessGoneDetail): Boolean {
Expand Down

0 comments on commit 3bf26ca

Please sign in to comment.