gecko-dev/docshell
Peter Van der Beken f38cc0e952 Bug 1570255 - Reboot session history in parent part 1. r=smaug,necko-reviewers,valentin
This adds a new implementation of nsISHEntry
(mozilla::dom::SessionHistoryEntry). When session history in the parent
is turned on, we'll instantiate the existing nsSHistory in the parent
process, but it will store entries of this new type. The nsSHistory in
the child process will also be instantiated for now, to avoid breaking
too many assumptions, and we try to keep parent and child
implementations in sync.

mozilla::dom::SessionHistoryEntry stores most of its data in a new
structure (mozilla::dom::SessionHistoryInfo) which can be sent over IPC.
When a load starts through the DocumentChannel we create an entry of
this new type for it in the parent process in
DocumentLoadListener::Open. The SessionHistoryInfo for that entry (with
an associated ID) is then sent over IPC in the RedirectToRealChannelArgs
to the process that does the actual load, where we store it in the
nsDocShell in mLoadingEntry (and mLoadingEntryId). The parent process
keeps track of outstanding loading entries in an array (mLoadingEntries)
in the CanonicalBrowsingContext. When a load finishes the nsDocShell
transfers mLoadingEntry into mActiveEntry, and notifies the parent
process through an IPC message (HistoryCommit) with the id of that
entry. The CanonicalBrowsingContext then removes the entry from the
array and stores it in its mActiveEntry, and adds the entry to the
nsSHistory object.

There are a number of things in this patch that are broken, and a lot of
FIXME comments. However, with the pref turned off things should just be
working as before. The goal is to land this first part, and then iterate
on the new implementation until we can switch over.

Differential Revision: https://phabricator.services.mozilla.com/D65329
2020-05-20 09:09:12 +00:00
..
base Bug 1570255 - Reboot session history in parent part 1. r=smaug,necko-reviewers,valentin 2020-05-20 09:09:12 +00:00
build Bug 1570255 - Remove sync session history implementation. r=smaug,nika 2020-05-20 09:09:06 +00:00
resources/content Bug 1562642 - add missing license in docshell/resources/content/netError.js r=smaug 2019-11-12 08:26:18 +00:00
shistory Bug 1570255 - Reboot session history in parent part 1. r=smaug,necko-reviewers,valentin 2020-05-20 09:09:12 +00:00
test Bug 1639195 - Part 2: Add a test. r=ckerschb 2020-05-19 18:59:36 +00:00
moz.build Bug 1594981 - update Core::DOM* and Core::Storage* bugzilla product and component meta data in moz.build files after reorganization in bug 1594717. r=annevk 2019-11-08 12:17:57 +00:00