Граф коммитов

81 Коммитов

Автор SHA1 Сообщение Дата
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
Dave Townsend 5dc008d932 Bug 1490015: Allow tab previews to direct load data uris. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D6996

--HG--
extra : moz-landing-system : lando
2018-09-26 21:09:49 +00:00
Mark Banner 691543ee89 Bug 1486739 - Add missing dangling commas in browser/, services/, taskcluster/ and toolkit/. r=mossop
Automatic changes by ESLint, except for manual corrections for .xml files.

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

--HG--
extra : moz-landing-system : lando
2018-08-31 05:59:17 +00:00
Kris Maglione 80327d3561 Bug 1484496: Part 5a - Convert browser/ nsISimpleEnumerator users to use JS iteration. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D3729

--HG--
extra : rebase_source : e187b8e9a6b6db7ebc762adda5e489b25c7a7e43
extra : histedit_source : 868cb99d09954a51d6be321fcb516475ef70eb33
2018-08-18 19:27:33 -07:00
Gijs Kruitbosch 1fcdbb4951 Bug 1418793 - stop trying to get per-tab previews to work prior to session restore, r=florian
Initialize WindowsPreviewPerTab later, and make its favicon update code more efficient.

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

--HG--
extra : moz-landing-system : lando
2018-08-14 13:40:11 +00:00
Boris Zbarsky 4abc5c5a25 Bug 1446940 part 2. Stop getting docshells from windows via getInterface in browser. r=gijs 2018-08-01 13:07:10 -04:00
Boris Zbarsky 270fa12c79 Bug 1476145 part 3. Stop using getInterface(nsIDOMWindowUtils) in browser/. r=gijs 2018-07-24 19:47:41 -04:00
Doug Thayer abe46fa52a Bug 1340498 - Update onVisits uses to 'page-visited' r=mak
Consuming the new 'page-visited' notification was fairly trivial,
since it was already brought over to onVisits. There's not much to
say about this other than that I'm a little bit uncertain about
all the hoops we have to jump through to get a JSContext and
GlobalObject from History.cpp (which is discussed in the earlier
commit in the series).

MozReview-Commit-ID: LHaBWSylyLI

--HG--
extra : rebase_source : ef8fa174f902e6abd397fb80294e83843120aa81
2018-02-14 09:11:49 -08:00
Dorel Luca d296624690 Backed out 5 changesets (bug 1340498) for build bustage due to conflicts with bug 1470325. a=backout
Backed out changeset 28bedb658af4 (bug 1340498)
Backed out changeset f950a2310e26 (bug 1340498)
Backed out changeset 5fcd31c65fe0 (bug 1340498)
Backed out changeset 515bb5e24dd7 (bug 1340498)
Backed out changeset 79a8619bd3e2 (bug 1340498)
2018-06-27 14:05:20 +03:00
Doug Thayer 0a912f9667 Bug 1340498 - Update onVisits uses to 'page-visited' r=mak
Consuming the new 'page-visited' notification was fairly trivial,
since it was already brought over to onVisits. There's not much to
say about this other than that I'm a little bit uncertain about
all the hoops we have to jump through to get a JSContext and
GlobalObject from History.cpp (which is discussed in the earlier
commit in the series).

MozReview-Commit-ID: LHaBWSylyLI

--HG--
extra : rebase_source : fd064e53e8645c3914188c05e71c8800d6f2174b
2018-02-14 09:11:49 -08:00
Bogdan Tara d2fb3a8812 Backed out 5 changesets (bug 1340498) for build bustages on nsDOMCSSAttrDeclaration.h CLOSED TREE
Backed out changeset 9ebcdb66ceff (bug 1340498)
Backed out changeset 63321093bb70 (bug 1340498)
Backed out changeset f8c799971f81 (bug 1340498)
Backed out changeset 21d8c1fbbbd1 (bug 1340498)
Backed out changeset fa40c179eb0d (bug 1340498)
2018-06-26 21:31:09 +03:00
Doug Thayer 4dd5940382 Bug 1340498 - Update onVisits uses to 'page-visited' r=mak
Consuming the new 'page-visited' notification was fairly trivial,
since it was already brought over to onVisits. There's not much to
say about this other than that I'm a little bit uncertain about
all the hoops we have to jump through to get a JSContext and
GlobalObject from History.cpp (which is discussed in the earlier
commit in the series).

MozReview-Commit-ID: LHaBWSylyLI

--HG--
extra : rebase_source : 1190d4f127453cdcb692deb5982e92a93e236b9e
2018-02-14 09:11:49 -08:00
arthur.iakab fc7e217166 Backed out 5 changesets (bug 1340498) for build bustages on SelectionChangeListener.h on a CLOSED TREE
Backed out changeset c89b86622d38 (bug 1340498)
Backed out changeset b270d4a01986 (bug 1340498)
Backed out changeset 8ed32495b46f (bug 1340498)
Backed out changeset df9a67c58183 (bug 1340498)
Backed out changeset a5977e0708ea (bug 1340498)
2018-06-26 07:59:01 +03:00
Doug Thayer 22f93b18ef Bug 1340498 - Update onVisits uses to 'page-visited' r=mak
Consuming the new 'page-visited' notification was fairly trivial,
since it was already brought over to onVisits. There's not much to
say about this other than that I'm a little bit uncertain about
all the hoops we have to jump through to get a JSContext and
GlobalObject from History.cpp (which is discussed in the earlier
commit in the series).

MozReview-Commit-ID: LHaBWSylyLI

--HG--
extra : rebase_source : 1190d4f127453cdcb692deb5982e92a93e236b9e
2018-02-14 09:11:49 -08:00
arthur.iakab 8b1be0e972 Backed out 5 changesets (bug 1340498) for build bustages on SelectionChangeListener.h on a CLOSED TREE
Backed out changeset fae677707059 (bug 1340498)
Backed out changeset 2adde1d1742a (bug 1340498)
Backed out changeset a444ab9cefde (bug 1340498)
Backed out changeset e2ac49ef2034 (bug 1340498)
Backed out changeset 6465310b3de9 (bug 1340498)
2018-06-26 03:53:21 +03:00
Doug Thayer 41d49cecec Bug 1340498 - Update onVisits uses to 'page-visited' r=mak
Consuming the new 'page-visited' notification was fairly trivial,
since it was already brought over to onVisits. There's not much to
say about this other than that I'm a little bit uncertain about
all the hoops we have to jump through to get a JSContext and
GlobalObject from History.cpp (which is discussed in the earlier
commit in the series).

MozReview-Commit-ID: LHaBWSylyLI

--HG--
extra : rebase_source : 148555189f73fb29a48296215e367c406f3f0286
2018-02-14 09:11:49 -08: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
Andrea Marchesini f02b4b3641 Bug 1433037 - WindowsPreviewPerTab should use decodeImageAsync, r=aosmond 2018-03-26 17:59:11 +02:00
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
Adrian Wielgosik ed00cb8c4e Bug 1440039 - Remove nsIDOMCanvasRenderingContext2D. r=qdot
MozReview-Commit-ID: GY3DdHAfQK2

--HG--
extra : rebase_source : 1fe021831984cb64cedd8c7eba486a0d29f7d66a
2018-02-21 20:49:07 +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
Mark Banner b9f306bb12 Bug 1434449 - Removed some unused code in jsm files in browser/base and browser/modules. r=florian
MozReview-Commit-ID: 9VhKxnpdzCD

--HG--
extra : rebase_source : ecc1f9196a5fb22cf78c51ead89f84e154c5198f
2018-01-30 22:09:02 +00: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 b3eef35a05 Bug 1421703 - replace onVisit with onVisits r=mak
There's a heavy enough overhead to going through XPConnect for
every observer for every visit on the nsINavHistoryObserver
interface, so this patch reduces that by replacing the single-
visit notification with one which accepts an array of visits.

Some notes: To avoid problems with the orderings of the various
ways in which we notify about visits, we have to send our bulk
onVisits notification before doing any of the others. This does
mean it technically behaves slightly different than the prior
approach of interleaving the notifications, but I can't find any
way in which this has any consequences to the end result, and it
doesn't break any tests.

MozReview-Commit-ID: GdeooH8mCkg

--HG--
extra : rebase_source : 48b5f886c4650a756e70f4657cb9d62c8ce40f74
2017-12-20 14:27:24 -08:00
Andrea Marchesini 2ef23c7ade Bug 1420223 - createImageBitmap must work with nsIAsyncInputStream - part 4 - ImageBitmap must use imgITools::decodeImageBuffer, r=aosmond 2017-11-27 17:05:57 +01: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
Masatoshi Kimura 6815cee2bd Bug 1387790 - Remove [deprecated] decodeImageData from imgITools. r=tnikkel
MozReview-Commit-ID: GZBYTPanHH6

--HG--
extra : rebase_source : f6ccc1a661533f7bdba8bb33bc9a85855b51ffae
2017-08-06 10:54:14 +09:00
Jared Wein 43bac26d30 Bug 1331661 - Enable the 'quotes' rule for eslint and fix most of the errors with --fix. r=Gijs
MozReview-Commit-ID: 6tv0Z06CO4a

--HG--
extra : rebase_source : 014c0b04d8538dc5f15bc6dd4ed6bd220c55c5d4
2017-01-17 09:48:17 -06:00
Florian Quèze 85611a7b6d Bug 1331081 - script generated patch to omit addEventListener/removeEventListener's third parameter when it's false, r=jaws.
--HG--
extra : rebase_source : a22344ee1569f58f1f0a01017bfe0d46a6a14602
2017-01-17 11:50:25 +01:00
Jared Wein 9141469edf Bug 1326511 - Enable brace-style and no-multi-spaces eslint rules for toolkit. r=MattN
MozReview-Commit-ID: FuVu8skcqOe

--HG--
extra : rebase_source : 8ab34c4e46a7c3075b459bf44786ec184d10d203
2016-12-30 21:47:25 -05: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 8de07a19a0 Bug 1316882: Turn on space-before-function-paren eslint rule (browser). r=jaws
MozReview-Commit-ID: 2ZvTiZDHchz

--HG--
extra : rebase_source : db6482481b7338df491afd6f6fd376eccec84d7e
2016-11-11 08:10:51 -08:00
Dave Townsend 0a2c8f9b78 Bug 1316882: Turn on space-infix-ops eslint rule. r=jaws
MozReview-Commit-ID: HBpjT2uHJaZ

--HG--
extra : rebase_source : 78fe71a1d673a1c698520a9c82c6f35959614f8f
2016-11-10 14:48:04 -08:00
Mark Banner a41b5adcb0 Bug 1314918 - Fix most of the remaining no-unused-vars issues for local scope in browser/. r=mossop
MozReview-Commit-ID: LdoXLniNeT7

--HG--
extra : rebase_source : d2418b8cfab0a399d0dfb5a96ea50c62fac63e70
2016-11-03 11:51:48 +00: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
Mark Banner b2464f8fa0 Bug 1311315 - General small fixes for no-undef eslint issues in browser/. r=jaws
Drop linting of the .eslintrc.js config files.
Fix some minor errors in the code (missing let/const, undefined vars).
Let eslint know that some files get their globals from other places (typically via xul script tags).

MozReview-Commit-ID: CwxuwPtRUr6

--HG--
rename : browser/components/contextualidentity/test/browser/.eslintrc.js => browser/components/syncedtabs/test/browser/.eslintrc.js
rename : browser/components/contextualidentity/test/browser/.eslintrc.js => browser/extensions/webcompat/test/browser/.eslintrc.js
extra : rebase_source : 9026aac49953d941853022cbab3e33d7d2f2fa21
2016-10-18 12:34:35 +01:00
Gijs Kruitbosch 72706654c8 Bug 1285196 - followup: fix leaking of taskbartabgroup object on windows when disabling and fix test issues that assume previews persist when the pref disables us, rs=bustage 2016-07-13 14:31:13 +01:00
Gijs Kruitbosch f16b17e11a Bug 1285196 - make WindowsPreviewPerTab.jsm do nothing if disabled, r=mak
MozReview-Commit-ID: IipisU8fnUW

--HG--
extra : rebase_source : 6bb1a85b43f06d38840f27d15422eafb1c4dbb7a
2016-07-07 18:38:43 +01:00
Gijs Kruitbosch 26985de045 Bug 1283067 - followup, rs=obvious-oversight
MozReview-Commit-ID: 4aosVpyiOFO
2016-07-06 23:12:42 +01:00
Gijs Kruitbosch ad8a268479 Bug 1283067, r=mak
MozReview-Commit-ID: JJpepH22gY5

--HG--
extra : rebase_source : 190fff1d031422198f0651a155556613fc5f6f32
2016-06-29 23:30:51 +01:00
Christoph Kerschbaumer 2eaf9374ce Bug 1255499 - Remove SEC_NORMAL from browser/. r=sicking 2016-04-25 15:06:40 +02:00
Dave Townsend 0a6414b898 Bug 1245649: Turn on no-trailing-spaces. r=Gijs
--HG--
extra : commitid : F2OWKTvXUO4
extra : rebase_source : ec68631342e0edc59d77b6bab1cdc975ad175327
2016-02-03 14:22:33 -08:00