Commit graph

27 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
Siddhant085
a3f1e05d1b Bug 1479445: Update the validation of PageInfo to use validateItemProperties r=mak,Standard8
Changed the validation function for PageInfo to use a more general validateItemProperties.
This changes the error message being thrown. Changed the respective test cases to accomodate the change.

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

--HG--
extra : moz-landing-system : lando
2018-10-02 15:30:24 +00:00
Tiberius Oros
edaadd3804 Backed out changeset d4c858c70bc9 (bug 1479445) for failing xpcshell at services/sync/tests/unit/test_corrupt_keys.js on a CLOSED TREE 2018-09-25 23:14:52 +03:00
Siddhant085
2bd3beeba9 Bug 1479445: Update the validation of PageInfo to use validateItemProperties r=mak,Standard8
Changed the validation function for PageInfo to use a more general validateItemProperties.
This changes the error message being thrown. Changed the respective test cases to accomodate the change.

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

--HG--
extra : moz-landing-system : lando
2018-09-25 18:21:56 +00:00
Kris Maglione
fcedebb912 Bug 1471102: Move more code out of ExtensionUtils.jsm. r=aswan
MozReview-Commit-ID: Fqlv5BRuuW8

--HG--
extra : rebase_source : 348f037abd9cecfa080183bc365e5f005eac1bd6
extra : amend_source : 05dbfd12f553fc3f2a93374402e34d271e26d767
2018-06-25 19:30:21 -07:00
Marco Bonardo
1c9f0c12b7 Bug 834541 - Remove the public History.hasHistoryEntries synchronous API. r=standard8
MozReview-Commit-ID: KJW9YNwoSZb

--HG--
extra : rebase_source : c379c145386478eb0cadfefe20c881f8652e6c2d
2018-05-08 10:26:36 +02:00
Marco Bonardo
c77ad1727f Bug 1354531 - Remove PlacesUtils.asyncHistory to make History internals access less convenient. r=standard8
MozReview-Commit-ID: K9oQTJbVAZF

--HG--
extra : rebase_source : 1f9c19911602a2620dace4d85c8174347c8eeb42
2018-05-03 15:08:06 +02:00
Nathan Watson
1605552221 Bug 1434262 - Remove PlacesTestUtils.clearHistory() r=mak
MozReview-Commit-ID: In2RaM0LBsc

--HG--
extra : rebase_source : 0cb5dc65a53bfa384b93fb2a8c2af67ad9d3fe1c
2018-01-31 22:03:05 -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
Kris Maglione
4a4c4fdfd4 Bug 1421459: Update to ESLint 4 "indent" rule. r=aswan
MozReview-Commit-ID: LxLDWlsIlSk

--HG--
extra : rebase_source : 5762bdf08ff6c09c1b29f87366bddb552e4c74b2
extra : amend_source : 922a0c03722bd5a81daace7f0289ec3228191cfb
2017-11-28 14:13:59 -08:00
Masatoshi Kimura
cac8494c04 Bug 1406594 - Fix history.search and history.getVisited so that they find hidden items correctly. r=aswan,bsilverberg
I had to add a mochitest because PlacesUtils.history.insertMany cannot create hidden redirects.

I also added a support for the "reload" transition while I am here.

MozReview-Commit-ID: ECQp6pW2r8v

--HG--
extra : rebase_source : d4456d32a57cdadec8ca383a2b09dee29e20b10f
2017-10-07 06:04:56 +09:00
Kris Maglione
a32ad146bd Bug 1402944: Part 8 - Avoid X-ray overhead when cloning event handler responses. r=mixedpuppy
MozReview-Commit-ID: 4CHP80WymuA

--HG--
extra : rebase_source : 612b9d38cc0c6c5146b1863f22a40789c7471808
2017-09-23 13:30:52 -07:00
Thomas Wisniewski
e29009081a Bug 1287928 - Update browser.history.onVisited to use the title from the onVisit event. r=mixedpuppy
MozReview-Commit-ID: 8aEbR1PE5XX

--HG--
extra : rebase_source : c0abb36c677ef9d9fa4d82bfd55dcdcb31a73104
2017-06-20 12:06:12 -04: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
Tushar Saini (:shatur)
fa1f43e7c6 Bug 1280582 - Implement browser.history.onTitleChanged. r=bsilverberg,mixedpuppy
MozReview-Commit-ID: jzil9lDYnN

--HG--
extra : rebase_source : c7c000a17a1021f46d60ee7bc9d889c11a1bf384
2017-03-08 21:18:19 +05:30
Jared Wein
4b027e3645 Bug 1315781 - Enable no-shadow rule for eslint for xpcshell mochitests. r=mossop
MozReview-Commit-ID: 1mhCWplknyN

--HG--
extra : rebase_source : ab47e6e1bc2ba94fa26179ec18053fa798d9b778
2016-11-07 22:34:25 -05:00
Iris Hsiao
0cc78823fe Backed out changeset f6f28be8d8f2 (bug 1315781) for XPCShell test timed out
--HG--
extra : rebase_source : 0122a5372b6ac2174d4c37e7cc0169bf9c437178
2016-11-10 14:53:46 +08:00
Jared Wein
8ebd29ee02 Bug 1315781 - Enable no-shadow rule for eslint for xpcshell mochitests. r=mossop
MozReview-Commit-ID: DnpVQRrG9Ec

--HG--
extra : rebase_source : 3641e46c32b0e6700ee86fc71dcd35924ce1ed3a
2016-11-07 22:34:25 -05:00
Bob Silverberg
a61ae5ffdb Bug 1272676 - Remove HistoryTime and use Date type instead, r=aswan
MozReview-Commit-ID: IqH2eLJwn5d

--HG--
extra : rebase_source : db17fffbe617e873277d708707c17250fd85c237
2016-09-06 12:56:56 -04:00
Bob Silverberg
068821e975 Bug 1295301 - history.onVisitRemoved argument is wrong after a call to history.deleteAll, r=aswan
MozReview-Commit-ID: 9b9PKAwcNDA

--HG--
extra : rebase_source : a0cbbe63b227139085b3641786e14e2a1df13bbe
2016-08-16 09:35:37 -04:00
Kris Maglione
bd9082edf7 Bug 1288885: Migrate history mochitests to xpcshell. r=aswan
MozReview-Commit-ID: tzQdEJx6TN

--HG--
rename : browser/components/extensions/test/browser/browser_ext_history.js => browser/components/extensions/test/xpcshell/test_ext_history.js
extra : source : eeb6bc8a42e69e989bb70cc6daf56296936f60b0
extra : histedit_source : cd90f8cfa3040588aa2847d4192bf3ba47edc33b
2016-07-22 18:57:38 -07:00
Sebastian Hengst
37588ab145 Backed out changeset eeb6bc8a42e6 (bug 1288885)
--HG--
rename : browser/components/extensions/test/xpcshell/test_ext_history.js => browser/components/extensions/test/browser/browser_ext_history.js
2016-07-28 10:06:33 +02:00
Kris Maglione
817d21897d Bug 1288885: Migrate history mochitests to xpcshell. r=aswan
MozReview-Commit-ID: tzQdEJx6TN

--HG--
rename : browser/components/extensions/test/browser/browser_ext_history.js => browser/components/extensions/test/xpcshell/test_ext_history.js
extra : rebase_source : 33a5b87939477e3ec9ffbd78917a6b5ea5495f82
extra : histedit_source : a9e355199d9431f74856c77d1e819ac4a130e02a
2016-07-22 18:57:38 -07:00
Renamed from browser/components/extensions/test/browser/browser_ext_history.js (Browse further)