Commit graph

52 commits

Author SHA1 Message Date
Dave Townsend
9e30d1f3f9 Bug 1864896: Autofix unused function arguments (devtools). r=profiler-reviewers,devtools-reviewers,nchevobbe,julienw
Differential Revision: https://phabricator.services.mozilla.com/D202959
2024-03-05 14:21:15 +00:00
Nicolas Chevobbe
b1a029fada Bug 1864842 - [devtools] Remove devtools/shared/defer.js . r=devtools-reviewers,ochameau.
This can now be replaced with native Promise.withResolvers,
so we can remove our custom implementation module.

Differential Revision: https://phabricator.services.mozilla.com/D198033
2024-01-10 06:30:28 +00:00
Alexandre Poirot
aad605e498 Bug 1792848 - [devtools] Use absolute URLs to import modules in devtools/shared. r=Honza,devtools-backward-compat-reviewers,bomsy
Differential Revision: https://phabricator.services.mozilla.com/D158643
2022-10-12 15:56:22 +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
Mark Banner
c83937cb5a Bug 1786197 - Turn on ESLint rule for prefer-boolean-length-check for devtools. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D155167
2022-08-26 13:39:34 +00:00
Alexandre Poirot
bb70a506eb Bug 1783670 - [devtools] Avoid performance regression of Front.watchFronts API. r=nchevobbe
The Front.watchFronts API is sparsly used whereas we always instantiate
two EventEmitter and emit two events for all the Fronts.
We can avoid doing that unless we start using this API only on a couple of fronts.

Differential Revision: https://phabricator.services.mozilla.com/D153957
2022-08-09 11:38:15 +00:00
Alexandre Poirot
a8c7a62c19 Bug 1773284 - [devtools] Add tracing marking for RDP fronts and actors. r=jdescottes
This should allow better highlight slow request/event on both server and client sides.

Differential Revision: https://phabricator.services.mozilla.com/D148660
2022-06-13 11:48:25 +00:00
Butkovits Atila
3d807844c7 Backed out changeset 46c9d33f30a7 (bug 1773284) for causing devtools failures. CLOSED TREE 2022-06-09 17:15:41 +03:00
Alexandre Poirot
d9529aa066 Bug 1773284 - [devtools] Add tracing marking for RDP fronts and actors. r=jdescottes
This should allow better highlight slow request/event on both server and client sides.

Differential Revision: https://phabricator.services.mozilla.com/D148660
2022-06-09 13:31:29 +00:00
Alexandre Poirot
e7b1b6f486 Bug 1726238 - [devtools] Fix browser_toolbox_backward_forward_navigation.js intermittent failure. r=bomsy
Inspector fronts initialization is still pending while we navigate away to another top target.
Leading to various possible exception in protocol.js.
I'm adding a set of new explicit exception in order to help debugging all these cases.

Differential Revision: https://phabricator.services.mozilla.com/D123441
2021-09-01 08:30:23 +00:00
Julian Descottes
7f4cd8c822 Bug 1717580 - [devtools] Actor/Front isDestroyed should not return true for uninitialized objects r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D118469
2021-06-23 15:28:33 +00:00
Julian Descottes
081273c70a Bug 1703300 - [devtools] Do not notify about uninitialized fronts in Front::watchFronts r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D111093
2021-04-07 13:42:34 +00:00
Henry Vincent
cc89c462df Bug 1699146 - Fix typo in error message created by Front base class r=ochameau First bug fix. Fixed typo, and then the linter wanted the code slightly reformatted.
Differential Revision: https://phabricator.services.mozilla.com/D108881
2021-03-17 23:45:49 +00:00
Alexandre Poirot
efdfcfb399 Bug 1672826 - [devtools] Unmanage fronts when we purge a whole prefix. r=nchevobbe
Previous `purgeRequestForDestroy` method was only rejecting all pending requests.
The new `syncFrontDestroy` allows to fully destroy the front, including
unregistering it/unmanage it. So that if we receive a packet from a brand new
actor, with the same prefix and actor ID, DevToolsClient.getFront doesn't return
the old destroyed front.
This issue was making pending requests that were never resolved.

Differential Revision: https://phabricator.services.mozilla.com/D94718
2020-11-09 12:29:53 +00:00
Julian Descottes
e1074b5ab6 Bug 1669681 - [devtools] Send tabDetached event before the forwardingCancelled event in content-process-connector r=ochameau
Depends on D93029

Emitting "forwardingCancelled" will result in purging requests on the target front, which almost equates to destroying the front.
We should emit the "tabDetached" event before that to avoid emitting events on already destroyed fronts.

Differential Revision: https://phabricator.services.mozilla.com/D93030
2020-10-12 08:13:19 +00:00
Julian Descottes
a9480f8030 Bug 1669681 - [devtools] Send tabDetached event before the forwardingCancelled event in frame-connector r=ochameau
Emitting "forwardingCancelled" will result in purging requests on the target front, which almost equates to destroying the front.
We should emit the "tabDetached" event before that to avoid emitting events on already destroyed fronts.

Differential Revision: https://phabricator.services.mozilla.com/D93029
2020-10-12 08:13:29 +00:00
Alexandre Poirot
4bcdeb0c48 Bug 1620280 - [devtools] Convert SourceMapService to use SOURCE resource. r=nchevobbe,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D88298
2020-10-05 08:28:48 +00:00
Butkovits Atila
d89b519adc Backed out 9 changesets (bug 1620280) for failure at browser_ext_devtools_inspectedWindow_targetSwitch.js. CLOSED TREE
Backed out changeset 8dda1f048067 (bug 1620280)
Backed out changeset 309c0be48745 (bug 1620280)
Backed out changeset 78a06cd336c6 (bug 1620280)
Backed out changeset 74aba83895ce (bug 1620280)
Backed out changeset 6a8126ded6ec (bug 1620280)
Backed out changeset 47a2d6b77270 (bug 1620280)
Backed out changeset 526c067da0c1 (bug 1620280)
Backed out changeset 488f645884ba (bug 1620280)
Backed out changeset 9cffe1c5fb6d (bug 1620280)
2020-10-01 23:32:57 +03:00
Alexandre Poirot
2cf7b7a8e4 Bug 1620280 - [devtools] Convert SourceMapService to use SOURCE resource. r=nchevobbe,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D88298
2020-10-01 14:22:23 +00:00
Alexandre Poirot
2e547c4dcf Bug 1664438 - Destroy pending protocol.js requests when a remote connector closes. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D90236
2020-09-16 08:15:01 +00:00
Julian Descottes
f05829aa08 Bug 1629890 - Use Front/Actor::isDestroyed to replace actorID checks r=nchevobbe
Depends on D86325

Differential Revision: https://phabricator.services.mozilla.com/D86356
2020-08-12 11:33:44 +00:00
Julian Descottes
8b34b0fb01 Bug 1629890 - Add isDestroyed helper on DevTools Front base class r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D86323
2020-08-07 13:24:00 +00:00
Julian Descottes
b27b79da1e Bug 1639111 - Show the filename, line and column for DevTools actor errors r=davidwalsh,ochameau
Depends on D75902

Differential Revision: https://phabricator.services.mozilla.com/D75904
2020-05-25 17:13:59 +00:00
Mihai Alexandru Michis
6f4fa0a560 Backed out 2 changesets (bug 1639111) for causing failures in browser_actor_error.js
CLOSED TREE

Backed out changeset 2964f445c2f5 (bug 1639111)
Backed out changeset 84be772b9ac4 (bug 1639111)
2020-05-25 16:34:55 +03:00
Julian Descottes
5c31755a29 Bug 1639111 - Show the filename, line and column for DevTools actor errors r=davidwalsh,ochameau
Depends on D75902

Differential Revision: https://phabricator.services.mozilla.com/D75904
2020-05-25 12:49:10 +00:00
Narcis Beleuzu
07db232be7 Backed out 2 changesets (bug 1639111) for mochitest failures on test_preference.html . CLOSED TREE
Backed out changeset 7ca3266213e7 (bug 1639111)
Backed out changeset 55df4479027c (bug 1639111)
2020-05-25 13:54:06 +03:00
Julian Descottes
a7ea81cc29 Bug 1639111 - Show the filename, line and column for DevTools actor errors r=davidwalsh,ochameau
Depends on D75902

Differential Revision: https://phabricator.services.mozilla.com/D75904
2020-05-25 09:47:23 +00:00
Nicolas Chevobbe
44f13d14ef Bug 1620288 - Rename Pool#parent to getParent. r=ochameau.
This makes it more obvious that it's a function, and not
a property.

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

--HG--
extra : moz-landing-system : lando
2020-03-16 17:34:32 +00:00
Nicolas Chevobbe
29a7aafa74 Bug 1619214 - Use parentFront to retrieve parent when possible. r=ochameau.
In fronts there's a parentFront  property that maintain the link
between a front and its parent.
But Pool isn't using it, and retrieve the parent through poolFor,
which can be a bit slow depending the number of pools and their size.

This patch makes Fronts override the Pool#parent method to retrive the
parent from the parentFront property.

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

--HG--
extra : moz-landing-system : lando
2020-03-16 17:38:09 +00:00
Alexandre Poirot
0f4a46b235 Bug 1620257 - Print the actorID when we receive a error in protocol.js Fronts. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D65525

--HG--
extra : moz-landing-system : lando
2020-03-10 22:29:04 +00:00
Julian Descottes
79f1be551e Bug 1615418 - Do not throw when calling watch/unwatchFront on destroyed Fronts r=daisuke,ochameau
Depends on D62893

The issue here is that we are trying to destroy the workers-listener after the target was destroyed,
and calling unwatchFront on a destroyed Front throws.

Most of the fronts monitored in workers-listener are handled by the watchFront API, so properly adding
onDestroyed handlers fixes some issues. However the rootFront cannot be handled with a similar pattern
at the moment.

In general, I think making watchFront/unwatchFront safer to call makes sense, but I could also check
if the rootFront is already destroyed in workers-listener's destroy

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

--HG--
extra : moz-landing-system : lando
2020-02-18 08:02:29 +00:00
Alexandre Poirot
f3c23535d7 Bug 1614792 - Rename DebuggerClient to DevToolsClient. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D62495

--HG--
rename : devtools/shared/client/debugger-client.js => devtools/shared/client/devtools-client.js
extra : moz-landing-system : lando
2020-02-17 13:39:25 +00:00
Julian Descottes
1018577094 Bug 1596686 - Use absolute paths for require calls r=gl
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-12-27 12:23:47 +00:00
Razvan Maries
b27235e522 Backed out changeset 14698fa06ab8 (bug 1596686) for causing perma fails on browser_json_refresh.js. 2019-12-27 14:01:24 +02:00
Julian Descottes
add2223cba Bug 1596686 - Use absolute paths for require calls r=gl
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-12-27 09:09:51 +00:00
Julian Descottes
5bc4238d39 Bug 1525966 - Reject Error object instead of string in DevTools Front:onPacket r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D55829

--HG--
extra : moz-landing-system : lando
2019-12-11 17:31:39 +00:00
Mihai Alexandru Michis
4ccc5c732e Backed out 2 changesets (bug 1525966) for causing devtools failures.
Backed out changeset 06ca873edb4c (bug 1525966)
Backed out changeset 8ff967efc6d6 (bug 1525966)

CLOSED TREE

--HG--
extra : rebase_source : 8fb6432626ea832ed4bf081068d0c1144de066bd
2019-12-09 16:22:08 +02:00
Julian Descottes
ed63cd4ab4 Bug 1525966 - Reject Error object instead of string in DevTools Front:onPacket r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D55829

--HG--
extra : moz-landing-system : lando
2019-12-09 13:05:31 +00:00
Alexandre Poirot
19058de285 Bug 1590401 - Refactor Front.onFront+onFrontDestroyed into Front.watchFronts. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D53881

--HG--
rename : devtools/server/tests/unit/test_protocol_onFront.js => devtools/server/tests/unit/test_protocol_watchFronts.js
extra : moz-landing-system : lando
2019-11-20 17:13:01 +00:00
Alexandre Poirot
2ea88f4ba9 Bug 1589315 - Expose an API to watch for front destruction. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D49568

--HG--
extra : moz-landing-system : lando
2019-10-23 09:12:40 +00:00
Alexandre Poirot
e848bfe0e9 Bug 1471754 - Allow to unregister Front.onFront listeners. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D49567

--HG--
extra : moz-landing-system : lando
2019-10-23 09:11:58 +00:00
Alexandre Poirot
f5ed7d3556 Bug 1588730 - Ensure calling form() before calling notifying onFront listeners. r=jdescottes
You can listen for fronts creation via `parentFront.onFront(typeName, callback)`.
For now, we were calling `callback` before we pass the `form` to Front.
This leads to empty attributes as the Front doesn't have access to any data.

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

--HG--
extra : moz-landing-system : lando
2019-10-15 15:56:18 +00:00
Nicolas Chevobbe
64388a8a8a Bug 1585271 - Remove custom defer function in Front.js. r=ochameau.
We weren't using the shared defer function  because
at some point it was still using Promise.jsm,
which is slow.
But since Bug 1388054, it's not using Promise.jsm anymore,
so we can use the shared function.

We take this as an opportunity to clean up
the shared defer file comments.

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

--HG--
extra : moz-landing-system : lando
2019-10-01 09:41:24 +00:00
Gabriel Luong
4a1c59f251 Bug 1500142 - Remove inspector bindings from toolbox. r=yulia,ochameau
Differential Revision: https://phabricator.services.mozilla.com/D40320

--HG--
extra : moz-landing-system : lando
2019-09-16 17:39:42 +00:00
Brindusan Cristian
f2aabeaa59 Backed out changeset 3182a1d6debb (bug 1500142) for xpcshell failures at test_oob_cert_auth.js. CLOSED TREE 2019-09-06 23:05:31 +03:00
Gabriel Luong
1ba46b8359 Bug 1500142 - Remove inspector bindings from toolbox. r=ochameau,yulia
Differential Revision: https://phabricator.services.mozilla.com/D40320

--HG--
extra : moz-landing-system : lando
2019-09-06 18:18:04 +00:00
Gabriel Luong
daff679f83 Bug 1569023 - Expose a helper on protocol's Front class to help retrieve the parent front. r=ochameau,yulia
Differential Revision: https://phabricator.services.mozilla.com/D39610

--HG--
extra : moz-landing-system : lando
2019-08-14 04:51:20 +00:00
Gabriel Luong
8923476caf Bug 1539764 - Add a targetFront attribute to the Front class to retrieve the target front. r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D39130

--HG--
extra : moz-landing-system : lando
2019-07-26 21:40:12 +00:00
Noemi Erli
1e52c22f88 Backed out changeset 63fabd70675c (bug 1539764) for causing failures in browser_ext_addon_debugging_netmonitor.js CLOSED TREE 2019-07-26 01:29:13 +03:00
Gabriel Luong
d453abb466 Bug 1539764 - Add a targetFront attribute to the Front class to retrieve the target front. r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D39130

--HG--
extra : moz-landing-system : lando
2019-07-25 20:44:09 +00:00