Commit Graph

23 Commits

Author SHA1 Message Date
Florian Quèze
682b1ec3b2 Bug 1440284 - change this.EXPORTED_SYMBOLS back to var EXPORTED_SYMBOLS in JS modules, r=mccr8. 2018-02-23 20:50:01 +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
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
Andrea Marchesini
207b8d909e Bug 1347515 - Get rid of nsIJSON.decodeFromStream, r=qdot 2017-11-10 00:27:22 +01:00
Kit Cambridge
43440ab4cd Bug 1401236 - Don't reread already loaded data in JSONFile#load. r=Gijs
MozReview-Commit-ID: AHD5G453GHM

--HG--
extra : rebase_source : a3787ad99b167c4ff38e82540e3e36d7d8d28734
2017-09-19 09:59:27 -07:00
Kris Maglione
80178f8d4d Bug 1391707: Part 1 - Use idle dispatch in DeferredTask. r=florian
MozReview-Commit-ID: Ktlu71aIcRZ

--HG--
extra : rebase_source : f1bd118a1d869deddb5fe9107641f848cf4165e3
2017-09-01 16:39:14 -07:00
Kris Maglione
e86d905625 Bug 1370752: Part 2 - Allow fallback serializer when JSON.serialize fails. r=aswan
Currently, we need to be able to handle serializing non-JSON-compatible
objects without catastrophically failing to save the storage file. Ideally, we
would ensure this in the ordinary toJSON method. However, that would require
a unnecessary extra calls to JSON.stringify for each object that needs to be
sanitized before returning a JSON-safe value, which is more expensive than we
can afford.

The fallback toJSONSafe method allows us to do this only when necessary, due
to an initial failed JSON serialization.

MozReview-Commit-ID: JXQ001dOGtW

--HG--
extra : rebase_source : ae52bdab81b03bb4c31edbe4b78584fd15c982a3
extra : source : 9c4bf59ab966a8ec17181d85cc1fc4be7450cca3
2017-06-09 18:19:11 -07:00
Wes Kocher
8185294d28 Backed out 2 changesets (bug 1370752) for failures in test_ext_storage.js a=backout
Backed out changeset 42d3c1599af5 (bug 1370752)
Backed out changeset 9c4bf59ab966 (bug 1370752)

MozReview-Commit-ID: 4M6DsJvJ6RI
2017-07-10 14:34:56 -07:00
Kris Maglione
45acce829f Bug 1370752: Part 2 - Allow fallback serializer when JSON.serialize fails. r=aswan
Currently, we need to be able to handle serializing non-JSON-compatible
objects without catastrophically failing to save the storage file. Ideally, we
would ensure this in the ordinary toJSON method. However, that would require
a unnecessary extra calls to JSON.stringify for each object that needs to be
sanitized before returning a JSON-safe value, which is more expensive than we
can afford.

The fallback toJSONSafe method allows us to do this only when necessary, due
to an initial failed JSON serialization.

MozReview-Commit-ID: JXQ001dOGtW

--HG--
extra : rebase_source : 0b7b388316fdc464b47cdd4f7d8c70bc906a9c27
2017-06-09 18:19:11 -07:00
Kris Maglione
074f5a19ce Bug 1358846: Part 2 - Allow using file compression with JSONFile.jsm. r=rhelmer
MozReview-Commit-ID: 5lHsZqBGq3E

--HG--
extra : rebase_source : 1df59152becd11bd95b97fc94ebca83392c17027
extra : source : cb2518673c56cf3b45e4d4a8f2959191290c00d8
2017-04-22 18:23:22 -07:00
Florian Quèze
1d0e28a791 Bug 1353542 - script-generated patch to remove .bind(this) calls we no longer need now that generator functions have been replaced with async functions, r=Mossop. 2017-05-12 14:47:41 +02:00
Florian Quèze
5e3539e504 Bug 1353542 - massive script-generated patch converting Task.async and Task.spawn calls, and generators clearly identifiable as tasks, rs=Mossop. 2017-05-12 14:42:39 +02:00
Kit Cambridge
c8df401c3d Bug 1332024 - Add a method to explicitly finalize JSONFile objects. r=Paolo
MozReview-Commit-ID: QaRqLBGEft

--HG--
extra : rebase_source : 60eebe06afc5795463780eb99e4e6c42372d7e8b
2017-01-24 17:38:35 -08:00
Kit Cambridge
a509364284 Bug 1319175 - Add a data setter and beforeSave hook to JSONFile. r=MattN
* The `data` setter sets the backing data object to a new value, and
  flips `dataReady` so that `ensureDataReady` and `load` don't read
  stale data from disk. This can be used to clear existing data.
* The `beforeSave` hook is called from `_save`, as part of the deferred
  task. This can be used to create intermediate directories containing
  the file, or run other pre-save tasks that shouldn't be interrupted
  by shutdown.

MozReview-Commit-ID: AzOx7u2Rali

--HG--
extra : rebase_source : 42c0235774ca34e097e858b6ef796c4d1bd4f122
2016-12-19 08:32:29 -08:00
Dave Townsend
c5bb304fd9 Bug 1316882: Turn on space-before-function-paren eslint rule (toolkit). r=jaws
MozReview-Commit-ID: FGFwg6TYkvm

--HG--
extra : rebase_source : 4073cebbef1694393efe312aaafbdb803adbd304
2016-11-11 15:22:34 -08:00
Jared Wein
87b2d4c295 Bug 1315013 - part 1, remove unnecessary double-slash comments that don't add value and look out of place with the spaced-comment eslint rule. r=mossop
MozReview-Commit-ID: HIUTSdkXxbY

--HG--
extra : rebase_source : 2f05e2f275ac7f293f9c650bdec8943189e3ce01
2016-11-03 14:42:06 -04:00
Jared Wein
5040f17e00 Bug 1312486 - Enable no-extra-boolean-cast, no-new-object, no-shadow-restricted-names, and spaced-comment rules for eslint. r=standard8
MozReview-Commit-ID: 7Gx90a5y8t6

--HG--
extra : rebase_source : 9c8a6b15c19982d720b0163fbbf19d465da786fe
2016-10-24 13:14:19 -04:00
Luke Chang
aa29135011 Bug 1309481 - Remove leftover code specific to Logins from JSONFile.jsm and add tests; r=Paolo
MozReview-Commit-ID: DjEPCN2PXA1

--HG--
extra : rebase_source : d1150d6a0cbc94282d6120f38c094fb58eed9d5e
2016-10-17 18:26:35 +08:00
Luke Chang
e55158ff06 Bug 1304322 - Refactor LoginStore.jsm to make it reusable for Form Autofill; r=MattN
MozReview-Commit-ID: Kx8aALU7fu2

--HG--
rename : toolkit/components/passwordmgr/LoginStore.jsm => toolkit/modules/JSONFile.jsm
extra : rebase_source : c22f5e8d79e0727ebe562e746fa1f8232600f8aa
2016-09-21 17:29:48 +08:00