[tor-commits] [Git][tpo/applications/firefox-android][firefox-android-115.2.1-13.5-1] Bug 1862537 - Do not try to go back when it's a initial load...

morgan (@morgan) git at gitlab.torproject.org
Mon Sep 16 20:18:05 UTC 2024



morgan pushed to branch firefox-android-115.2.1-13.5-1 at The Tor Project / Applications / firefox-android


Commits:
070534b9 by hackademix at 2024-09-16T21:37:26+02:00
Bug 1862537 - Do not try to go back when it's a initial load r=android-reviewers,harrisono, a=pascalc

    Differential Revision: https://phabricator.services.mozilla.com/D219782

- - - - -


2 changed files:

- android-components/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngineSession.kt
- android-components/components/browser/engine-gecko/src/test/java/mozilla/components/browser/engine/gecko/GeckoEngineSessionTest.kt


Changes:

=====================================
android-components/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngineSession.kt
=====================================
@@ -869,9 +869,12 @@ class GeckoEngineSession(
                 return GeckoResult.fromValue(false)
             }
 
-            appRedirectUrl?.let {
-                if (url == appRedirectUrl) {
-                    return GeckoResult.fromValue(false)
+            // if it is an initial load then we can't go back. We should update the URL.
+            if (!initialLoad) {
+                appRedirectUrl?.let {
+                    if (url == appRedirectUrl) {
+                        return GeckoResult.fromValue(false)
+                    }
                 }
             }
 


=====================================
android-components/components/browser/engine-gecko/src/test/java/mozilla/components/browser/engine/gecko/GeckoEngineSessionTest.kt
=====================================
@@ -968,6 +968,7 @@ class GeckoEngineSessionTest {
         )
         engineSession.settings.historyTrackingDelegate = historyTrackingDelegate
         engineSession.appRedirectUrl = emptyPageUrl
+        engineSession.initialLoad = false
 
         class MockHistoryList(
             items: List<GeckoSession.HistoryDelegate.HistoryItem>,



View it on GitLab: https://gitlab.torproject.org/tpo/applications/firefox-android/-/commit/070534b9961ff2f031a5c0f32a33a13e65f8ef75

-- 
View it on GitLab: https://gitlab.torproject.org/tpo/applications/firefox-android/-/commit/070534b9961ff2f031a5c0f32a33a13e65f8ef75
You're receiving this email because of your account on gitlab.torproject.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tor-commits/attachments/20240916/f5073e67/attachment-0001.htm>


More information about the tor-commits mailing list