Commit graph

134 commits

Author SHA1 Message Date
Gijs Kruitbosch
ad73d26a8a Bug 1803158 - convert session restore JSMs to sys.mjs ESMs, r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D163349
2022-12-06 16:02:02 +00:00
Victor Porof
1f830c96da Bug 1561435 - Format browser/components/, a=automatic-formatting
# ignore-this-changeset

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

--HG--
extra : source : d3afcafdce650a6f36cebbc126ee93b17f13cf52
2019-07-05 09:53:32 +02:00
Kris Maglione
e930b89c34 Bug 1514594: Part 3 - Change ChromeUtils.import API.
***
Bug 1514594: Part 3a - Change ChromeUtils.import to return an exports object; not pollute global. r=mccr8

This changes the behavior of ChromeUtils.import() to return an exports object,
rather than a module global, in all cases except when `null` is passed as a
second argument, and changes the default behavior not to pollute the global
scope with the module's exports. Thus, the following code written for the old
model:

  ChromeUtils.import("resource://gre/modules/Services.jsm");

is approximately the same as the following, in the new model:

  var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");

Since the two behaviors are mutually incompatible, this patch will land with a
scripted rewrite to update all existing callers to use the new model rather
than the old.
***
Bug 1514594: Part 3b - Mass rewrite all JS code to use the new ChromeUtils.import API. rs=Gijs

This was done using the followng script:

https://bitbucket.org/kmaglione/m-c-rewrites/src/tip/processors/cu-import-exports.jsm
***
Bug 1514594: Part 3c - Update ESLint plugin for ChromeUtils.import API changes. r=Standard8

Differential Revision: https://phabricator.services.mozilla.com/D16747
***
Bug 1514594: Part 3d - Remove/fix hundreds of duplicate imports from sync tests. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16748
***
Bug 1514594: Part 3e - Remove no-op ChromeUtils.import() calls. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16749
***
Bug 1514594: Part 3f.1 - Cleanup various test corner cases after mass rewrite. r=Gijs
***
Bug 1514594: Part 3f.2 - Cleanup various non-test corner cases after mass rewrite. r=Gijs

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

--HG--
extra : rebase_source : 359574ee3064c90f33bf36c2ebe3159a24cc8895
extra : histedit_source : b93c8f42808b1599f9122d7842d2c0b3e656a594%2C64a3a4e3359dc889e2ab2b49461bab9e27fc10a7
2019-01-17 10:18:31 -08:00
Kris Maglione
abd0ca0a65 Bug 1474139: Part 2 - Move content-sessionStore to a separate JSM. r=mikedeboer
MozReview-Commit-ID: 5weG4B4V1PY

--HG--
rename : browser/components/sessionstore/content/content-sessionStore.js => browser/components/sessionstore/ContentSessionStore.jsm
extra : rebase_source : 48d77f303ea6e0725b87467589d4a3f0c4ac4bdb
2018-07-07 16:42:28 -07:00
Kris Maglione
d9a89091dd Bug 1474139: Part 1 - Refactor content-sessionSstore to not depend on running in a frame script global. r=mikedeboer
MozReview-Commit-ID: 2uiKk9B8KWy

--HG--
extra : rebase_source : b36defff266f448473bd5029416ee5bfea507765
2018-07-07 16:30:56 -07:00
Kris Maglione
12038802ae Bug 1474131: Don't load ContentRestore.jsm before it's needed. r=mconley
MozReview-Commit-ID: 6ftGscrrdRb

--HG--
extra : rebase_source : 84c764beba61ec7e761a67dd008cbe5c2912e2ed
extra : histedit_source : 7847481d5a07e8e40ca5c744e63d46f86dcce1a3
2018-07-07 15:43:42 -07:00
Adam Gashlin
300eff4753 Bug 1458119: Part 1: Use idleDispatch to be independent from a content window. r=mikedeboer
When using content.requestIdleCallback(), the idle callback may not be
run by the time the content goes away, resulting in a missed send.
ChromeUtils.idleDispatch does not have this issue.

MozReview-Commit-ID: DdGMr6j80sZ

--HG--
extra : rebase_source : 8886a199416e5a526faf6a0895a71fdc9752d555
2018-05-27 11:21:49 -07:00
Jan Henning
3dfb944b8d Bug 1456391 - Part 3: Use new mapFrameTree version on Desktop. r=mikedeboer
MozReview-Commit-ID: AUQXLPnO1CH

--HG--
extra : rebase_source : b1763d7faa2c8487fc23e038dd1417c230137288
2018-04-25 22:07:31 +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
35ef0df4d4 Bug 1453487 part 1. Stop using XPCWrappedNative for nsIDOMEventListener. r=smaug
MozReview-Commit-ID: Es4fEdGDzbx
2018-04-12 00:05:38 -04:00
Nika Layzell
4464c02334 Bug 1434768 - Part 3: Rewrite JS consumers of .sessionHistory, r=bz 2018-04-10 17:49:45 -04: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
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
Ryan VanderMeulen
2af1d9d442 Bug 1432486 - Remove the unneeded FX_SESSION_RESTORE_DOM_STORAGE_SIZE_ESTIMATE_CHARS probe. r=mikedeboer 2018-01-25 09:28:22 -05:00
Kris Maglione
aec63e140c Backed out 3 changesets (bug 1431533) for Android mochitest bustage. CLOSED TREE
MozReview-Commit-ID: 5ubE9EMQpZ9

--HG--
extra : histedit_source : df68d7595925c07d9d6e8bacc2c46e69556f479a%2C72b768b9825e20ede6603ead75f871c50dc041f7
2018-01-24 22:04:59 -08:00
Kris Maglione
30b3a49bfd Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
MozReview-Commit-ID: 8V1ZT53ReiP

--HG--
extra : rebase_source : 12b5f8c3e125111db7382eb3d7d20a99fb2c35b3
extra : absorb_source : e99fa7f6eee02e7e6cadeb898c7fcf6dac9c902a
extra : histedit_source : d0dfc31fadc2b81d341c9d0cd1efec02923c003b
2018-01-24 15:48:47 -08:00
Nika Layzell
28a22bf152 Bug 1383876 - Part 6: Fix eslint failures, a=bustage
MozReview-Commit-ID: 90yfcMlr6UU
2018-01-12 18:40:53 -05:00
Nika Layzell
e0822be7b9 Bug 1383876 - Part 2: Remove GroupedSHistory and Prerendering logic from JS code, r=freesamael
MozReview-Commit-ID: KwvOcgQKheK
2018-01-12 17:52:54 -05:00
Dan Banner
7caa92d5d8 Bug 1408777 - Automatically fix instances of missing semicolons in the tree. r=Standard8
MozReview-Commit-ID: Jm8BRgt6mIv
2017-10-15 20:50:39 +01:00
Kris Maglione
76f5de43e0 Bug 1401422: Bail out from idle callback if frameloader is being destroyed. r=mikedeboer
MozReview-Commit-ID: Je8rUC9PoLH

--HG--
extra : rebase_source : 9f690a2f567928cc046ddff031f4baadbbd3e79f
2017-09-19 18:51:52 -07:00
Will Wang
1e04e92d6a Bug 1365970 - Move data collector timer in the content process to idle dispatch. r=mikedeboer 2017-09-13 21:06:06 +08:00
Sebastian Hengst
e3a43a94a2 Backed out changeset 6ee4de08ac37 (bug 1365970) for leaks on Windows, e.g. in browser-chrome's browser/base/content/test/webextensions/browser_extension_update_background.js. r=backout on a CLOSED TREE 2017-09-08 16:05:21 +02:00
Will Wang
59df6942e0 Bug 1365970 - Move data collector timer in the content process to idle dispatch. r=mikedeboer 2017-09-08 18:05:42 +08:00
Tim Taubert
ef4e38b6ea Bug 1386867 - Fix quantum_pageload_google talos regression r=mystor 2017-08-30 14:57:00 +02:00
Tim Taubert
26a7909744 Bug 1373672 - Part 1: Filter events from dynamic docShells in Gecko before they reach SessionStore event handlers r=smaug,mystor 2017-08-02 19:08:04 +02:00
Bevis Tseng
16c9a58ee8 Bug 1384041 - Label the use of setTimeout of Timer.jsm in content-sessionStore.js. r=billm
MozReview-Commit-ID: i8Rn1eke4s
2017-07-28 16:03:51 +08:00
Sebastian Hengst
c3bdf442b0 Backed out changeset e62c93a8c93b (bug 1373672) for bustage at nsSessionStoreUtils.cpp:21: bad implicit conversion constructor for 'DynamicFrameEventFilter, and e.g. eslint failures. r=backout on a CLOSED TREE
--HG--
extra : amend_source : 7ae39f6dca050173fd0c1103d309b7a9a175a377
2017-08-01 12:39:21 +02:00
Tim Taubert
36e075eddf Bug 1373672 - Part 1: Filter events from dynamic docShells in Gecko before they reach SessionStore event handlers r=smaug,mystor 2017-07-21 14:57:30 +02:00
Marco Castelluccio
0abc80eebf Bug 1357517 - Remove or delay Preferences.jsm usage from some browser/components/* files. r=Gijs
--HG--
extra : rebase_source : 8ae926bfde827b9a5323d6fb96dc231d429ab9b0
2017-07-31 13:25:41 +02:00
Tim Taubert
13ee60d3e3 Bug 1382635 - FormDataListener shouldn't listen for change events r=mikedeboer 2017-07-21 10:35:25 +02:00
Tim Taubert
a92639f8e8 Bug 1348816 - Remove PageStyle collection/restoration from SessionStore r=mikedeboer 2017-07-21 10:35:20 +02:00
Ehsan Akhgari
941548abbb Bug 1374892 - Implement nsISHistoryListener::OnLengthChanged/OnIndexChanged on the JS implementations to avoid generating silent exceptions when Gecko calls these functions; r=freesamael 2017-06-22 00:30:37 -04:00
Tim Taubert
00fc6cad00 Bug 1362058 - Further limit the amount of sessionStorage data we store and serialize r=mikedeboer 2017-05-05 12:17:09 +02:00
Tim Taubert
c9074e0e0a Bug 1360916 - Update telemetry code in sessionstore content script r=mikedeboer data-r=bsmedberg
This patch replaces FX_SESSION_RESTORE_CONTENT_COLLECT_DATA_LONGEST_OP_MS with
a more fine-grained data collection via a keyed histogram so that we can
determine which type of data collection we spend a lot of time on.

Additionally, it abandons sending telemetry data from the content to the parent
via custom messages and instead uses the Telemetry service directly. Thus it
also gets rid of a bug that currently overrides measurements for the same
histogram done quickly in succession
2017-05-03 12:06:34 +02:00
Sebastian Hengst
d462b93aeb Backed out changeset ec64ea9b1249 (bug 1360916) for failing browser_sessionStorage_size.js. r=backout 2017-05-03 00:25:07 +02:00
Tim Taubert
142cf6d7de Bug 1360916 - Update telemetry code in sessionstore content script r=mikedeboer data-r=bsmedberg
This patch replaces FX_SESSION_RESTORE_CONTENT_COLLECT_DATA_LONGEST_OP_MS with
a more fine-grained data collection via a keyed histogram so that we can
determine which type of data collection we spend a lot of time on.

Additionally, it abandons sending telemetry data from the content to the parent
via custom messages and instead uses the Telemetry service directly. Thus it
also gets rid of a bug that currently overrides measurements for the same
histogram done quickly in succession.
2017-05-02 23:22:45 +02:00
Gabor Krizsanits
b007d78f5d Bug 1352961 - P2: Measure for the delay before a new tab starts processing the first URL. r=mconley, data-r=bsmedberg
Opening pages in a new tab might suffer an extra delay from e10s-multi because
the new process has to start up and then run all the process / frame scripts
before it can react on the request from the parent to load the first page.

There are two code paths. Either we start the tab with a remote browser and
then the RemoteWebNavigation will send the request. Or we start with a non-remote
browser and have to change the remoteness flag on it, and then the SessionStore
will send the request.

In each cases we start the timer on the parent side, send it with the message,
and when the child receives it it stops the timer and reports the measured delay.
2017-04-25 17:11:12 +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
Florian Queze
95d4d20c17 Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Jan Henning
6d4628844f Bug 1265818 - Part 3 - Store and restore the LayoutHistoryState through SessionHistoy.jsm. r=mikedeboer
Since a LayoutHistoryState is basically just a collection of PresStates, we just save each PresState we can find and then later restore it.

MozReview-Commit-ID: A6WpdelseHn

--HG--
extra : rebase_source : 21c2929ed64ff5ef046ea65664af78cdad517786
2017-03-25 15:32:36 +01:00
Mike Conley
132aa6c7f2 Bug 1348613 - Only use sync message for SessionStore:restoreHistoryComplete for non-remote tabs. r=mikedeboer
MozReview-Commit-ID: IuOtKpudDTU

--HG--
extra : rebase_source : 9cd70dd4d6bd2807742e2e84da0c4cc7cc2a2f35
2017-03-27 12:56:38 -04:00
Mike Conley
3715be2910 Bug 1348613 - Make SessionStore:restoreTabContentStarted message always async. r=mikedeboer
MozReview-Commit-ID: 8TwPFUbXluW

--HG--
extra : rebase_source : b450809f61d7acb4e83788895bc77adafabfde86
2017-03-27 12:15:50 -04:00
Mike Conley
6b9cc68a36 Bug 1256472 - Add a reason to the restoreTabContent function and message. r=Gijs,mikedeboer
This helps differentiate restorations that were caused by navigateAndRestore, as opposed
to SessionStore having set state via setBrowserState, setWindowState, or setTabState.

MozReview-Commit-ID: DEEbKLh7f7p

--HG--
extra : rebase_source : c48ab225d17128041ccbde4e5cc8c87899166b9e
2017-03-14 09:55:54 -04:00
Sebastian Hengst
fa3375c4ed Backed out changeset ba60dcd190ad (bug 1256472) for leaks in browser_windowStateContainer.js. r=backout 2017-03-16 17:24:01 +01:00
Mike Conley
9ce53ecd28 Bug 1256472 - Add a reason to the restoreTabContent function and message. r=Gijs,mikedeboer
This helps differentiate restorations that were caused by navigateAndRestore, as opposed
to SessionStore having set state via setBrowserState, setWindowState, or setTabState.

MozReview-Commit-ID: DEEbKLh7f7p

--HG--
extra : rebase_source : 7fa68acf1ffd85f28af2be9c00f2ef65b21375f6
2017-03-14 09:55:54 -04:00