Commit graph

205 commits

Author SHA1 Message Date
Jan Henning
acd95437dd Bug 1458697 - Use different strategy for dealing with initial session store activity. r=gbrown
Waiting for delayed startup and then attempting to force any possibly still
pending session store write to disk by flushing the session store data didn't
turn out to be a good idea, because if the session store had already started its
own automatic write at that moment in time, we'd get back an additional
"PrivateBrowsing:Data" event that we didn't expect, thereby confusing the test.

Instead, we now wait for the first session store write after startup to occur
naturally before proceeding with the test.

MozReview-Commit-ID: Hui9YYec1Ow

--HG--
extra : rebase_source : 7c063871fbe47e5f568f19151292c24232939790
2018-06-07 21:10:20 +02:00
Jan Henning
5ec5f23aab Bug 1456391 - Part 8: Use mapFrameTree in Fennec. r=esawin
This brings us in line with Desktop's session store, in that we can now collect
data for arbitrarily nested frame structures.

At the same time, this also means that we no longer collect data for dynamically
added frames, so the corresponding mochitest needs to be adapted accordingly.

MozReview-Commit-ID: DfJ3C2ccUne

--HG--
extra : rebase_source : bbb2181d5596d21254d2f7394c1383a3979dcef4
2018-04-25 22:21:41 +02:00
Jan Henning
64e30f8441 Bug 1456391 - Part 6: Switch mobile session store to use defineLazyModuleGetters. r=esawin
MozReview-Commit-ID: ElrFACJVbRN

--HG--
extra : rebase_source : c13f6aa29bb7b4009e56edfa13454a8feaedccb4
2018-04-25 22:14:25 +02:00
Kris Maglione
a259026c9d Bug 1456035: Part 4 - Convert callers of XPCOMUtils.generateQI to ChromeUtils.generateQI. r=mccr8
This also removes any redundant Ci.nsISupports elements in the interface
lists.

This was done using the following script:

acecb401b7/processors/chromeutils-generateQI.jsm

MozReview-Commit-ID: AIx10P8GpZY

--HG--
extra : rebase_source : a29c07530586dc18ba040f19215475ac20fcfb3b
2018-04-22 20:55:06 -07:00
Boris Zbarsky
b43b5abed4 Bug 1453345 part 5. Remove pointless JS implemenations of QI to nsIDOMEventListener. r=smaug
MozReview-Commit-ID: Db0v6GZ0deo
2018-04-12 00:03:45 -04:00
Randell Jesup
d39849ea7e Bug 1443765: Update android formdata sessionstore test for delayed save r=snorp 2018-03-08 17:12:57 -05:00
Randell Jesup
5f627bd0ab Bug 1443765: delay SessionStore for Fennec on input events r=snorp
This also implies that a series of events (like UnselectAll for checkboxes)
will be batched.
2018-03-08 17:12:49 -05:00
Jan Henning
59c932e340 Bug 1437382 - Part 11 - Shorten save delay when private tabs are closed. r=esawin
In most cases (e.g. new tabs added, page navigation, scrolling, etc.), we can
live with the fact the the private tab data held by GeckoApp might be up to ~10
seconds out of date if we don't manage to send an update within the time limit
given by the UI during backgrounding.

Where the closing of private tabs is concerned, this is different, as not
remembering that the user already closed some tabs just before switching away
from Firefox could lead to potentially embarrassing situations when the user
returns and unexpectedly finds those tabs still open.
Therefore we now use the infrastructure added in the previous parts to speed up
the saving process when private tabs are closed.

MozReview-Commit-ID: KpfXinOl5Ki

--HG--
extra : rebase_source : 2c8d8572faed17254f1c4aa6ed4321893afa7b8f
2018-02-17 16:42:13 +01:00
Jan Henning
790c5d6bea Bug 1437382 - Part 10 - Use a reduced save delay when saving private tabs. r=esawin
... and also shorten any already running save timer if necessary.

This is because the private tab data kept by GeckoApp, that will be restored if
we are OOM-killed, cannot be updated anymore after Firefox goes into the back-
ground, even if we aren't immediately killed by the OS.

Because during backgrounding the UI only waits a limited amount of time for the
latest private tab data in order to avoid causing an ANR if Gecko is busy, we
need to compensate by sending private tab data updates faster to GeckoApp than
the usual write throttling interval of every 10 s would allow.

To allow multiple successive tab events to be batched together in one update,
e.g. if the user closes *all* private tabs, we still introduce a small save
delay of a few hundred ms.

MozReview-Commit-ID: J15RNfAlfy2

--HG--
extra : rebase_source : d61d7ae272eb07dd924305419040472c2eb3f579
2018-02-17 16:31:20 +01:00
Jan Henning
6cb733f7fd Bug 1437382 - Part 9 - Track number of outstanding "private tabs only" saveState calls. r=esawin
Private tabs are saved in memory only by sending them to GeckoApp, so to speed
up processing (compare part 3), we want to avoid writing out the full session
store file for normal tabs as well if all outstanding saveState(Delayed) calls
concerned private tabs only.

To that effect, we slightly change the semantics of our pendingWrites counter
and now increment it each time saveStateDelayed is called, even if the save
timer is already running. This is because if e.g. a private tab update started
the timer and then another saveStateDelayed call happens for a non-private tab,
we need to change our plans and write the normal session store file after all as
well. Tracking every saveStateDelayed call allows us to do this.

Because writeFile only cares about the fact whether additional pending writes
were queued while it was executing asynchronously or not, but not about the
absolute amount of pending writes (if no additional writes were queued, the
count is simply reset to 0), incrementing the pending writes count even
when the timer is already running causes no ill effects.

MozReview-Commit-ID: AjhIp8bpyf

--HG--
extra : rebase_source : 558cdba8fc833b51d069101bebefc6100165f638
2018-02-12 22:15:35 +01:00
Jan Henning
aba7c3047e Bug 1437382 - Part 8 - Extract functions for creating and cancelling the delayed write timer. r=esawin
MozReview-Commit-ID: BjZ2XYSi9rR

--HG--
extra : rebase_source : e949de8dd0765ee0239826f5c49cb7c0d9de8bd2
2018-02-12 20:19:15 +01:00
Jan Henning
bdbf92d01e Bug 1437382 - Part 7 - Change session store time callback behaviour. r=esawin
When we get a timer callback for delayed saving, we already only proceed if
we've still got a write pending. Conversely if for whatever reasons _saveState()
is called from outside of a timer callback, any still pending save timer is
cancelled again.

With that in mind, when executing the delayed write timer callback there's no
reason to call the public version of saveState(), whose only extra task is to
increment the pending write count again. Instead, we can just directly call the
internal _saveState() version.

MozReview-Commit-ID: 11EucNm5KFB

--HG--
extra : rebase_source : a80379157dec1e01ab515eab30125ab06621b549
2018-02-12 20:11:46 +01:00
Jan Henning
a4441fbe24 Bug 1437382 - Part 6 - Switch to using PrivateBrowsing helper method in session store. r=esawin
As far as I can tell, that line dates back to approximately the time Private-
BrowsingUtils were introduced in the first place.

MozReview-Commit-ID: BLn13X7DVJt

--HG--
extra : rebase_source : 2a00f5ca572cf65e3fbd6763f4be32c84b18c0d8
2018-02-12 20:37:07 +01:00
Jan Henning
7a91a2deb9 Bug 1437382 - Part 4 - Make sure that flushing private tabs data reaches GeckoApp in time. r=jchen
There are two parts to this:
1. While the file writing itself by the session store can be done either
   synchronously or asynchronously, the session store's _writeFile function as
   a whole always behaves asynchronously. In addition, just writing the file
   (which will be done synchronously when flushing tabs) takes time which we
   don't have, as we should send the private tabs data as fast as possible to
   Java in order to avoid hanging the UI or missing a possible timeout.
2. Sending the data to Java needs to happen synchronously as well, so we need
   to listen for "PrivateBrowsing:Data" on the Gecko thread now. This in turn
   means that some sychronisation is now required between the UI thread handling
   onSaveInstanceState and the Gecko thread that is actually receiving the data.

To avoid hanging the UI and causing ANRs, we only wait a limited amount of time
for Gecko to respond with fresh private tabs data, though.
As this still leaves a certain possibility of outdated private browsing data
being saved and possibly restored after an OOM-kill, we're also going to speed
up the processing of TabClosed events by the session store in the following
parts.

MozReview-Commit-ID: EkNFre5RhQW

--HG--
extra : rebase_source : ae878b72eb66dddb3f803d654c76ae75c8b9caa1
extra : source : 2b7ed5cdc9db4791c2818580b5ac995ab0e36ddf
2018-02-11 17:54:58 +01:00
Jan Henning
1753a5dda4 Bug 1437382 - Part 3 - Flush session store tab data separately from application-background. r=jchen
We need to block onSaveInstanceState until we're sure that our private browsing
data is up to date, however we can't block on the whole of our application-
background handling (GeckoThread.onPause), as that will take too much time.

In addition, we need to update the stored tab data not just when the application
goes into the background, but every time we're leaving GeckoApp and onSave-
InstanceState is called, e.g. when visiting our settings activity.

MozReview-Commit-ID: DgtUvatD6h3

--HG--
extra : rebase_source : 215659505d0bc52fb7f27ca2a9fea2fd618b0efe
2018-02-22 19:55:13 +01:00
Valentin Gosu
84b854ce2c Bug 1433958 - Change code that sets nsIURI.userPass to use nsIURIMutator r=mayhemer
* Code in XMLHttpRequestMainThread is converted to set the username and password individually. This is because when the parameters are empty, it ended up calling SetUserPass(":") which always returns an error.

MozReview-Commit-ID: 3cK5HeyzjFE

--HG--
extra : rebase_source : f34400c11245d88648b0ae9c196637628afa9517
2018-02-26 20:43:46 +01:00
Mark Banner
2762cbd5c2 Bug 1439838 - Enable ESLint rule no-unused-vars for the same directories in mobile/android as no-undef. r=JanH
MozReview-Commit-ID: 1popN3tahBx

--HG--
extra : rebase_source : 1cc950c6de7ecf8658f174fb48e6a8afe0a1b1c9
2018-02-21 09:22:03 +00:00
Jan Henning
ce7ac5c8a9 Bug 1437388 - Don't set different session store write interval while in background. r=esawin
We had some issues with tabs closed shortly before backgrounding Firefox re-
appearing during session restore, however in hindsight bug 1282830 (closing a
zombie tab didn't trigger a session store file write) seems a more likely cause
for that than my initial theory from bug 1256277 comment 6 (tab events
dispatched *just* before backgrounding might be processed only after our
application-background handling), because as far as I can tell the latter theory
actually requires really split-second timing.

With that in mind, the differing, smaller minimum file write interval while in
background can be removed again.

MozReview-Commit-ID: GSQZYKeYME6

--HG--
extra : rebase_source : 598f49df98b7a09d63cd7e0aad6ad079916fad99
2018-02-11 19:43:16 +01:00
Andrew McCreight
5dec0e0beb Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian
This patch was autogenerated by my decomponents.py

It covers almost every file with the extension js, jsm, html, py,
xhtml, or xul.

It removes blank lines after removed lines, when the removed lines are
preceded by either blank lines or the start of a new block. The "start
of a new block" is defined fairly hackily: either the line starts with
//, ends with */, ends with {, <![CDATA[, """ or '''. The first two
cover comments, the third one covers JS, the fourth covers JS embedded
in XUL, and the final two cover JS embedded in Python. This also
applies if the removed line was the first line of the file.

It covers the pattern matching cases like "var {classes: Cc,
interfaces: Ci, utils: Cu, results: Cr} = Components;". It'll remove
the entire thing if they are all either Ci, Cr, Cc or Cu, or it will
remove the appropriate ones and leave the residue behind. If there's
only one behind, then it will turn it into a normal, non-pattern
matching variable definition. (For instance, "const { classes: Cc,
Constructor: CC, interfaces: Ci, utils: Cu } = Components" becomes
"const CC = Components.Constructor".)

MozReview-Commit-ID: DeSHcClQ7cG

--HG--
extra : rebase_source : d9c41878036c1ef7766ef5e91a7005025bc1d72b
2018-02-06 09:36:57 -08:00
Jan Henning
563537e684 Bug 1415277 - Part 2 - Only load the selected tab when restoring multiple tabs. r=esawin
The same situation applies when restoring recently closed tabs. In this case, we
can also display a nicer title for those lazily-loaded tabs by making use of the
session store data.

MozReview-Commit-ID: AJiEkTEVAUz

--HG--
extra : rebase_source : a36e0bb0cd4e3e8d62368f1ee5f51ad0c080027c
2018-02-02 21:15:28 +01:00
Jan Henning
8210e8b17e Bug 1415277 - Part 1 - Only load the selected tab when opening multiple tabs. r=esawin
Processing the contents of the tab queue will open a potentially large number of
tabs. To avoid overloading the device we should therefore only load the new
foreground tab and leave the rest to be loaded on demand, when the user selects
one of them.

MozReview-Commit-ID: 9cjoLPRscRl

--HG--
extra : rebase_source : b32f46507156cf38460cd89a8cde09a8f7a51505
2018-02-02 21:11:02 +01:00
Kris Maglione
918ed6c474 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
extra : intermediate-source : 34c999fa006bffe8705cf50c54708aa21a962e62
extra : histedit_source : b2be2c5e5d226e6c347312456a6ae339c1e634b0
2018-01-29 15:20:18 -08:00
Cosmin Sabou
9a65a40178 Backed out 3 changesets (bug 1431533) for Android mochitest failures on testEventDispatcher on a CLOSED TREE
Backed out changeset a1eca62826a1 (bug 1431533)
Backed out changeset 34c999fa006b (bug 1431533)
Backed out changeset e2674287e57f (bug 1431533)
2018-01-30 07:17:48 +02:00
Kris Maglione
6476f95b13 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
2018-01-29 15:20:18 -08:00
Brindusan Cristian
af8879d1eb Backed out 2 changesets (bug 1431533) for ESlint failures on a CLOSED TREE
Backed out changeset 6e56f4c8843e (bug 1431533)
Backed out changeset 12fc4dee861c (bug 1431533)
2018-01-30 02:32:43 +02:00
Kris Maglione
c276bb9375 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : rebase_source : c004a023389f1f6bf3d2f3efe93c13d423b23ccd
2018-01-29 15:20:18 -08:00
Gabriele Svelto
689bddee12 Bug 1421874 - Fix SessionStore to include AppConstants before using it; r=sebastian
MozReview-Commit-ID: IOSHvaOOE19

--HG--
extra : rebase_source : 674a7d486a156187bad7427abdb8a6feadf773a8
2017-12-01 15:11:21 +01:00
Gabriele Svelto
5ff191810d Bug 1402519 - When the crash reporter code is disabled at configure time replace it with a dummy implementation; r=ted.mielczarek
MozReview-Commit-ID: F5QbaI1LlmZ

--HG--
extra : rebase_source : f05c929911d27dc1598bc040df54022cd90aa06a
2017-11-14 14:49:33 +01:00
shindli
fb855aa7ba Backed out 16 changesets (bug 1402519) for conflicts during merge r=backout on a CLOSED TREE
Backed out changeset 07fcf163241a (bug 1402519)
Backed out changeset c6d2ad45d8e2 (bug 1402519)
Backed out changeset 8a3caca61294 (bug 1402519)
Backed out changeset 01425eae2c48 (bug 1402519)
Backed out changeset cf298d3815de (bug 1402519)
Backed out changeset e1964f4389cd (bug 1402519)
Backed out changeset f405337f3569 (bug 1402519)
Backed out changeset a76356fd3359 (bug 1402519)
Backed out changeset d3bb350d1c34 (bug 1402519)
Backed out changeset 9d3bfd9f932c (bug 1402519)
Backed out changeset e3dd6e5b073f (bug 1402519)
Backed out changeset e801b0c00134 (bug 1402519)
Backed out changeset 8a4139fa5dca (bug 1402519)
Backed out changeset 8d01c14ac1ca (bug 1402519)
Backed out changeset 24e0dcd01898 (bug 1402519)
Backed out changeset f8fdf450613f (bug 1402519)
2017-11-23 00:11:44 +02:00
Gabriele Svelto
014408d0f5 Bug 1402519 - When the crash reporter code is disabled at configure time replace it with a dummy implementation; r=ted.mielczarek
MozReview-Commit-ID: F5QbaI1LlmZ

--HG--
extra : rebase_source : 37aacdebc4307a21ff4f2ae27d1b031adc25737c
2017-11-14 14:49:33 +01:00
Atanas Minkov
f2f143f706 Bug 1386990 - "change" event listener no longer required for tracking form input in session store r=JanH
MozReview-Commit-ID: 1MhuLbvInl6

--HG--
extra : rebase_source : f74d7d080c6c5ea38efa39a2e5dc2cc82571396f
2017-10-01 03:26:58 +03:00
Dan Banner
9a7db035d4 Bug 1385815 - Enable more whitespace related ESLint rules for mobile/android. r=sebastian
MozReview-Commit-ID: FuM6Neob0mC

--HG--
extra : rebase_source : 29a9fbbaf74b17f4b02a835a7ef88550413514a0
2017-08-01 16:36:00 +01:00
Dan Banner
12a96894b3 Bug 1385815 - Enable whitespace related ESLint rules for mobile/android. r=sebastian
MozReview-Commit-ID: 6B79zhklsYR

--HG--
extra : rebase_source : e32d5454c793f443b2d3336b9c9aacb8cdf2f63b
2017-08-01 16:34:11 +01:00
Masatoshi Kimura
8b713b2b0f Bug 1375125 - Stop using nsILocalFile in the tree. r=froydnj
This mechanically replaces nsILocalFile with nsIFile in
*.js, *.jsm, *.sjs, *.html, *.xul, *.xml, and *.py.

MozReview-Commit-ID: 4ecl3RZhOwC

--HG--
extra : rebase_source : 412880ea27766118c38498d021331a3df6bccc70
2017-08-04 17:49:22 +09:00
Jan Henning
3c712524f9 Bug 1366098 - Part 1 - Remove Fennec tab type infrastructure. r=walkingice
The new, preferred solution for displaying additional web content outside of our normal tab infrastructure and UI is to use a separate GeckoView instance. Therefore, the support for different having additional "tab" types that aren't displayed in the normal UI, as well as for multiple GeckoApp instances displaying different tabs is no longer needed and can be removed.

MozReview-Commit-ID: FNx0gJIKybr

--HG--
extra : rebase_source : 4059e03db9586317c9c2928cef1d6dc98406319b
2017-06-27 14:13:40 -07:00
Jan Henning
cb97123df9 Bug 1359531 - Part 5 - Trigger activity switching from GeckoApp. r=sebastian,walkingice
To avoid the need for tracking the currently active activity, we just respond from the activity itself by using GeckoApp's tab event listener.

As replacement for the "closeTabNoActivitySwitch()" function, we set a flag on the activity instead before closing the tab.

MozReview-Commit-ID: LdmyJ5i10jZ

--HG--
extra : rebase_source : c960b58eae3c862f89fef188022f8d71c88f06c6
2017-04-29 15:20:19 +02:00
Jan Henning
925872d78e Bug 1360287 - Factor out history/tabs data purging into separate function to reduce session store observer complexity. r=sebastian
MozReview-Commit-ID: IhxMfUKEDgh

--HG--
extra : rebase_source : 4acce54322d85453722ec8a4a4a26f29a0a0252d
2017-05-10 23:55:26 +02:00
Jan Henning
02495c3a98 Bug 1363321 - Part 1 - Always copy crash restore settings to Java on startup. r=jchen
Those settings need to be stored in our shared preferences since they're needed before Gecko is available, however in order to allow them to be easily configured, we also expose them in about:config and sync them to the shared prefs via a change listener.

This however means that changes in the *default* value of those prefs won't be picked up. Therefore we now simply unconditionally copy the setting state into the shared preferences on startup and omit the change listener instead, as they're exposed in about:config only and there is in fact no pressing need for changes there to immediately take effect.

MozReview-Commit-ID: 7c950F1nkdj

--HG--
extra : rebase_source : 4be6e5124294a71b5d214b9ab10ada4e88aee3bb
2017-05-10 20:20:50 +02:00
Jan Henning
823bb8f884 Bug 1351808 - Part 2 - Exclude non-standard tab types from session store. r=sebastian
Restoring anything other than normal browsing tabs (e.g. custom tabs, web apps) is more involved because those tabs
- don't appear in our normal tabs UI
- are opened in separate activities
- when we're starting up, Android's task switcher might or might not still have available task entries corresponding to such tabs from the last session

Therefore, for now, the session store will simply exclude those kinds of tabs from being saved in the session store data.

Instead of a real restore, if the corresponding tab has been closed or Gecko stopped running, we just recreate the custom tab/web app based on the stored Activity intent data we have available (bug 1352997).
Tab zombification while Gecko is running however remains fully supported, as we continue collecting session history data for all tab types, even if we don't necessarily save it to disk.

Because custom tabs/web apps currently still share a common Gecko browser window with normal tabs, we also have to modify our selected tab tracking logic accordingly, so that selecting one of these special tab types doesn't overwrite the last selected normal browsing tab.

To that effect, we now track the selected tab *ID* in memory and only convert that to a tab index when writing the data to disk. As the ID remains stable while Gecko is running, this makes tracking changes for a sub-group of tabs only easier, as we don't have to watch out for closing tabs of *any* kind affecting the tab index of everything behind them.

Bug 1346008#c3 has some preliminary ideas on how session restoring for custom tabs/web apps could be made to work.

MozReview-Commit-ID: 1q5Jtv0DKrE

--HG--
extra : rebase_source : 150e61f2a205e6bc6ea6cf346de0ba42b1935d13
2017-04-08 13:43:09 +02:00
Jan Henning
4f5955815a Bug 1351808 - Part 1 - Replace some magic numbers in session store. r=sebastian
MozReview-Commit-ID: BzqieZVi7h4

--HG--
extra : rebase_source : 019d80844d65d075314ab57197793decca0853c5
2017-04-08 14:18:23 +02:00
Jan Henning
4cc5180850 Bug 1351739 - Part 4 - Handle selected tab temporarily being undefined. r=sebastian,walkingice
This can happen if closing a tab (via the back button) simultaneously also triggered an activity switch (by selecting the parent tab). In that case the tab is closed, but formal selection of the new tab only completes after we've switched activities. At the moment activity switching might trigger an application-background/foreground cycle, which means we could hit the selected tab temporarily being undefined in Gecko.

MozReview-Commit-ID: 6p4cOqj29HX

--HG--
extra : rebase_source : 81db83e79d31cf6398f449bba14a4fb1bdc97810
2017-04-09 19:49:02 +02:00
Sebastian Hengst
e1f043f96f Backed out changeset f349db3287ad (bug 1351808) for bustage on Android in GeckoApp.java. r=backout 2017-04-27 20:33:40 +02:00
Sebastian Hengst
b53ff60076 Backed out changeset 4aa74fee0d37 (bug 1351808) 2017-04-27 20:33:03 +02:00
Jan Henning
bc56a16f39 Bug 1351808 - Part 2 - Exclude non-standard tab types from session store. r=sebastian
Restoring anything other than normal browsing tabs (e.g. custom tabs, web apps) is more involved because those tabs
- don't appear in our normal tabs UI
- are opened in separate activities
- when we're starting up, Android's task switcher might or might not still have available task entries corresponding to such tabs from the last session

Therefore, for now, the session store will simply exclude those kinds of tabs from being saved in the session store data.

Instead of a real restore, if the corresponding tab has been closed or Gecko stopped running, we just recreate the custom tab/web app based on the stored Activity intent data we have available (bug 1352997).
Tab zombification while Gecko is running however remains fully supported, as we continue collecting session history data for all tab types, even if we don't necessarily save it to disk.

Because custom tabs/web apps currently still share a common Gecko browser window with normal tabs, we also have to modify our selected tab tracking logic accordingly, so that selecting one of these special tab types doesn't overwrite the last selected normal browsing tab.

To that effect, we now track the selected tab *ID* in memory and only convert that to a tab index when writing the data to disk. As the ID remains stable while Gecko is running, this makes tracking changes for a sub-group of tabs only easier, as we don't have to watch out for closing tabs of *any* kind affecting the tab index of everything behind them.

Bug 1346008#c3 has some preliminary ideas on how session restoring for custom tabs/web apps could be made to work.

MozReview-Commit-ID: 1q5Jtv0DKrE

--HG--
extra : rebase_source : 150e61f2a205e6bc6ea6cf346de0ba42b1935d13
2017-04-08 13:43:09 +02:00
Jan Henning
1e1372dff5 Bug 1351808 - Part 1 - Replace some magic numbers in session store. r=sebastian
MozReview-Commit-ID: BzqieZVi7h4

--HG--
extra : rebase_source : 019d80844d65d075314ab57197793decca0853c5
2017-04-08 14:18:23 +02:00
Florian Queze
4b1556a5f2 Bug 1355056 - replace (function(args) { /* do stuff using this */ }).bind(this) with arrow functions, r=jaws. 2017-04-27 00:25:45 +02:00
Florian Queze
f935ddc4b3 Bug 1356569 - Remove notifyObservers' last parameter when it is falsy, r=jaws. 2017-04-14 21:51:39 +02:00
Florian Queze
37ff4fc7cc Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Sebastian Hengst
a07223d699 Backed out changeset 322fde2d53bf (bug 1356569) so bug 1355161 can be backed out. r=backout 2017-04-14 23:39:22 +02:00
Sebastian Hengst
738d097aae Backed out changeset 55f3df15eaa6 (bug 1356569) 2017-04-14 23:39:17 +02:00