Commit Graph

595 Commits

Author SHA1 Message Date
Mark Banner
f1ed0a2b70 Bug 1447944 - Enable ESLint rule no-undef for test files in devtools/server/tests/unit/. r=jdescottes
MozReview-Commit-ID: JBtDdAUraQ2

--HG--
extra : rebase_source : 544ada916f5d3fd41f57225b19897d6b21407425
2018-03-22 10:59:26 +00:00
Peter Van der Beken
f5754d679a Bug 888600 - Move ContentFrameMessageManager to WebIDL. Part 6: Mark some IDL interfaces as non-scriptable. r=bz.
--HG--
extra : rebase_source : 5911f91bd7a63cd3603494e087e3858bd0527500
2018-03-01 20:19:56 +01:00
J. Ryan Stinnett
0cee298854 Bug 1446222 - Move DevTools content process startup to new dir. r=jdescottes
Move and rename the server's process script (and accompanying JSM) that starts
DevTools for an entire content process from `content-process-debugger-server.js`
to `startup/content-process.js`.  `connectToContent` also becomes the more
specific `connectToContentProcess`.

These code paths will likely change more as Site Isolation work continues, but
for now, we have this light cleanup to gather startup-related paths together.

MozReview-Commit-ID: 1evbZMB8T7r

--HG--
rename : devtools/server/content-process-debugger-server.js => devtools/server/startup/content-process.js
rename : devtools/server/content-server.jsm => devtools/server/startup/content-process.jsm
extra : rebase_source : e077dd3dc915ec274f866d53d3539909f8440de1
2018-03-19 21:28:26 -05:00
Mark Banner
60f8abf420 Bug 1443093 - Change the update.sh scripts to use in-tree tooltool.py and update the node_modules bundles on the servers. r=mossop
MozReview-Commit-ID: HQLRoOYVjXo

--HG--
extra : rebase_source : 9f2d7925f3f75b6d488056d4e03af92ce63d433c
2018-03-19 10:18:49 +00:00
Mark Banner
0f3ec963be Bug 1443093 - Update eslint-plugin-no-unsanitized to 3.0.0 / eslint to 4.18.2. r=mossop
Also change eslint-plugin-mozilla's globals.js to use eslint-scope rather than escope as
ESLint 4.x changed to eslint-scope. This avoids dependency issues that were masked by the
depedencies of eslint-plugin-no-unsanitized's previous version.

MozReview-Commit-ID: 6wLY7Oj0am3

--HG--
extra : rebase_source : 863313d7907e8246d1f5b0ee83164cc0f943f8f6
2018-03-05 10:34:38 +00:00
Bogdan Tara
7eb4cdd58d Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-03-17 12:34:09 +02:00
Bogdan Tara
4785e99532 Merge inbound to mozilla-central. a=merge 2018-03-17 12:29:57 +02:00
Kris Maglione
313b707b2e Bug 1443964: Part 3 - Remove no-cpows-in-tests rule. r=mconley
The shims that this rule tests for no longer exist.

MozReview-Commit-ID: DMgP7Hczavc

--HG--
extra : rebase_source : 765ddd5c62c9449c07ed050e44d86a3bd5c0ae64
extra : amend_source : 627a7694ac07182200f876901ded7a34721cd228
2018-03-07 19:31:28 -08:00
Andrew Halberstadt
35ace05949 Bug 1369711 - [mozlint] Make sure KeyboardInterrupts are handled well wherever they happen r=gps
There a few pieces needed here to properly handle KeyboardInterrupts.

1. All in-progress work needs to abort. Ideally the underlying linters will be
able to catch KeyboardInterrupt, and return partial results (like the flake8
linter does). Linters may alternatively allow the KeyboardInterrupt to
propagate up. Mozlint will catch and handle this appropriately, though any
results found will be lost. The only change to this behaviour was fixing a bug
in the flake8 linter.

2. Any unstarted jobs need to be canceled. In concurrent.futures, there are two
different queues. First, jobs are placed on the work queue, which is just a list
maintained by the parent process. As workers become available, jobs are moved
off the work queue, and onto the call queue (which is a multiprocessing.Queue).
Jobs that live on the work queue can be canceled with 'future.cancel()', whereas
jobs that live on the call queue cannot. The number of extra jobs that are stored
on the call queue is determined by this variable:
https://hg.mozilla.org/mozilla-central/file/deb7714a7bcd/third_party/python/futures/concurrent/futures/process.py#l86

In this patch, the parent process' sigint handler (which will be called on Ctrl-C)
is responsible for canceling all the jobs on the work queue. For the jobs on the
call queue, the best we can do is set a global variable that tells workers to
abort early.

3. Idle workers should exit gracefully. When there are no more jobs left, workers
will block on the call queue (either waiting for more jobs, or waiting for the
executor to send the shutdown signal). If a KeyboardInterrupt is received while a
worker is blocking, it isn't possible to intercept that anywhere (due to quirks
of how concurrent.futures is implemented). The InterruptableQueue class was
created to solve this problem. It will return None instead of propagating
KeyboardInterrupt. A None value will wake the worker up and tell it to gracefully
shutdown. This way, we avoid cryptic tracebacks in the output.

With all of these various pieces solved, pressing Ctrl-C appears to always exit
gracefully, sometimes even printing partial results.

MozReview-Commit-ID: 36Pe3bbUKmk

--HG--
extra : rebase_source : d4c312ee5cc3679eeee1407c5521aed679f84ad4
extra : source : a93a00141bf62f6bc9e30934c0e56f6b2e434bf0
2018-02-23 08:55:06 -05:00
Sylvestre Ledru
fa08b7ce18 Bug 1438839 - Add tools/ as part of the whitelist of flake8 r=ahal
MozReview-Commit-ID: 3J44Yz7rV63

--HG--
extra : rebase_source : 4a270af9cc6c4fa37aba9f328643c66d165df2c3
extra : histedit_source : 5f092731ec6a420efccefbd850bdc937acd24b85
2018-02-16 11:48:12 +01:00
Kit Cambridge
bade435150 Bug 1446258 - Expose MessageChannel to System. r=baku
MozReview-Commit-ID: Bd8pvsDk4Ow

--HG--
extra : rebase_source : af02b4370f847a3ab5caf91e84ef46458c274076
2018-03-16 05:36:50 -07:00
Brendan Dahl
8a6f97c45c Bug 1442302 - Remove placesOverlay.xul. r=Gijs,mak,standard8
The overlay was responsible for script loading and defining three elements
(bhTooltip, placesCommands, placesContext). In the majority of places where
the overlay was included only part of it was used. To remove the overlay, the
elements were each split into include files and moved into where they
were used. For the scripts, a JS file was added that defines all the lazy
modules and then this script, globalOverlay.js and utilityOverlay.js were
inlined to everywhere that would have included them from the overlay.

MozReview-Commit-ID: 8T5D46oYWLn

--HG--
rename : browser/components/places/content/placesOverlay.xul => browser/components/places/content/placesCommands.inc.xul
rename : browser/components/places/content/placesOverlay.xul => browser/components/places/content/placesContextMenu.inc.xul
extra : rebase_source : c1071af4ea264a95183cbc65caae98feb23d58e5
2018-03-12 10:43:35 -07:00
Brendan Dahl
c52106c442 Bug 1444228 - Remove editBookmarkOverlay.xul. r=standard8
Move the main contents of editBookmarkOverlay.xul into an include file and
inline the DTD and CSS files where used. Convert several chrome tests to
browser tests since the preprocessor is hard to use within the testing
framework.


MozReview-Commit-ID: DpPBOpZSuBN

--HG--
rename : browser/components/places/content/editBookmarkOverlay.js => browser/components/places/content/editBookmark.js
rename : browser/components/places/content/editBookmarkOverlay.xul => browser/components/places/content/editBookmarkPanel.inc.xul
rename : browser/components/places/tests/chrome/test_bug427633_no_newfolder_if_noip.xul => browser/components/places/tests/browser/browser_bug427633_no_newfolder_if_noip.js
rename : browser/components/places/tests/chrome/test_bug485100-change-case-loses-tag.xul => browser/components/places/tests/browser/browser_bug485100-change-case-loses-tag.js
rename : browser/components/places/tests/chrome/test_bug631374_tags_selector_scroll.xul => browser/components/places/tests/browser/browser_bug631374_tags_selector_scroll.js
rename : browser/components/places/tests/chrome/test_editBookmarkOverlay_keywords.xul => browser/components/places/tests/browser/browser_editBookmark_keywords.js
rename : browser/components/places/tests/chrome/test_editBookmarkOverlay_tags_liveUpdate.xul => browser/components/places/tests/browser/browser_editBookmark_tags_liveUpdate.js
rename : browser/themes/linux/places/editBookmarkOverlay.css => browser/themes/linux/places/editBookmark.css
rename : browser/themes/osx/places/editBookmarkOverlay.css => browser/themes/osx/places/editBookmark.css
rename : browser/themes/windows/places/editBookmarkOverlay.css => browser/themes/windows/places/editBookmark.css
extra : rebase_source : aca072691251c1a44e82ab8091796abd2b140e22
2018-03-16 09:26:49 -07:00
Tom Ritter
069fabef4a Bug 1444167 Add a MinGW Header Capitalization lint job r=ahal
MinGW headers are all lowercase, and because we build FF with MinGW
on Linux - capitalization matters.  But if you're plugging along,
working on Windows, you might forget about that, and wind up
inadvertently breaking the MinGW build because you capitalized
an include file (as is common in Windows development.)

This lint job takes the list of header files from MinGW
(generated by cd mingw-w64/mingw-w64-headers &&
  find . -name "*.h" | xargs -I bob -- basename bob | sort | uniq)
and will alert if they are in an #include statement but not
all-lowercase.

MozReview-Commit-ID: 4QFSdHx5Uak

--HG--
extra : rebase_source : d76c258191d4cbb7665775bd1b8d79028890727f
2018-03-08 13:41:00 -06:00
Sylvestre Ledru
fd2808c467 Bug 1445245 - Add more directories in the codespell whitelist r=ahal
MozReview-Commit-ID: 5dLm1fus7J0

--HG--
extra : rebase_source : b8359df8fc65f3382f37b891f1bbf1ed5c58da1d
2018-03-13 14:50:20 +01:00
Narcis Beleuzu
49a6cb8875 Backed out 3 changesets (bug 1438839) for linting failure on split-profile.py. CLOSED TREE
Backed out changeset 41c11bf05828 (bug 1438839)
Backed out changeset 40fda8b55cf9 (bug 1438839)
Backed out changeset 37a3c981a785 (bug 1438839)
2018-03-13 10:10:16 +02:00
Sylvestre Ledru
19776440ab Bug 1438839 - Add tools/ as part of the whitelist of flake8 r=ahal
MozReview-Commit-ID: 3J44Yz7rV63

--HG--
extra : rebase_source : 619bb636e412a01b74663c03dae0257d92a449fa
2018-02-16 11:48:12 +01:00
Sylvestre Ledru
8fe4c9151f Bug 1444048 - Codespell: ignore the ignored typos by moving to quiet-level=4 r=standard8
MozReview-Commit-ID: HpIOkKh6SQQ

--HG--
extra : rebase_source : f849f24324e561fe3452743e91f964ccbb1abad0
2018-03-08 10:51:42 +01:00
manikishan
92de2db258 Bug 1431050 - Replace NS_ASSERT with conditional exceptions/console.assert and remove the debug.js module. r=mak
console.assert keeps the same semantics as NS_ASSERT in that it doesn't throw an exception,
but a lot of the places code was using it in a way that would be better served by throwing
an exception when the condition is false.

MozReview-Commit-ID: DEF5HSfYO36
2018-02-03 11:32:25 +05:30
Edouard Oger
4aea0be2d6 Bug 1439777 p2 - Remove weave:ui:* related code. r=markh,tcsc
MozReview-Commit-ID: D1H36YeiJCS

--HG--
extra : rebase_source : 16b7f01ed6f9b03534945d718c567dad0daa4ff3
2018-02-22 16:30:39 +08:00
Daniel Marshall
d337129b4a Bug 1434483 - Renamed profileStorage singleton to formAutofillStorage to make it more clear; r=MattN
MozReview-Commit-ID: CaPYBGLfs5I

--HG--
extra : rebase_source : ea59d03458c0e253201fd2c1476062dfb2e9a3d6
2018-02-10 21:23:19 +00:00
Mark Banner
0722fe3ee3 Bug 1434869 - Automatically mark EXPORTED_SYMBOLS as used, so that we don't need to ignore it in ESLint's no-unused-vars rule. r=florian.
MozReview-Commit-ID: IVMeZHGdVBk

--HG--
extra : rebase_source : 0705e96256baf6dc82811297058aa1d820b2f119
2018-03-06 12:01:59 +00:00
Narcis Beleuzu
8c7d795b53 Backed out 2 changesets (bug 1439777) for xpcshell failures on /test_errorhandler_2.js
Backed out changeset d99402ad9ecc (bug 1439777)
Backed out changeset 1af3426dc956 (bug 1439777)
2018-03-06 04:43:41 +02:00
Edouard Oger
934abf11b3 Bug 1439777 p2 - Remove weave:ui:* related code. r=markh,tcsc
MozReview-Commit-ID: D1H36YeiJCS

--HG--
extra : rebase_source : dd7218b5f0bd36dc4c71d2a7c95a92bba4da2d12
2018-02-22 16:30:39 +08:00
Narcis Beleuzu
34b2bf4c13 Backed out changeset a8130e46c530 (bug 1434483) for ESlint failures on browser_change_shipping.js. CLOSED TREE 2018-03-05 23:50:02 +02:00
Daniel Marshall
57b922d77c Bug 1434483 - Renamed profileStorage singleton to formAutofillStorage to make it more clear; r=MattN
MozReview-Commit-ID: CaPYBGLfs5I

--HG--
extra : rebase_source : 379bd1db1e50ae415806713878e6b3ef36889e89
2018-02-10 21:23:19 +00:00
shindli
51dcc3d916 Backed out 2 changesets (bug 1439777) for browser chrome in browser/components/customizableui/test/browser_remote_tabs_button.js and xpc-shell failures in services/sync/tests/unit/test_errorhandler_2.js on a CLOSED TREE
Backed out changeset 6e83f07e8f2f (bug 1439777)
Backed out changeset 8856efbc78a7 (bug 1439777)

--HG--
extra : histedit_source : 6472e71267b81d2ed8782eeb900c8e12b3e58e52
2018-03-05 18:59:03 +02:00
Edouard Oger
e68b9239b3 Bug 1439777 p2 - Remove weave:ui:* related code. r=markh,tcsc
MozReview-Commit-ID: D1H36YeiJCS

--HG--
extra : rebase_source : e90de5b437cc7fa8afcbe174c7bfb7bdce5b4c90
2018-02-22 16:30:39 +08:00
Marco Bonardo
b8f68ba5dd Bug 1439315 - 9 - Remove no more necessary placesOverlayModules. r=standard8
MozReview-Commit-ID: Fa7b0qf4mix

--HG--
extra : rebase_source : d6b8ca13e7e9487ea7d8b47b00ab0b00aad69e7a
2018-03-01 14:36:30 +01:00
Marco Bonardo
f1d5ac420b Bug 1439315 - 4 - Make ESLint happy. r=standard8
MozReview-Commit-ID: I4Hz0V9UGvI

--HG--
extra : rebase_source : a78d1513e46f85375e4e75377550940d40c25b70
2018-02-28 15:27:04 +01:00
Sebastian Hengst
3a10644021 Backed out 6 changesets (bug 888600) for beta simulation failures: build bustage on Linux and Windows opt (bug 1442036) and devtools failure browser_net_view-source-debugger.js (bug 1441961). a=backout
Backed out changeset 83c87140dc3d (bug 888600)
Backed out changeset 2efb9b1753f6 (bug 888600)
Backed out changeset af5303781961 (bug 888600)
Backed out changeset 79ef59047e63 (bug 888600)
Backed out changeset 30d568d628dd (bug 888600)
Backed out changeset c7bd4c6c9741 (bug 888600)

--HG--
extra : histedit_source : 791b22f6770f4fead2f909478a93d65d85829fe0%2Cbb387309e90f53e1dde45dcf8cf4ebedcc6e5c5e
2018-03-01 11:51:09 +02:00
Brendan Dahl
f4384d768c Bug 1439766 - Replace editMenuOverlay.xul by inlining and preprocessing. r=Gijs
The overlay elements with children of editMenuOverlay.xul are moved into
include files (editMenuCommands.inc.xul and editMenuKeys.inc.xul). For
the other single elements in the overlay, the attributes are inlined
wherever they are used.

MozReview-Commit-ID: 792cuzUvQxT

--HG--
extra : rebase_source : 58e4c05bde16cee873d37c6198de102d048499c2
2018-02-22 15:48:24 -08:00
Brian Grinstead
dcf493b621 Bug 1440094 - Allow console as a global for eslint;r=mossop
As of Bug 1425463 it's available in all contexts (including JSM). The following
patche is going to remove imports to Console.jsm, so prepare for this by allowing
it to be used as a global in eslint.

MozReview-Commit-ID: 3gCIspnlVgB

--HG--
extra : rebase_source : 6da75d42d7d937b628ef1d9c0d4e349fd76eda36
2018-02-27 11:29:35 -08:00
Andreea Pavel
d805787970 Merge mozilla-central to autoland. a=merge on a CLOSED TREE 2018-02-28 00:25:43 +02:00
Andreea Pavel
fa0861e443 Merge mozilla-inbound to mozilla-central. a=merge on a CLOSED TREE 2018-02-28 00:24:02 +02:00
Mark Banner
294979dc32 Bug 1441460 - ESLint's no-define-cc-etc looks at the wrong property item when checking for Cc/Ci/Cu/Cr usage. r=florian
MozReview-Commit-ID: IkSkCWqBHOn

--HG--
extra : rebase_source : 6b3a2977d4b157aea54c6e3f6960d3673e751a34
2018-02-23 20:42:17 +00:00
Peter Van der Beken
6cf0e1c871 Bug 888600 - Move ContentFrameMessageManager to WebIDL. Part 6: Mark some IDL interfaces as non-scriptable. r=bz.
--HG--
extra : rebase_source : f6f781b04923f67f60718706a78b3c4de15eca94
2018-02-22 20:22:29 +01:00
Simon Fraser
b2f9f6fd8b Bug 1439860 update-packaging linting fixes and shell style updates r=bhearsum
MozReview-Commit-ID: 2vMbmonkVwD

--HG--
extra : rebase_source : 05e49e5c3013c0dd726c93f5e48e1b81879b97a9
2018-02-21 11:54:21 +00:00
Mark Banner
6afe18b30a Bug 1440379 - Tidy up ESlint no-unused-vars definitions wrt Ci/Cu/Cr/Cc usage for varsIgnorePattern. r=florian
MozReview-Commit-ID: HmliR8iNRDq

--HG--
extra : rebase_source : 483ae0b54b9e781cceac2accdfb2255d725ace6a
2018-02-22 16:55:36 +00:00
Mark Hammond
0ed1cfff09 Bug 1435929 - refactor browserid_identity.js to be less confusing and error prone. r=eoger,tcsc
MozReview-Commit-ID: IJPQv4ZvJlp

--HG--
extra : rebase_source : b3ed7ebfc2ccaf1dd23775372b2f4bb04b526ad8
2018-02-06 14:05:45 +11:00
Ciure Andrei
2a61dd0967 Backed out changeset 2e7cc4dc999c (bug 1435929) for eslint failure at /builds/worker/checkouts/gecko/services/sync/modules/browserid_identity.js a=backout on a CLOSED TREE 2018-02-25 09:37:26 +02:00
Mark Hammond
6afd2c2ec1 Bug 1435929 - refactor browserid_identity.js to be less confusing and error prone. r=eoger,tcsc
MozReview-Commit-ID: IJPQv4ZvJlp

--HG--
extra : rebase_source : d3052d120778dc1e8111ba76ee9df285d5483786
2018-02-06 14:05:45 +11:00
Mark Banner
8387fb332e Bug 1439949 - Update eslint to 4.18.1 to support async iteration. r=mossop
MozReview-Commit-ID: 6S8Fq7yHISq

--HG--
extra : rebase_source : 719181833e15bd299a20239ac546734dbb11509a
2018-02-21 16:00:24 +00:00
Kit Cambridge
04142e96e3 Bug 1439038 - Merge Engine and SyncEngine. r=eoger
MozReview-Commit-ID: GbuW3gFLCga

--HG--
extra : rebase_source : b15ea149ff5ddca7cdb45b0ef195c07bf4915411
2018-02-16 16:43:42 -08:00
Chris Peterson
c6373306f8 Bug 1436263 - Part 5: Add a mach lint for virtual function declarations with multiple specifiers. r=froydnj r=ahal
Virtual function declarations should specify only one of `virtual`, `final`, or `override`, as per the Mozilla C++ style guide:

https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style

This lint warns about:

  virtual void Bad1() final
  void Bad2() final override
  void Bad3() override final

Caveats: This lint doesn't warn about `virtual void NotBad() override` at this time because there are 8000+ instances. It also doesn't warn about function declarations that span multiple lines because the regex can't match across line breaks.

MozReview-Commit-ID: LcBsOAKKgz7

--HG--
extra : rebase_source : 4da72ffac59acdc9796e3f540f24bb97af989cd0
2018-02-15 00:50:02 -08:00
Jared Wein
e03f7fb6d1 Bug 1436575 - Remove autofix from rule since it is not reliable in all cases. r=standard8
MozReview-Commit-ID: AYrOuQ95fD6

--HG--
extra : rebase_source : 5f21cdf8d91b1521a80a5932d12e9b0480ca7635
2018-02-08 15:37:40 -05:00
Jared Wein
1225eda729 Bug 1436575 - Prevent ==/!= comparisons with booleans as they aren't necessary. r=standard8
MozReview-Commit-ID: 25oVDVNzDyF

--HG--
rename : tools/lint/eslint/eslint-plugin-mozilla/lib/rules/use-includes-instead-of-indexOf.js => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/no-compare-against-boolean-literals.js
rename : tools/lint/eslint/eslint-plugin-mozilla/tests/use-chromeutils-import.js => tools/lint/eslint/eslint-plugin-mozilla/tests/no-compare-against-boolean-literals.js
extra : rebase_source : 46b7159f659ae0182408d5f11ac2ebafb08fe2df
2018-02-08 11:51:17 -05:00
Andrew Halberstadt
c731fa1f2c Bug 1436639 - [lint] Make sure flake8 is run with same python as |mach lint| was, r=jmaher
This fixes a bug which can happen when the default version of python differs from
the version of python used with mach.

For example, mach explicitly looks for python2.7. This means running |mach lint -l flake8|
should also run flake8 with version 2.7. But if the default is python3, and flake8 is also
installed there, the subprocess call that invokes flake8 will run under python3. This can
lead to errors like "undefined name 'basestring'" and other 2to3 gotchas.

This patch ensures that we run the flake8 binary (and the pip for installing flake8) from
the same interpreter as mach, no matter the system default.

MozReview-Commit-ID: HSuMzDsAvsW

--HG--
extra : rebase_source : faf4c8c0eb6f46d8b50c2d9be9aa6f6d47e4e0cb
2018-02-07 23:28:33 -05:00
Kyle Machulis
173d6a7510 Bug 1437226 - Fix text-disable linter message; r=ahal
MozReview-Commit-ID: KA9y8AwgVj8
2018-02-12 12:28:41 -08:00
Edouard Oger
a0cec42f04 Bug 1415951 - Extend TPS to support Addresses and Credit Cards. r=tcsc
MozReview-Commit-ID: 8VKBvm60ZSH

--HG--
extra : rebase_source : 88cb7b4145db018517c920907da79c70c46d50d2
2018-02-05 14:39:32 -06:00