Commit Graph
44 Commits
Author SHA1 Message Date
Alexandre Poirot 9678619dce Bug 1566457 - Remove unused codepath in the base loader for non-shared globals. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D38281
2019-07-18 12:24:54 +00:00
Alexandre Poirot 4cc4a20117 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
2019-07-11 17:08:20 +00:00
Victor Porof 435f7b056d Bug 1561435 - Format remaining devtools/, a=automatic-formatting, CLOSED TREE
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D35894
2019-07-05 11:29:32 +02:00
Alexandre Poirot fad9f3c24d 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
2019-04-09 18:58:25 +00:00
Brian Hackett 00f20c7b5e Bug 1542659 Part 1 - Hook require() when replaying, r=loganfsmyth.
Differential Revision: https://phabricator.services.mozilla.com/D26451
2019-04-07 16:00:49 -10:00
Alexandre Poirot 390b112acb 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
2019-02-28 16:03:26 +00:00
Dorel Luca aa3ce950ff 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 a408e23c4f 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
2019-02-19 16:09:48 +00:00
Jonathan Kingston 58708e007c 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
2019-02-12 16:08:25 +00:00
Cosmin Sabou b35ae6911c Backed out changeset ae859b463698 (bug 1517210) for causing devtools failures on multiple files. CLOSED TREE 2019-01-31 21:21:45 +02:00
Alexandre Poirot f0f5f54e6a 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
2019-01-31 13:49:17 +00:00
Kris Maglione 856fa07b17 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
2019-01-17 10:18:31 -08:00
Jan de Mooij 07553c7e2a 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
2019-01-03 10:02:33 +00:00
Jeff Walden d8edda9a4c 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 5647e40cff 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
2018-12-18 13:35:42 +00:00
Mark Banner 3d6aaad3f5 Bug 1486741 - Enable ESLint rule comma-dangle for all of mozilla-central (automatic fixes). r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D8389
2018-10-19 12:55:39 +00:00
Julian Descottes 82b0c5df0e Bug 1436303 - Enable mozilla/no-define-cc-etc for some DevTools files;r=ochameau,standard8
MozReview-Commit-ID: IbSt6lAhOYt
2018-06-08 16:46:59 +02:00
Julian Descottes 82711b9a8f Bug 1454696 - Run eslint --fix for prefer-const;r=yulia
MozReview-Commit-ID: F6xUXCgdRE4
2018-06-01 12:36:09 +02:00
Alexandre Poirot 1c275a9862 Bug 1456907 - Report correct file name of modules requiring modules with a wrong path. r=jryans
MozReview-Commit-ID: E8UuQ06eMJn
2018-04-25 09:17:17 -07:00
Michael Ratcliffe ec7ed48b6b Bug 1443457 - Stop referencing the addon-sdk loader in devtools code r=jdescottes
MozReview-Commit-ID: 7lwCG8JT7cV
2018-03-09 15:36:45 +00:00
Dorel Luca 3533489bdf Backed out changeset ae1924aff61b (bug 1443457) as requested by developer 2018-03-14 12:35:38 +02:00
Michael Ratcliffe b37dad2dfb Bug 1443457 - Stop referencing the addon-sdk loader in devtools code r=jdescottes
MozReview-Commit-ID: 7lwCG8JT7cV
2018-03-09 15:36:45 +00:00
Coroiu Cristina a1647fc116 Backed out changeset 2c8540f7800f (bug 1443457) for ESlint failure at /builds/worker/checkouts/gecko/devtools/server/tests/mochitest/test_getProcess.html 2018-03-14 11:41:12 +02:00
Michael Ratcliffe 433c9dfe42 Bug 1443457 - Stop referencing the addon-sdk loader in devtools code r=jdescottes
MozReview-Commit-ID: 7lwCG8JT7cV
2018-03-09 15:36:45 +00:00
J. Ryan Stinnett 8d1c817851 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 59e64c5557 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
2018-03-07 18:11:18 -08:00
Mark Banner 972759b0d6 Bug 1438489 - Enable ESLint rule mozilla/use-services for devtools/. r=jdescottes
MozReview-Commit-ID: FZscEA6Q3Kb
2018-02-15 12:00:17 +00:00
Alexandre Poirot 13e5d4f0f5 Bug 1434374 - Auto-rewrite Cu.import into ChromeUtils.import or require calls. r=jdescottes
MozReview-Commit-ID: 7YyLu5q23Hs
2018-02-07 01:37:36 -08:00
Kris Maglione 0bb74efdf1 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
https://bitbucket.org/kmaglione/m-c-rewrites/src/37e3803c7a23385bab5ea077ba8692bcfe1608fc/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl
2018-01-29 15:20:18 -08:00
Cosmin Sabou f09d6d985d 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 fd67f090b2 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
https://bitbucket.org/kmaglione/m-c-rewrites/src/37e3803c7a23385bab5ea077ba8692bcfe1608fc/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl
2018-01-29 15:20:18 -08:00
Brindusan Cristian 483ba301cb 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 683a97d172 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
https://bitbucket.org/kmaglione/m-c-rewrites/src/37e3803c7a23385bab5ea077ba8692bcfe1608fc/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl
2018-01-29 15:20:18 -08:00
Michael Ratcliffe 99ac6efb0f 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
2017-09-14 13:32:06 +01:00
Alexandre Poirot 8572cf8e9b Bug 1392602 - Simplify SDK loader to only match DevTools needs. r=jdescottes
MozReview-Commit-ID: 5MUEmCW6AJM
2017-08-28 14:52:07 +02:00
Alexandre Poirot fed7b94a29 Bug 1392602 - Stop using unnecessary const in Devtools loader. r=jdescottes
MozReview-Commit-ID: GMn8eoGUxkb
2017-08-28 14:23:57 +02:00
Alexandre Poirot 236a884c15 Bug 1392602 - Remove descriptor helper in DevTools loader. r=jdescottes
MozReview-Commit-ID: JHC0s0cMyZG
2017-08-28 14:10:18 +02:00
Alexandre Poirot 5b36273f36 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.
2017-08-28 14:05:37 +02:00
Alexandre Poirot b741f7d6aa Bug 1392602 - Instanciate RegExp only once in DevTools loader. r=jdescottes
MozReview-Commit-ID: GGYMPKZwBsS
2017-08-28 14:05:17 +02:00
Alexandre Poirot a7237f1f6b Bug 1392602 - Remove evaluate function from DevTools loader. r=jdescottes
MozReview-Commit-ID: MGXxIWUxWF
2017-08-28 14:01:34 +02:00
Alexandre Poirot 24be858f90 Bug 1392602 - Stop freezing everything in DevTools loader. r=jdescottes
MozReview-Commit-ID: ANdgiYjfV6N
2017-08-28 11:43:43 +02:00
Alexandre Poirot c17331dfc9 Bug 1392602 - Remove jetpack specifics from DevTools loader. r=jdescottes
* Remove notion of "main" module
* Remove notion of "isNative" and only use Loader.resolve algorithm

MozReview-Commit-ID: 7GOJELAh375
2017-08-28 11:27:07 +02:00
Alexandre Poirot a085009b5a Bug 1392602 - Remove module boilerplate from DevTools loader. r=jdescottes
This file is now only loaded as a JSM.
Expose symbols directly instead of putting them on `Loader` symbol.
No longer exports it as a fake 'toolkit/loader' module and always import it as JSM.

MozReview-Commit-ID: 6J3IxHpk9ct
2017-08-29 10:49:43 +02:00
Alexandre Poirot 4ab9f6f378 Bug 1392602 - Copy SDK Loader to devtools. r=jdescottes
MozReview-Commit-ID: 6INu38Wqvt
2017-08-24 15:17:33 +02:00