56 Commits

Author SHA1 Message Date
Alexandre Poirot
a168e76b7c Bug 1813995 - [devtools] Nullify conn for all Actors on destruction. r=jdescottes,devtools-reviewers
A few classes weren't passing the conn object to Actor's constructor
and instead manually defining it.

Some others were having a duplicated `_conn` alias.

Differential Revision: https://phabricator.services.mozilla.com/D168351
2023-02-07 10:36:59 +00:00
Alexandre Poirot
c2c8426a63 Bug 1813476 - [devtools] Convert a few non-actor code to ES Classes. r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D168260
2023-01-31 16:50:11 +00:00
Alexandre Poirot
8bf9a7646f Bug 1813476 - [devtools] Mass migrate all actors from devtools/server/actors/*/*.js to ES Classes. r=devtools-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D168259
2023-01-31 16:50:10 +00:00
Alexandre Poirot
23691e0542 Bug 1793396 - [devtools] Use absolute URLs in all usages of loader.lazyRequireGetter. r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D158489
2022-10-03 18:57:13 +00:00
Alexandre Poirot
821cf2500c Bug 1792849 - [devtools] Use absolute URLs to import modules in devtools/server. r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D158487
2022-10-03 18:57:12 +00:00
Alexandre Poirot
daf85f8e0d Bug 1791969 - [devtools] Import all JSM in DevTools via ChromeUtils.import. r=jdescottes
Convert all imports but the one related to SessionDataHelper
as that's an hybrid module which is loaded as a JSM from the main thread,
but loaded as a common js module from the worker thread.

We will be able to drop this once we can migrate this JSM to ESM
once we support loading ESM from the worker thread.

Differential Revision: https://phabricator.services.mozilla.com/D158007
2022-09-26 13:01:33 +00:00
Alexandre Poirot
8c0ef6b298 Bug 1789980 - [devtools] Migrate all callsites using require("chrome") to use Components.* global symbols. r=jdescottes,perftest-reviewers,AlexandruIonescu
This will help transition to ES Modules as we won't be able to expose a magic "chrome" ESM.
Also, most of these symbols are exposed as global already.
All but:
* `components` which is `Components`,
* `CC` which is `Components.Constructor`,
* `Cm` which is `Components.manager`.

$ sed -ie "/require(.chrome.)/d" $(git grep -l 'require("chrome")' devtools/)
+ manual edits for all three exceptions

Differential Revision: https://phabricator.services.mozilla.com/D156936
2022-09-20 12:52:27 +00:00
Alexandre Poirot
573f380baf Bug 1789202 - [devtools] Expose ChromeUtils as a global to all DevTools modules. r=perftest-reviewers,nchevobbe,AlexandruIonescu
This will help transition to ES Modules as this symbol is exposed to them.

$ sed -ie "/require(.ChromeUtils.)/d" $(git grep -l 'require("ChromeUtils")' devtools/)
$ sed -ie "/loader.lazyRequireGetter(this, .ChromeUtils./d" $(git grep -l 'loader.lazyRequireGetter(this, "ChromeUtils"' devtools/)
+ the edition of builtin-modules.js + eslintrc.js + manual eslint fixes

Differential Revision: https://phabricator.services.mozilla.com/D156402
2022-09-09 07:22:51 +00:00
Alexandre Poirot
7f9229d43d Bug 1789201 - [devtools] Expose Services as a global to all DevTools modules. r=perftest-reviewers,nchevobbe,julienw,AlexandruIonescu
This will help transition to ES Modules as this symbol is exposed to them.

$ sed -ie "/require(.Services.)/d" $(git grep -l 'require("Services")' devtools/)
$ sed -ie "/loader.lazyRequireGetter(this, .Services./d" $(git grep -l 'loader.lazyRequireGetter(this, "Services"' devtools/)
+ the edition of builtin-modules.js + eslintrc.js
+ manual eslint fixes
+ removal of devtools-services in the debugger, except for jest tests

Differential Revision: https://phabricator.services.mozilla.com/D156401
2022-09-09 07:22:51 +00:00
Mark Banner
a6855db57e Bug 1330099 - Enable object-shorthand eslint rule. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D153567
2022-08-03 14:57:05 +00:00
Tooru Fujisawa
6907e51f5c Bug 1777486 - Part 4: Migrate XPCOMUtils.jsm consumers with CommonJS require. r=devtools-reviewers,ochameau
Differential Revision: https://phabricator.services.mozilla.com/D151216
2022-07-12 04:21:35 +00:00
Andreea Pavel
7738a75fdd Backed out 11 changesets (Bug 1777486) for failing bc at browser_startup.js on a CLOSED TREE
Backed out changeset b6c4c386f1a6 (Bug 1777486)
Backed out changeset 195cc2de8433 (Bug 1777486)
Backed out changeset 20c746fb1648 (Bug 1777486)
Backed out changeset d5fd8173d62d (Bug 1777486)
Backed out changeset 6d758fab5a3e (Bug 1777486)
Backed out changeset e938b601ba15 (Bug 1777486)
Backed out changeset 0c4ea0b9416b (Bug 1777486)
Backed out changeset 0559c53cc668 (Bug 1777486)
Backed out changeset eea573d3a9f9 (Bug 1777486)
Backed out changeset 9ce3a6496a49 (bug 1777486)
Backed out changeset b0867652fc48 (bug 1777486)
2022-07-11 22:24:40 +03:00
Tooru Fujisawa
2244a9c200 Bug 1777486 - Part 4: Migrate XPCOMUtils.jsm consumers with CommonJS require. r=devtools-reviewers,ochameau
Differential Revision: https://phabricator.services.mozilla.com/D151216
2022-07-11 15:09:14 +00:00
Yaron Tausky
8bccb10c7f Bug 1496997 - Remove rest of child intercept code from dom/serviceworkers r=asuth,dom-workers-and-storage-reviewers,sg,jdescottes,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D101763
2021-06-08 21:02:54 +00:00
Julian Descottes
5502682b68 Bug 1714527 - [devtools] Remove unused serviceworker actor code in DevTools server r=nchevobbe,devtools-backward-compat-reviewers
The actor code for attaching/detaching service worker targets and to push/start workers should no longer be used when parentintercept is disabled because all the UI triggering this is disabled in that case.
Consequently we can remove the server side code supporting this. We still have to be able to list service worker targets when parentintercept is disabled, so there are still some codepaths using isParentInterceptEnabled in the server.

Differential Revision: https://phabricator.services.mozilla.com/D116850
2021-06-07 20:13:26 +00:00
Ricky Stewart
02a7b4ebdf Bug 1654103: Standardize on Black for Python code in mozilla-central.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Bogdan Tara
da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart
c0cea3b0fa Bug 1654103: Standardize on Black for Python code in mozilla-central. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Dorel Luca
1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart
50762dacab Bug 1654103: Standardize on Black for Python code in mozilla-central. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
Nicolas Chevobbe
056b9542f2 Bug 1573779 - [devtools] Rename WorkerTargetActorList to WorkerDescriptorActorList. r=jdescottes.
This class is creating (and handling) WorkerDescriptorActor now, so we rename
it to make it explicit.

Differential Revision: https://phabricator.services.mozilla.com/D91557
2020-09-29 14:31:10 +00:00
Nicolas Chevobbe
f315ff58cd Bug 1573779 - [devtools] Rename WorkerTarget to WorkerDescriptor. r=ochameau,jdescottes,devtools-backward-compat-reviewers.
This renames the current WorkerTargetActor which is actually a descriptor.
We also rename the existing `workerTargetFront` occurences to `workerDescriptorFront`
to avoid confusion when we do introduce the real worker fronts and actors.

Differential Revision: https://phabricator.services.mozilla.com/D91100
2020-09-29 14:30:24 +00:00
Dorel Luca
f826d52619 Backed out 3 changesets (bug 1573779, bug 1662734) for Geckoview failures. CLOSED TREE
Backed out changeset 0adff4f08b28 (bug 1662734)
Backed out changeset c6bb84f2a032 (bug 1573779)
Backed out changeset 0c605800aa6b (bug 1573779)
2020-09-29 12:59:39 +03:00
Nicolas Chevobbe
bda0dabd83 Bug 1573779 - [devtools] Rename WorkerTargetActorList to WorkerDescriptorActorList. r=jdescottes.
This class is creating (and handling) WorkerDescriptorActor now, so we rename
it to make it explicit.

Differential Revision: https://phabricator.services.mozilla.com/D91557
2020-09-29 01:54:32 +00:00
Nicolas Chevobbe
4914f8c614 Bug 1573779 - [devtools] Rename WorkerTarget to WorkerDescriptor. r=ochameau,jdescottes,devtools-backward-compat-reviewers.
This renames the current WorkerTargetActor which is actually a descriptor.
We also rename the existing `workerTargetFront` occurences to `workerDescriptorFront`
to avoid confusion when we do introduce the real worker fronts and actors.

Differential Revision: https://phabricator.services.mozilla.com/D91100
2020-09-28 12:27:22 +00:00
Kris Maglione
9d78661f88 Bug 1649221: Update ChromeUtils.generateQI callers to pass strings. r=mccr8,remote-protocol-reviewers,marionette-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,preferences-reviewers,agi,whimboo,Bebe,twisniewski
Differential Revision: https://phabricator.services.mozilla.com/D81594
2020-07-10 23:58:28 +00:00
Julian Descottes
7014578c42 Bug 1619221 - Remove non-parent-intercept codepath in devtools client r=daisuke
Depends on D81346

Differential Revision: https://phabricator.services.mozilla.com/D82193
2020-07-07 15:22:32 +00:00
Julian Descottes
4c889947b8 Bug 1637687 - Remove lastPush/pushCount from PushSubscriptionActor as they are not supported on GeckoView r=davidwalsh,daisuke
Differential Revision: https://phabricator.services.mozilla.com/D75905
2020-05-29 06:08:55 +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
Alexandre Poirot
9073e966ec Bug 1614791 - Rename DebuggerServer to DevToolsServer. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D61363

--HG--
rename : devtools/server/debugger-server.js => devtools/server/devtools-server.js
extra : moz-landing-system : lando
2020-02-17 10:28:24 +00:00
Brian Hackett
ad3914884b Bug 1596939 Part 2 - Support pausing new service workers for a specific origin, r=jdescottes.
Depends on D54292

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

--HG--
extra : moz-landing-system : lando
2019-12-07 18:18:03 +00:00
Brian Hackett
2a9b3b1bb9 Bug 1595964 Part 2 - Expose evaluating worker in service worker registration front, r=jdescottes.
Depends on D54286

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

--HG--
extra : moz-landing-system : lando
2019-12-07 18:18:09 +00:00
Noemi Erli
7c520af3a9 Backed out 6 changesets (bug 1595964, bug 1596939) for causing failures in browser_application_panel_list-domain-workers.js
Backed out changeset 65c870147654 (bug 1595964)
Backed out changeset 74a982a9144a (bug 1596939)
Backed out changeset c21c15689e77 (bug 1596939)
Backed out changeset a6848f4d219d (bug 1596939)
Backed out changeset 4f538e6c6dcc (bug 1595964)
Backed out changeset d1c93f700b8c (bug 1595964)
2019-12-07 20:13:22 +02:00
Brian Hackett
e099666dd0 Bug 1596939 Part 2 - Support pausing new service workers for a specific origin, r=jdescottes.
Depends on D54292

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

--HG--
extra : moz-landing-system : lando
2019-12-07 16:16:39 +00:00
Brian Hackett
8f4a55899e Bug 1595964 Part 2 - Expose evaluating worker in service worker registration front, r=jdescottes.
Depends on D54286

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

--HG--
extra : moz-landing-system : lando
2019-12-07 16:13:07 +00:00
Alexandre Poirot
bd4fcbfbc8 Bug 1585829 - Ensure releasing Service workers when the connection drops. r=jdescottes
With fission, we most likely have a process switch and the existing worker
target isn't properly detached. We should ensure releasing the SW whenever
the connection to the server drops

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

--HG--
extra : moz-landing-system : lando
2019-10-08 14:44:42 +00:00
Julian Descottes
8a65fc4677 Bug 1557170 - Add isParentInterceptEnabled trait to ServiceWorkerRegistration actor r=daisuke
Differential Revision: https://phabricator.services.mozilla.com/D43598

--HG--
extra : moz-landing-system : lando
2019-08-28 06:38:47 +00:00
Julian Descottes
9566e4dc8a Bug 1559268 - Prevent service worker shutdown while debugging in parent-intercept mode r=ochameau,perry
Depends on D32492

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

--HG--
extra : moz-landing-system : lando
2019-08-20 05:29:34 +00:00
Perry Jiang
4d1b5b9a5c Bug 1552945 - Start Service Workers in the parent process with parent-intercept. r=asuth,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D32492

--HG--
extra : moz-landing-system : lando
2019-08-20 15:21:11 +00:00
Perry Jiang
7753ae42bf Bug 1552945 - Send push events to ServiceWorkerRegistrationActor's active Service Worker r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D31906

--HG--
extra : moz-landing-system : lando
2019-08-20 15:21:02 +00:00
Perry Jiang
4d21c36f04 Bug 1552945 - Expose a ServiceWorker's WorkerPrivate's ID on its ServiceWorkerFront. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D31904

--HG--
extra : moz-landing-system : lando
2019-08-20 15:20:47 +00:00
Victor Porof
24d2c75470 Bug 1561435 - Format devtools/server/, a=automatic-formatting
# ignore-this-changeset

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

--HG--
extra : source : d2dc183b9bf9086d4b862e0e9a0cfa0bf773193f
2019-07-05 11:26:00 +02:00
Brian Hackett
a342374c62 Bug 1527203 Part 2 - Prevent worker debuggee execution until the thread actor has attached, r=ochameau.
--HG--
extra : rebase_source : 00d301909314379c3667af456579f9dbf0b47016
2019-02-12 13:05:34 -10:00
Julian Descottes
8182c02ad6 Bug 1523454 - Fix service worker active status for sw refactor;r=daisuke
Depends on D19159

This will fix the test browser_aboutdebugging_serviceworker_status.js when running with dom.serviceWorkers.parent_intercept=true
(`./mach test browser_aboutdebugging_serviceworker_status.js --setpref dom.serviceWorkers.parent_intercept=true`)

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

--HG--
extra : moz-landing-system : lando
2019-02-13 09:02:03 +00:00
Alexandre Poirot
d028804ade Bug 1515862 - Remove unecessary usages of actorid checks in actor and front's form method. r=jdescottes
Remove all actorid checks in actors and fronts as we never pass a defined `detail` argument in them.
Only domstylerule and node are using detail and that, always with detail="actorid".
Also remove ctx and detail in Front constructor as that's not used by these two actors.

Depends on D17612

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

--HG--
extra : moz-landing-system : lando
2019-01-28 18:42:39 +00:00
Julian Descottes
cf82f78c6e Bug 1510654 - Extract service worker actors to dedicated files;r=ochameau,ladybenko
Depends on D15377

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

--HG--
rename : devtools/server/actors/worker/service-worker.js => devtools/server/actors/worker/push-subscription.js
rename : devtools/server/actors/worker/service-worker.js => devtools/server/actors/worker/service-worker-registration.js
rename : devtools/shared/fronts/worker/service-worker.js => devtools/shared/fronts/worker/push-subscription.js
rename : devtools/shared/fronts/worker/service-worker.js => devtools/shared/fronts/worker/service-worker-registration.js
rename : devtools/shared/specs/worker/service-worker.js => devtools/shared/specs/worker/push-subscription.js
rename : devtools/shared/specs/worker/service-worker.js => devtools/shared/specs/worker/service-worker-registration.js
extra : moz-landing-system : lando
2019-01-10 17:28:27 +00:00
Julian Descottes
c468557cf4 Bug 1510654 - Return ServiceWorker fronts for installing, active and waiting workers;r=ochameau,ladybenko
Depends on D15376

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

--HG--
extra : moz-landing-system : lando
2019-01-10 17:26:48 +00:00
Julian Descottes
7195903c0f Bug 1510654 - Move worker/worker-list.js to targets/worker-list;r=ochameau,ladybenko
Depends on D15374

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

--HG--
rename : devtools/server/actors/worker/worker-list.js => devtools/server/actors/worker/worker-target-actor-list.js
extra : moz-landing-system : lando
2019-01-10 17:22:47 +00:00
Julian Descottes
a701c42419 Bug 1510654 - Extract ServiceWorkerRegistrationList from worker-list.js;r=ochameau,ladybenko
Differential Revision: https://phabricator.services.mozilla.com/D15374

--HG--
rename : devtools/server/actors/worker/worker-list.js => devtools/server/actors/worker/service-worker-registration-list.js
extra : moz-landing-system : lando
2019-01-10 17:22:28 +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