Closed Bug 1677190 Opened 4 years ago Closed 1 day ago

(SHIP) Enable Session Restore and Session History In Parent in GeckoView

Categories

(GeckoView :: General, task, P2)

Unspecified
All
task

Tracking

(firefox100 wontfix, firefox101 wontfix, firefox102 wontfix, firefox103 wontfix)

RESOLVED FIXED
Tracking Status
firefox100 --- wontfix
firefox101 --- wontfix
firefox102 --- wontfix
firefox103 --- wontfix

People

(Reporter: agi, Assigned: kaya)

References

(Blocks 4 open bugs)

Details

(Whiteboard: [fission:android:m2] [geckoview:2022q3][geckoview:m117] [fxdroid] [foundation] )

Attachments

(6 files, 3 obsolete files)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review

The DOM team mentioned we should try to enable SHIP by default.

Tracking this bug for Android Fission milestone M2 (pass tests with Fission enabled)

Whiteboard: [fission:android:m2]
Severity: -- → S3
Priority: -- → P2
Whiteboard: [fission:android:m2] → [fission:android:m2][geckoview:m86]
Whiteboard: [fission:android:m2][geckoview:m86] → [fission:android:m2][geckoview:m86][geckoview:m91?]
Whiteboard: [fission:android:m2][geckoview:m86][geckoview:m91?] → [fission:android:m2][geckoview:m86][geckoview:m93?]
Whiteboard: [fission:android:m2][geckoview:m86][geckoview:m93?] → [fission:android:m2][geckoview:m86][geckoview:m94?]
Whiteboard: [fission:android:m2][geckoview:m86][geckoview:m94?] → [fission:android:m2][geckoview:m86][geckoview:m93]
Rank: 5
Whiteboard: [fission:android:m2][geckoview:m86][geckoview:m93] → [fission:android:m2][geckoview:m86][geckoview:m94]
Whiteboard: [fission:android:m2][geckoview:m86][geckoview:m94] → [fission:android:m2][geckoview:m86][geckoview:m95]
Whiteboard: [fission:android:m2][geckoview:m86][geckoview:m95] → [fission:android:m2][geckoview:m86][geckoview:m96]
Whiteboard: [fission:android:m2][geckoview:m86][geckoview:m96] → [fission:android:m2][geckoview:m86][geckoview:m96?]

Linking this to the bug that peterv is working on (feel free to change the relationship between two bugs).

Depends on: 1736121

Assigning to Agi because he said he's going to work on this bug next.

Assignee: nobody → agi
Whiteboard: [fission:android:m2][geckoview:m86][geckoview:m96?] → [fission:android:m2] [geckoview:m86] [geckoview:m96?] [geckoview:m103?]

Consider for 104. We won't be ready for 103.

Agi will fix up this bug's dependent bugs.

Whiteboard: [fission:android:m2] [geckoview:m86] [geckoview:m96?] [geckoview:m103?] → [fission:android:m2] [geckoview:m86] [geckoview:m96?] [geckoview:m104?]
Summary: Enable Session History In Parent in GeckoView → Enable Session History In Parent and Session Restore in GeckoView
Summary: Enable Session History In Parent and Session Restore in GeckoView → Enable Session Restore and Session History In Parent in GeckoView

According to :afarre, this blocks bug 1736121 "SHIP everywhere". It's not possible to enable "SHIP everywhere" before this bug is done, because it would mean turning off session (re)store for android.

Blocks: 1736121
No longer depends on: 1736121
Whiteboard: [fission:android:m2] [geckoview:m86] [geckoview:m96?] [geckoview:m104?] → [fission:android:m2] [geckoview:m86] [geckoview:m96?] [geckoview:m104?] [geckoview:2022h2?]
Whiteboard: [fission:android:m2] [geckoview:m86] [geckoview:m96?] [geckoview:m104?] [geckoview:2022h2?] → [fission:android:m2] [geckoview:m86] [geckoview:m96?] [geckoview:m104?] [geckoview:2022q3]
Assignee: agi → calu
Priority: P2 → P1
Whiteboard: [fission:android:m2] [geckoview:m86] [geckoview:m96?] [geckoview:m104?] [geckoview:2022q3] → [fission:android:m2] [geckoview:m104] [geckoview:2022q3]
See Also: → 1702239
Whiteboard: [fission:android:m2] [geckoview:m104] [geckoview:2022q3] → [fission:android:m2] [geckoview:2022q3]
Priority: P1 → P2

Moving Android Fission bugs to the new GeckoView::Sandboxing component.

Component: General → Sandboxing
Depends on: 1776284

This adds the app api to allow restoreState() calls to restore tab content that has been saved in a GeckoSession.SessionState. This generally includes form data (data that has been entered into a text or checkbox form) and scroll (what position the page is scrolled to and includes the level of the zoom the page is at).

For now, this was manually tested by using geckoview_example. A restoreState() call was added to onSessionStateChange(), which gets called anytime the history or tab content gets updated. That will provide the current state the tab is in. I verified that by calling restoreState(), it reloads the tab exactly to the tab content it was set at, regardless of what new url was entered. I also manually verified by running about:debugging and placing breakpoints to verify the returned data from buildRestoreData() and restoreState matches the tab content.

The next steps will be getting ProgressDelegate junit tests to restore this data as well.

Rank: 5 → 222

Enhancements should have severity N/A.

Severity: S3 → N/A
Blocks: 1837551
Blocks: gv-fission
Assignee: calu → kkaya
Priority: P2 → P1
Whiteboard: [fission:android:m2] [geckoview:2022q3] → [fission:android:m2] [geckoview:2022q3][geckoview:m117] [fxdroid] [foundation]
Blocks: 1849060
No longer blocks: 1849060

SHIP is enabled for Android to store and restore the state of the session. From now on the logic in SessionStateAggregator is replaced by the logic in SessionStoreParent for storing the state of the session. The restoring logic lies inside GeckoViewContentParent.

SHIP is enabled for Android to store and restore the state of the session. From now on the logic in SessionStateAggregator is replaced by the logic in SessionStoreParent for storing the state of the session. The restoring logic lies inside GeckoViewContentParent.

Attachment #9358205 - Attachment is obsolete: true
Attachment #9292551 - Attachment is obsolete: true
See Also: → 1843682
Blocks: 1865124

The Android team has not been keeping our P1 bug list up to date, so we're resetting all our P1 bugs to P2 to avoid signalling that we're actively working on bugs that we're not. The BMO documentation https://wiki.mozilla.org/BMO/UserGuide/BugFields#priority says P1 means "fix in the current release cycle" and P2 means "fix in the next release cycle or the following (nightly + 1 or nightly + 2)".

If you are actively working on this bug and expect to ship it in Fx 122 or 123, then please restore the priority back to P1.

Priority: P1 → P2
Attachment #9358830 - Attachment description: WIP: Bug 1677190 - Enable SHIP for session state storing and restoring. → Bug 1677190 - Enable SHIP for session state storing and restoring.
Type: enhancement → task
Summary: Enable Session Restore and Session History In Parent in GeckoView → (SHIP) Enable Session Restore and Session History In Parent in GeckoView
Depends on: 1883200
Depends on: 1883211
Depends on: 1883220
Depends on: 1883278
Depends on: 1883279
Depends on: 1884334
Depends on: 1884684
Attachment #9358830 - Attachment description: Bug 1677190 - Enable SHIP for session state storing and restoring. → WIP: Bug 1677190 - Enable SHIP for session state storing and restoring.
See Also: → 1875620
Keywords: leave-open
Attachment #9395536 - Attachment description: WIP: Bug 1677190 - Move SessionStoreFunctions from toolkit to the platforms' packages. → WIP: Bug 1677190 - Introduce SessionStoreFunctions for GeckoView package and move the existing SessionStoreFunctions from toolkit to the browser package.
Attachment #9395536 - Attachment description: WIP: Bug 1677190 - Introduce SessionStoreFunctions for GeckoView package and move the existing SessionStoreFunctions from toolkit to the browser package. → Bug 1677190 - Introduce SessionStoreFunctions for GeckoView package and move the existing SessionStoreFunctions from toolkit to the browser package.
Attachment #9395536 - Attachment description: Bug 1677190 - Introduce SessionStoreFunctions for GeckoView package and move the existing SessionStoreFunctions from toolkit to the browser package. → WIP: Bug 1677190 - Introduce SessionStoreFunctions for GeckoView package and move the existing SessionStoreFunctions from toolkit to the browser package.
Attachment #9395536 - Attachment description: WIP: Bug 1677190 - Introduce SessionStoreFunctions for GeckoView package and move the existing SessionStoreFunctions from toolkit to the browser package. → Bug 1677190 - Introduce SessionStoreFunctions for GeckoView package and move the existing SessionStoreFunctions from toolkit to the browser package.
Attachment #9358830 - Attachment description: WIP: Bug 1677190 - Enable SHIP for session state storing and restoring. → WIP: Bug 1677190 - Introduce SHIP on Android for session state storing and restoring. It is pref'ed off for now.
Depends on: 1892751
Attachment #9358830 - Attachment description: WIP: Bug 1677190 - Introduce SHIP on Android for session state storing and restoring. It is pref'ed off for now. → Bug 1677190 - Introduce SHIP on Android for session state storing and restoring. It is pref'ed off for now.
Attachment #9358830 - Attachment description: Bug 1677190 - Introduce SHIP on Android for session state storing and restoring. It is pref'ed off for now. → WIP: Bug 1677190 - Introduce SHIP on Android for session state storing and restoring. It is pref'ed off for now.

This change introduces a map in GeckoRuntime (for both SHIP and non-SHIP code) which holds weak references to GeckoSession objects created. This is done to be able to forward the received session state update in SHIP code from GeckoRuntime to GeckoSession.

Pushed by kkaya@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a87aa27f25e1 Introduce SessionStoreFunctions for GeckoView package and move the existing SessionStoreFunctions from toolkit to the browser package. r=geckoview-reviewers,farre,nika,owlish
Pushed by kkaya@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e9ae07cdf461 Move buildRestoreData to toolkit to use it on both Android and Desktop. r=geckoview-reviewers,sessionstore-reviewers,owlish,farre
Component: Sandboxing → General
Pushed by kkaya@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2fd6f1439789 Use shared code for updating the session state on Android when SHIP is enabled. r=geckoview-reviewers,sessionstore-reviewers,farre,owlish
Pushed by kkaya@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7e5e1a3a0dae Request tab state flush on SHIP on Android when GeckoSession is deactivated. r=geckoview-reviewers,owlish
Attachment #9398396 - Attachment description: WIP: Bug 1677190 - Use runtime dispatcher on GeckoViewSessionStore and event listener on GeckoRuntime to handle tab state updates. → Bug 1677190 - Use runtime dispatcher on GeckoViewSessionStore and event listener on GeckoRuntime to handle tab state updates.
Depends on: 1522790
See Also: → 1645211
No longer blocks: gv-fission
See Also: → 1911028
Depends on: 1911028
No longer depends on: 1911028
Depends on: 1911028
See Also: 1911028
Regressions: 1907615
Blocks: 1913733
Blocks: 1913734
Attachment #9358830 - Attachment is obsolete: true
No longer regressions: 1907615
No longer depends on: 1892751
See Also: → 1892751
Blocks: 1910538
Status: NEW → RESOLVED
Closed: 1 day ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: