Commit graph

53 commits

Author SHA1 Message Date
Mihai Alexandru Michis
0eb5f699ca Backed out 2 changesets (bug 1622718) as requested by dev for causing Bug 1626727.
Backed out changeset eb632d0b3a7b (bug 1622718)
Backed out changeset 016b86b83932 (bug 1622718)
2020-04-03 06:03:25 +03:00
Logan Smyth
f2dbc58e49 Bug 1622718 - Part 2: Avoid leaking devtools loaders except when opt-in. r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D67114

--HG--
extra : moz-landing-system : lando
2020-03-30 23:28:58 +00:00
Logan Smyth
97e0078b58 Bug 1624507 - Part 6: Avoid lazy getters when unnecessary. r=ochameau
These all look like they were changed to be lazy to allow for features of
WebReplay to swap out the implementations, but now that Replay has been
removed from the codebase, these can be treated the same way other globals are.

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

--HG--
extra : moz-landing-system : lando
2020-03-30 08:24:28 +00:00
Logan Smyth
0d172217ca Bug 1624507 - Part 5: Make AMD support an opt-in feature of the loader. r=ochameau
Since base-loader's job is to handle this kind of thing, and it already
requires a special case to populate the descriptor anyway, so it seems a lot
easier to provide this as builtin optional feature of base-loader.

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

--HG--
extra : moz-landing-system : lando
2020-03-30 08:24:05 +00:00
Logan Smyth
f6c04c8106 Bug 1624507 - Part 4: Remove per-module DOMParser and console bindings. r=ochameau
I can't see any reason why these need to be scoped into the per-file target
environment, and they both feel like strange special cases, so might
as well remove them now.

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

--HG--
extra : moz-landing-system : lando
2020-03-30 08:23:22 +00:00
Logan Smyth
95caced895 Bug 1624507 - Part 3: Remove unused sandboxes property. r=ochameau
This is never used so it seems like there isn't much reason to keep it around.

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

--HG--
extra : moz-landing-system : lando
2020-03-30 08:23:01 +00:00
Logan Smyth
3b77bf88b0 Bug 1624507 - Part 1: Remove unused lazyRequire(Module). r=ochameau
These functions don't appear to ever be used by devtools since we instead
use the `loader.lazyRequireGetter` utility.

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

--HG--
extra : moz-landing-system : lando
2020-03-30 08:22:52 +00:00
Jason Laster
5f29a6d696 Bug 1622996 - Refactor devtools codebase to use optional chaining (automated changes). r=jdescottes
Depends on D67084

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

--HG--
extra : moz-landing-system : lando
2020-03-19 21:13:38 +00:00
Mark Banner
b1970e6a2f Bug 1571466 - Cleanup unnecessary ESLint global definitions. r=mossop
These are raised as redeclares or unused variables by ESLint 6.

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

--HG--
extra : moz-landing-system : lando
2019-08-19 07:11:56 +00:00
Alexandre Poirot
8164b4a595 Bug 1566457 - Remove unused codepath in the base loader for non-shared globals. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D38281

--HG--
extra : moz-landing-system : lando
2019-07-18 12:24:54 +00:00
Alexandre Poirot
c57a4aea23 Bug 1543023 - Use ChromeUtils.import only with one argument in all /devtools/ r=jdescottes
ChromeUtils.import still support a second argument as it used to do
when it was Components.utils.import. But this is deprecated and we should
instead always use the returned value.

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

--HG--
extra : moz-landing-system : lando
2019-07-11 17:08:20 +00:00
Victor Porof
b8157dfaaf Bug 1561435 - Format remaining devtools/, a=automatic-formatting, CLOSED TREE
# ignore-this-changeset

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

--HG--
extra : source : 4722b924e08478f5337ab509718bd66906bf472f
extra : amend_source : a5baa1aab21639fdba44537e3a10b179b0073cb4
2019-07-05 11:29:32 +02:00
Alexandre Poirot
1b208f0f0e Bug 1541819 - Allow the loader to load modules in a distinct system compartment. r=jdescottes
Depends on D26104

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

--HG--
extra : moz-landing-system : lando
2019-04-09 18:58:25 +00:00
Brian Hackett
7154d679ab Bug 1542659 Part 1 - Hook require() when replaying, r=loganfsmyth.
Differential Revision: https://phabricator.services.mozilla.com/D26451

--HG--
extra : rebase_source : 6697485b1dc098d6b276957953b537bfdcfb1109
2019-04-07 16:00:49 -10:00
Alexandre Poirot
b37d7ca095 Bug 1517210 - Stop always loading DevTools modules in fresh compartments. r=jandem,nchevobbe
Now, DevTools server is loaded with a custom loader every time we want to debug chrome
resources. We ensure toggling the "invisibleToDebugger" flag on Loader.jsm which itself
propagates to DevTools Sandboxes.

We added calls to force GC in console test to prevent crashes on Windows 7.

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

--HG--
extra : moz-landing-system : lando
2019-02-28 16:03:26 +00:00
Dorel Luca
44f23b0508 Backed out changeset 67fac975c2f8 (bug 1517210) for devtools failures in devtools/client/inspector/rules/test/browser_rules_user-agent-styles.js. CLOSED TREE 2019-02-19 23:59:32 +02:00
Alexandre Poirot
e3b1b7660f Bug 1517210 - Stop always loading DevTools modules in fresh compartments. r=jandem,nchevobbe
Now, DevTools server is loaded with a custom loader every time we want to debug chrome
resources. We ensure toggling the "invisibleToDebugger" flag on Loader.jsm which itself
propagates to DevTools Sandboxes.

We added calls to force GC in console test to prevent crashes on Windows 7.

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

--HG--
extra : moz-landing-system : lando
2019-02-19 16:09:48 +00:00
Jonathan Kingston
3421b8fcff Bug 1520868 - Replacing AsyncOpen2 with AsyncOpen always r=valentin
Replacing js and text occurences of asyncOpen2
Replacing open2 with open

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

--HG--
rename : layout/style/test/test_asyncopen2.html => layout/style/test/test_asyncopen.html
extra : moz-landing-system : lando
2019-02-12 16:08:25 +00:00
Cosmin Sabou
3147747b5c Backed out changeset ae859b463698 (bug 1517210) for causing devtools failures on multiple files. CLOSED TREE
--HG--
extra : rebase_source : 84795404ba2bf7600dcc8fb2384fa17f633ad354
2019-01-31 21:21:45 +02:00
Alexandre Poirot
23d0b65f54 Bug 1517210 - Stop always loading DevTools modules in fresh compartments. r=jandem
Now, DevTools server is loaded with a custom loader every time we want to debug chrome
resources. We ensure toggle the "invisibleToDebugger" flag on Loader.jsm which itself propagates to DevTools Sandboxes.

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

--HG--
extra : moz-landing-system : lando
2019-01-31 13:49:17 +00:00
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
Jan de Mooij
9f6f1773d0 Bug 1514210 part 1 - Create the devtools sandbox in a new compartment for now. r=bzbarsky
There's a small number of devtools test failures that will be fixed by Alexandre
in bug 1515290. When that lands we can revert this change.

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

--HG--
extra : moz-landing-system : lando
2019-01-03 10:02:33 +00:00
Jeff Walden
ed23151bd7 Bug 1492937 - Make the JS subscript loader load scripts exclusively as UTF-8, with no way to specify any other encoding, and adjust a bunch of existing tests to use UTF-8 directly, rather than Unicode escape sequences or similar. (This also changes the encoding of .sjs scripts and all mochitest-browser tests in the tree from Latin-1 to UTF-8.) r=yzen, r=MattN, r=jimb, r=kmag 2018-12-19 13:46:20 -08:00
Alexandre Poirot
87bb1e2701 Bug 1513028 - Throw exception with stack and message when a module doesn't exists. r=jdescottes
loadSubScript throws a string, without any stack/location.
Consider all string exceptions as coming from loadSubScript and re-throw a real error
object, coming with the stack of the require call.
Also handle wrong require path with a more explicit error message.

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

--HG--
extra : moz-landing-system : lando
2018-12-18 13:35:42 +00:00
Mark Banner
ceaeb93550 Bug 1486741 - Enable ESLint rule comma-dangle for all of mozilla-central (automatic fixes). r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D8389

--HG--
extra : moz-landing-system : lando
2018-10-19 12:55:39 +00:00
Julian Descottes
9f859ee6b8 Bug 1436303 - Enable mozilla/no-define-cc-etc for some DevTools files;r=ochameau,standard8
MozReview-Commit-ID: IbSt6lAhOYt

--HG--
extra : rebase_source : 61b562240f83da0ec15e584cd0e965466b6be4b1
2018-06-08 16:46:59 +02:00
Julian Descottes
640fe52298 Bug 1454696 - Run eslint --fix for prefer-const;r=yulia
MozReview-Commit-ID: F6xUXCgdRE4

--HG--
extra : rebase_source : 65de1b0aba412d9044b5196115f74276caa058f2
2018-06-01 12:36:09 +02:00
Alexandre Poirot
bcd0977534 Bug 1456907 - Report correct file name of modules requiring modules with a wrong path. r=jryans
MozReview-Commit-ID: E8UuQ06eMJn

--HG--
extra : rebase_source : d457594735fa8c9d802eee7d14384f3868049d6a
2018-04-25 09:17:17 -07:00
Michael Ratcliffe
eff23d6ce5 Bug 1443457 - Stop referencing the addon-sdk loader in devtools code r=jdescottes
MozReview-Commit-ID: 7lwCG8JT7cV

--HG--
rename : devtools/client/webconsole/new-console-output/test/mochitest/browser_console_addonsdk_loader_exception.js => devtools/client/webconsole/new-console-output/test/mochitest/browser_console_devtools_loader_exception.js
rename : devtools/client/webconsole/test/browser_console_addonsdk_loader_exception.js => devtools/client/webconsole/test/browser_console_devtools_loader_exception.js
extra : rebase_source : ff29ac3f0da6588af43e33944f7253bc840b6d3a
2018-03-09 15:36:45 +00:00
Dorel Luca
714a558c3e Backed out changeset ae1924aff61b (bug 1443457) as requested by developer
--HG--
rename : devtools/client/webconsole/new-console-output/test/mochitest/browser_console_devtools_loader_exception.js => devtools/client/webconsole/new-console-output/test/mochitest/browser_console_addonsdk_loader_exception.js
rename : devtools/client/webconsole/test/browser_console_devtools_loader_exception.js => devtools/client/webconsole/test/browser_console_addonsdk_loader_exception.js
2018-03-14 12:35:38 +02:00
Michael Ratcliffe
0768cc918d Bug 1443457 - Stop referencing the addon-sdk loader in devtools code r=jdescottes
MozReview-Commit-ID: 7lwCG8JT7cV

--HG--
rename : devtools/client/webconsole/new-console-output/test/mochitest/browser_console_addonsdk_loader_exception.js => devtools/client/webconsole/new-console-output/test/mochitest/browser_console_devtools_loader_exception.js
rename : devtools/client/webconsole/test/browser_console_addonsdk_loader_exception.js => devtools/client/webconsole/test/browser_console_devtools_loader_exception.js
extra : rebase_source : 05383e5f371fd0618592370ee9429cfaab2509ff
2018-03-09 15:36:45 +00:00
Coroiu Cristina
ca38cdb64e Backed out changeset 2c8540f7800f (bug 1443457) for ESlint failure at /builds/worker/checkouts/gecko/devtools/server/tests/mochitest/test_getProcess.html
--HG--
rename : devtools/client/webconsole/new-console-output/test/mochitest/browser_console_devtools_loader_exception.js => devtools/client/webconsole/new-console-output/test/mochitest/browser_console_addonsdk_loader_exception.js
rename : devtools/client/webconsole/test/browser_console_devtools_loader_exception.js => devtools/client/webconsole/test/browser_console_addonsdk_loader_exception.js
2018-03-14 11:41:12 +02:00
Michael Ratcliffe
f524ac8d63 Bug 1443457 - Stop referencing the addon-sdk loader in devtools code r=jdescottes
MozReview-Commit-ID: 7lwCG8JT7cV

--HG--
rename : devtools/client/webconsole/new-console-output/test/mochitest/browser_console_addonsdk_loader_exception.js => devtools/client/webconsole/new-console-output/test/mochitest/browser_console_devtools_loader_exception.js
rename : devtools/client/webconsole/test/browser_console_addonsdk_loader_exception.js => devtools/client/webconsole/test/browser_console_devtools_loader_exception.js
extra : rebase_source : 05383e5f371fd0618592370ee9429cfaab2509ff
2018-03-09 15:36:45 +00:00
J. Ryan Stinnett
23ff4cc75d Bug 1443081 - Apply spacing via eslint --fix for DevTools. r=jdescottes
MozReview-Commit-ID: 2RVNt140Zte
2018-03-12 13:44:41 -05:00
Kris Maglione
2c7b68e235 Bug 1443983: Part 3 - Remove platform support for interpositions. r=mccr8
This is all dead code now that the interposition service has been removed.

MozReview-Commit-ID: H6eS26y1f0f

--HG--
extra : rebase_source : c6f94df51441a62c4fbff4be657aedc9699265f5
2018-03-07 18:11:18 -08:00
Mark Banner
21e6e270a4 Bug 1438489 - Enable ESLint rule mozilla/use-services for devtools/. r=jdescottes
MozReview-Commit-ID: FZscEA6Q3Kb

--HG--
extra : rebase_source : b1b8699288a3595e52bcff3c7684bfe095f41dd1
2018-02-15 12:00:17 +00:00
Alexandre Poirot
e563788ea7 Bug 1434374 - Auto-rewrite Cu.import into ChromeUtils.import or require calls. r=jdescottes
MozReview-Commit-ID: 7YyLu5q23Hs

--HG--
extra : rebase_source : bb2805652c85d74a3e888326f4afa4b6857afa64
2018-02-07 01:37:36 -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
Michael Ratcliffe
b447b85ab8 Bug 1399493 - Upgrade to React 15.6.1 and include dev & prod version r=jdescottes,jlast
- Removed devtools.react.dev pref
- Changed condition that cause react dev files to be loaded (back to what they were before my change):
  - .mozconfig contains `ac_add_options --enable-debug-js-modules`
  - .mozconfig contains ac_add_options --enable-debug
- Successful try run: https://treeherder.mozilla.org/#/jobs?repo=try&revision=6182dd41e4d611b6e32a7d6efd16991acd256a2f

MozReview-Commit-ID: JpvL8cRxPcL

--HG--
rename : devtools/client/shared/vendor/REACT_UPGRADING => devtools/client/shared/vendor/REACT_UPGRADING.md
extra : rebase_source : 0fbd71ce502e69b0621c1d7edbac2c2a336d483f
2017-09-14 13:32:06 +01:00
Alexandre Poirot
e113bfb7cf Bug 1392602 - Simplify SDK loader to only match DevTools needs. r=jdescottes
MozReview-Commit-ID: 5MUEmCW6AJM

--HG--
extra : rebase_source : ea4a9f9332cadbc950f2151ffab5f70ee7529cbc
2017-08-28 14:52:07 +02:00
Alexandre Poirot
ad55cacf0b Bug 1392602 - Stop using unnecessary const in Devtools loader. r=jdescottes
MozReview-Commit-ID: GMn8eoGUxkb

--HG--
extra : rebase_source : 1295fc2882603dc0a9b6286300b8a971458c27c9
2017-08-28 14:23:57 +02:00
Alexandre Poirot
f55f10299c Bug 1392602 - Remove descriptor helper in DevTools loader. r=jdescottes
MozReview-Commit-ID: JHC0s0cMyZG

--HG--
extra : rebase_source : d4ad7492fbcd5491117912be27a7770b50c8eb49
2017-08-28 14:10:18 +02:00
Alexandre Poirot
43910cc65b Bug 1392602 - Remove override helper in DevTools loader. r=jdescottes
MozReview-Commit-ID: E2dNIMoa2wz

Also get rid of shared global blocklist as this isn't used by DevTools.

--HG--
extra : rebase_source : 99522f4e804e59a233f51c4710645ec24de9eb2e
2017-08-28 14:05:37 +02:00
Alexandre Poirot
eade6d9e6f Bug 1392602 - Instanciate RegExp only once in DevTools loader. r=jdescottes
MozReview-Commit-ID: GGYMPKZwBsS

--HG--
extra : rebase_source : aa68104b99b3828f5a0d5eca1145dca32750b07f
2017-08-28 14:05:17 +02:00
Alexandre Poirot
d06ae85d9a Bug 1392602 - Remove evaluate function from DevTools loader. r=jdescottes
MozReview-Commit-ID: MGXxIWUxWF

--HG--
extra : rebase_source : fae52f6759784dc40d16f7b6a4f042cfa05b259a
2017-08-28 14:01:34 +02:00
Alexandre Poirot
65256569b0 Bug 1392602 - Stop freezing everything in DevTools loader. r=jdescottes
MozReview-Commit-ID: ANdgiYjfV6N

--HG--
extra : rebase_source : 057cab2fff7302c948426a80793a5d7b5a6fee0b
2017-08-28 11:43:43 +02:00