Commit graph

52 commits

Author SHA1 Message Date
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
Mark Banner
6feaa5a9c3 Bug 1478308 - Remove unnecessary ChromeUtils.imports in browser/ r=mikedeboer
MozReview-Commit-ID: BYTDdLU2HoM

--HG--
extra : rebase_source : 1e31ff288280d09ae226cdc698331263ba969205
2018-07-25 09:10:07 +01:00
Narcis Beleuzu
d47c829065 Backed out 4 changesets (bug 1478308) for ESlint failure on AttributionCode.jsm. CLOSED TREE
Backed out changeset a809b45ff49b (bug 1478308)
Backed out changeset c68131530742 (bug 1478308)
Backed out changeset 0e4ba7a6dc1a (bug 1478308)
Backed out changeset 32a27f317a77 (bug 1478308)
2018-07-26 11:13:28 +03:00
Mark Banner
180233c593 Bug 1478308 - Remove unnecessary ChromeUtils.imports in browser/ r=mikedeboer
MozReview-Commit-ID: BYTDdLU2HoM

--HG--
extra : rebase_source : 67dc15c0cdff0234d3274f1a8978d1f2a5b3f411
2018-07-25 09:10:07 +01:00
Kris Maglione
7b7264f453 Bug 1464548: Part 3 - Update callers to use defineLazyGlobalGetters. r=mccr8
MozReview-Commit-ID: 9APGewiDDYB

--HG--
extra : rebase_source : 2931dd0eec0e4206414b698a9700fc20d922eb3a
2018-05-25 17:02:29 -07:00
Gijs Kruitbosch
86865a4a46 Bug 1448920 - add support for importing Edge typed URL history from its database instead, r=mak
MozReview-Commit-ID: 6AzEJluqn73

--HG--
extra : rebase_source : 79dbb73115de6a20511eb8b2cd0273f7d1f08bd5
2018-04-18 17:50:36 +01:00
Ganesh Chaitanya Kale
e44c888947 Bug 1282770 - Convert uses of PU.asyncHistory.updatePlaces in browser/components/migration to PU.history.insertMany. r=mak
Patch originally by Ganesh, updated by Standard8

MozReview-Commit-ID: AihTLo5OyK1

--HG--
extra : rebase_source : f5a886326dd7f2fb2dba3309199ef277affe6b77
2018-03-20 12:36:31 +00: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
Florian Quèze
2b1c8dccb6 Bug 1339461 - script-generated patch to convert foo.indexOf(...) == -1 to foo.includes(), r=Mossop. 2018-02-01 20:45:22 +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
Doug Thayer
efdd84d094 Bug 862127 - Make migration interfaces more async r=Gijs
In order to clean up sync IO within our profile migrators, we
need to have async interfaces for those parts which are currently
doing sync IO. This converts the sync interfaces and adjusts most
of the call sites (migration.js call site changes are addressed
in a separate patch to break it out a bit).


MozReview-Commit-ID: 2Kcrxco4iYr

--HG--
extra : rebase_source : 53d123c435e43622a999a7e849dddbe1919061e0
2018-01-12 09:06:21 -08:00
Sam R-T, Joseph F, Robin H
b6f7cc8e46 Bug 1432062 - Require dangling commas via eslint for the migration component. r=MattN 2018-01-22 15:22:35 -08:00
Doug Thayer
dcdcf8ed13 Bug 1430318 - Fix getLastUsedDate bugs from using typedURLs r=mak
getLastUsedDate should be converting the microseconds of typedURLs
into milliseconds.

MozReview-Commit-ID: DjJKm5aPcGD

--HG--
extra : rebase_source : 017a33f2599b779403988997145d5d1a9acdf109
2018-01-17 11:15:27 -08:00
Dan Banner
b2e847755c Bug 1367704 - Enable the semi ESLint rule across the tree. r=standard8
MozReview-Commit-ID: GrlcOI9K2hJ

--HG--
extra : rebase_source : 6574cf3c67eb11733ffd9999c260f71c8551abc4
2017-05-28 19:57:46 +01:00
Mark Banner
4fb45e5b8c Bug 1365412 - Clean up various ESLint global definitions in browser/. r=mossop
MozReview-Commit-ID: JqAm9x1XGCM

--HG--
extra : rebase_source : e9215288195f1fe683832db53d87dbe77c697b4c
2017-05-16 22:22:42 +01: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
Gijs Kruitbosch
9280fcd667 Bug 1353373 - fix Edge readinglist imports, r=jaws
MozReview-Commit-ID: Fu9n3FIrxf6

--HG--
extra : rebase_source : d438f2ef4c13f998ee8928a218f504dd4cc43471
2017-04-04 16:18:17 +01:00
Gijs Kruitbosch
a3d0dad905 Bug 1349632 - fix hangs when trying to import bookmarks from Edge, r=dao
MozReview-Commit-ID: 1xF16KddJBv

--HG--
extra : rebase_source : 353b2e6b3c77fea60c28c47ac0de31e09cb3ea6a
2017-03-25 09:49:26 +00:00
Sebastian Hengst
b367430bdc Backed out changeset fff5c87922e6 (bug 1349632) for failing xpcshell test test_Edge_db_migration.js. r=backout 2017-03-23 17:17:03 +01:00
Gijs Kruitbosch
b854ac3c01 Bug 1349632 - fix hangs when trying to import bookmarks from Edge, r=dao
MozReview-Commit-ID: 1xF16KddJBv

--HG--
extra : rebase_source : 8d03827b28fbb17cabc8012a2581159315b4027e
2017-03-22 18:07:36 +00:00
Gijs Kruitbosch
6e21985362 Bug 1344759 - batch-insert bookmarks when importing from Edge, IE, Safari or Chrome, r=dao
MozReview-Commit-ID: Dhvw0Y0fm5x

--HG--
extra : rebase_source : 284e016c0ae26b6e58859500ce36ba7c63f51b8d
2017-03-13 23:46:16 +00:00
Gijs Kruitbosch
45ee91cb6b Bug 1344644 - stop supporting outdated Edge bookmarks format to avoid hangs trying to open bookmarks database when Edge is open, r=dao
MozReview-Commit-ID: 2KihobvE8nV

--HG--
extra : rebase_source : 92094268ff3feec1cbc0e20a2af2750ca7d15fd0
2017-03-07 14:09:34 +00:00
Gijs Kruitbosch
288e9a57a7 Bug 1341097 - part 2: allow turning off notifications for individual inserted results when calling updatePlaces, r=mak
This sets a property on the callback object rather than passing an argument
to handleCompletion, to avoid accidentally breaking consumers who don't
expect arguments. The downside is that this required more changes to C++
consumers, but we control all of those so that seemed an acceptable
trade-off.

We should probably actually report errors for all the migrators, but I didn't
want to add risk (what if in some edge-case there are lots?) so I didn't. I'll
file a followup to update them to Cu.reportError() any errors.

MozReview-Commit-ID: Hue9Ci3hyVz

--HG--
extra : rebase_source : e853911e2ec8fe2e1273baa1f31fd557935ef896
2017-02-21 14:20:21 +00:00
Florian Quèze
028a82f682 Bug 1329182 - remove trailing newURI null parameters in browser/, r=jaws. 2017-01-09 20:27:25 +01:00
Jared Wein
ecab54a7c9 Bug 1325464 - Enable object-shorthand rule and run 'mach eslint --fix' with the rule enabled. r=MattN
MozReview-Commit-ID: 7E7LPorrEje

--HG--
extra : rebase_source : 0572a35415a766a3f31d266760ecd07f0dcc3f72
2016-12-29 18:34:54 -05:00
Wes Kocher
0dfb7c2b5c Backed out 3 changesets (bug 1325464) for xpcshell failures a=backout
Backed out changeset 562ddc32cc21 (bug 1325464)
Backed out changeset cd10db6087dd (bug 1325464)
Backed out changeset 4079437c4648 (bug 1325464)
2016-12-29 14:05:44 -08:00
Jared Wein
7255df4e9a Bug 1325464 - Enable object-shorthand rule and run 'mach eslint --fix' with the rule enabled. r=MattN
MozReview-Commit-ID: 8WoGr8i6oCR

--HG--
extra : rebase_source : da7172285d43b820421557ed3b05887e091ff939
2016-12-29 15:20:47 -05:00
Dave Townsend
35f308c33a Bug 1316882: Turn on rest-spread-spacing eslint rule. r=felipe
MozReview-Commit-ID: EbRmrGz1G0a

--HG--
extra : rebase_source : be99c7cd82799f32d384c2c2621db2ed36f165d8
2016-11-10 15:12:47 -08:00
Gijs Kruitbosch
9437918402 Bug 1279501 - add telemetry for the number of bookmarks, history visits and logins are imported from another browser, r=bsmedberg,mak
MozReview-Commit-ID: EiZfkj6AsVL

--HG--
extra : rebase_source : ce2776740d29ae6eb5e93d8d791ca917510352b8
2016-10-22 14:40:48 +01:00
Wes Kocher
7e9c4a34c8 Backed out changeset 77012ce07e57 (bug 1279501) a=gijs 2016-11-01 10:47:59 -07:00
Gijs Kruitbosch
8aab2885d4 Bug 1279501 - add telemetry for the number of bookmarks, history visits and logins are imported from another browser, r=bsmedberg,mak
MozReview-Commit-ID: EiZfkj6AsVL

--HG--
extra : rebase_source : 288154d79b230fd1205449af81b8361215c04161
2016-10-22 14:40:48 +01:00
Gijs Kruitbosch
8d23ab9355 Bug 1311043 - make eslint much more strict in browser/components/migration/, and fix issues, r=mikedeboer
MozReview-Commit-ID: RXO68w3Kv3

--HG--
extra : rebase_source : b25a1976f2be89f12c2ad14e649270bacd17d174
2016-10-18 16:03:06 +01:00
Gijs Kruitbosch
579b36016a Bug 1276694 - store recency of browser data in telemetry when importing to see how good a predictor default browser is, r=dolske,bsmedberg
MozReview-Commit-ID: 16uPNGGDE68

--HG--
extra : rebase_source : fdb3ad8a3429079cb23cddd4a003b03043a95728
2016-05-30 17:10:54 +01:00
Gijs Kruitbosch
0b885cef41 Bug 1236154 - add test for ESE migration code, r=MattN
MozReview-Commit-ID: 5lILvkVn3tW

--HG--
extra : rebase_source : 9365c2fc58f0020927f8fcefc1475f3bfb1ca9d6
extra : amend_source : 6100f05bfc75d06a9884192a42ce15b10b710da6
2016-02-11 18:46:32 +00:00
Gijs Kruitbosch
3475d4e50a Bug 1226556 - part 3: add tableExists to ESEDBReader, use it to fall back to normal bookmarks migration, r=MattN
--HG--
extra : commitid : 9Ufl20lpqGu
extra : rebase_source : b416f9298c5b98538418918ee7263ca2e5c0e95f
extra : amend_source : 73cd202726de1c781c7ae2c84d94c9d89344d2d5
2016-02-03 14:46:36 +00:00
Gijs Kruitbosch
4393f911ee Bug 1226556 - part 2: use ESE database to import Edge bookmarks, r=MattN
--HG--
extra : commitid : AZf8zXKKc6j
extra : rebase_source : bcc6624f825d2ac952c925f3a7ccfb78f80ff97d
2016-01-30 11:22:19 +00:00
Gijs Kruitbosch
7822dd0325 Bug 1237679 - use sourceLocked to ensure users get warned to close the browser before running the migration, r=MattN
--HG--
extra : commitid : DHcwrAuS4vt
extra : rebase_source : e356c82327ef18ce8575cf5410f183b9c58ed937
2016-01-28 16:35:04 +00:00
Gijs Kruitbosch
e0cb4c6f0e Bug 1229076 - use JS module for reading ESE database, r=MattN
--HG--
extra : commitid : 6bOAdWBbIzZ
extra : rebase_source : ab98cabe12a9018150eec86a7a540890164c324f
extra : amend_source : b9c668f02b2212749680353399e1b4c414ed3958
2015-12-01 20:24:54 +00:00
Gijs Kruitbosch
0f4df510d0 Bug 1225798 - part 2: move reading list import to its own bookmarks migrator source, r=MattN
--HG--
extra : commitid : JXiSqZFo7ix
extra : rebase_source : 527e26c9464fd20c722a9934afff2064fb3b751b
extra : histedit_source : 728b626d261619df65829d7df155213d3d2034af
2015-11-18 11:56:02 +00:00
Gijs Kruitbosch
b81daea0ab Bug 1164675 - hide min/max/restore buttons in the main window in windows 10 tablet mode, r=jaws
--HG--
extra : commitid : A3v45wmzyhs
extra : rebase_source : 4c284994b5f8e066af6f6206f981bab21f3c8d90
2015-10-20 14:56:17 +01:00
Gijs Kruitbosch
4e2577e37c Bug 1205053 - use registry typedURLs to import rudimentary history from MS Edge, r=dolske
--HG--
extra : commitid : 5c0aDxUWRp0
extra : rebase_source : 2762ed6466d7f0ab13e619c52f1cebdf6d3073b1
2015-09-15 22:18:41 +01:00
Riadh Chtara
fee7458f73 Bug 1192035 - Import passwords from Microsoft Edge / Windows 8+ r=Gijs,MattN
--HG--
extra : commitid : AaC7tUofwqc
extra : rebase_source : 319a2efb59d4364ba62af2faeccb9f4f7a90fcf0
extra : amend_source : b6e7531af68b996c16042cb618899567e46f5280
2015-09-16 17:34:26 -07:00
Gijs Kruitbosch
5fc3e466d1 Bug 1200598 - fix exception thrown when using migration on win8.1 or below, r=MattN
--HG--
extra : commitid : 3j5SbGu5lGn
extra : rebase_source : 90d8ed4c2e97bead6fae43191912fb9ce86d2f4a
extra : amend_source : b02acda0370363a3893c00d2044a5b322a8c9734
2015-09-08 16:16:56 +01:00
Gijs Kruitbosch
9b55c67e43 Bug 1193387 - Import reading list from MS Edge. r=jaws 2015-08-26 15:34:02 +01:00
Ryan VanderMeulen
eb506212ab Backed out changeset ef82210d0bf3 (bug 1193387) for various WinXP test failures.
CLOSED TREE
2015-08-28 21:01:27 -04:00
Gijs Kruitbosch
401676f74d Bug 1193387 - import reading list from MS Edge, r=jaws
--HG--
extra : commitid : 34sg1pQ6KT1
extra : rebase_source : add740bf83fa516065d8904d3b85506550a7aaf6
2015-08-26 15:34:02 +01:00