Skip to content
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

Android: Should we clean up the replyProxyMap ? #5048

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

anikiki
Copy link
Contributor

@anikiki anikiki commented Sep 20, 2024

Task/Issue URL: https://app.asana.com/0/1200581511062568/1208338167068018/f

Description

Cleaned up the reply proxy maps when page changed.

Steps to test this PR

  • Apply the below patch.

Subject: [PATCH] All the changes
---
Index: app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt b/app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt
--- a/app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt	(revision 9c5253f0829e80e45700d077a62054cec1781b3e)
+++ b/app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt	(date 1726845240094)
@@ -1329,8 +1329,10 @@
     }
 
     private fun cleanupBlobDownloadReplyProxyMaps() {
+        Timber.d("Before Cleaning up blob download reply proxy maps: replyProxyMap=$replyProxyMap fixedReplyProxyMap=$fixedReplyProxyMap")
         fixedReplyProxyMap.clear()
         replyProxyMap.clear()
+        Timber.d("After Cleaning up blob download reply proxy maps: replyProxyMap=$replyProxyMap fixedReplyProxyMap=$fixedReplyProxyMap")
     }
 
     private fun setAdClickActiveTabData(url: String?) {

  • Install from this branch.
  • Filter the logs by Cleaning up blob download.
  • Navigate on various websites in the same tab and check the message appears with every page changed and the maps are cleared if they had values. Navigation examples: Load URL, Tap on links in the currently loaded website, Use Back and Forward from the menu, etc.
  • Verify https://app.asana.com/0/1202552961248957/1206811138963758/f still works.

NO UI changes

Copy link
Contributor Author

anikiki commented Sep 20, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @anikiki and the rest of your teammates on Graphite Graphite

@anikiki anikiki changed the title Cleaned up the reply proxy maps when page changed. Android: Should we clean up the replyProxyMap ? Sep 20, 2024
@anikiki anikiki marked this pull request as ready for review September 20, 2024 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant