-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DBP: Fix memory leak on WebViewHandler #2483
DBP: Fix memory leak on WebViewHandler #2483
Conversation
@@ -186,7 +186,9 @@ extension DataBrokerOperation { | |||
switch actionType { | |||
case .click: | |||
stageCalculator?.fireOptOutFillForm() | |||
try? await webViewHandler?.waitForWebViewLoad(timeoutInSeconds: 30) | |||
try? await webViewHandler?.waitForWebViewLoad() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Bunn This is a collateral change of removing the timeout. We were doing similar for clicks
, what I’m doing there now is waiting 10 seconds before tapping.
We will probably need the same retry function that is now on C-S-S with clicks, but because clicks are done in opt-out, I think it makes sense to do it after launch.
@@ -59,7 +59,11 @@ final class DataBrokerProtectionWebViewHandler: NSObject, WebViewHandler { | |||
} | |||
|
|||
func initializeWebView(showWebView: Bool) async { | |||
webView = WebView(frame: CGRect(origin: .zero, size: CGSize(width: 1024, height: 1024)), configuration: webViewConfiguration) | |||
guard let configuration = self.webViewConfiguration else { | |||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add an assert here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Task/Issue URL: https://app.asana.com/0/1204006570077678/1206888925019546/f
Tech Design URL:
CC:
Description:
Removes the leaking
Task.sleep
onWebViewHandler
which was causingThe operation couldn’t be completed. No space left on device
Steps to test this PR:
The operation couldn’t be completed. No space left on device
or weird scenarios happening.