Commit Graph
52 Commits
Author SHA1 Message Date
Dave Townsend 2af4d349f3 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 2711398289 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 07e6ce0083 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 86c7a14e62 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 3387a89bc7 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 41e7308220 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 9b75e905d1 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 80598b951a Backed out changeset 46c9d33f30a7 (bug 1773284) for causing devtools failures. CLOSED TREE 2022-06-09 17:15:41 +03:00
Alexandre Poirot 1aea566c1b 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 d48123ef45 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 b4379f28ba 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 6e80260233 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 10f12df8ef 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 e9904f8f2d 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 d408fb654e 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 eed5be233c 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 b5fd7d2208 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 e903ace85e 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 33bec10b8c 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 a7258b6b58 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 96670683c4 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 3d28124e4e 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 426d65e820 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 bccddea946 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 de114fa0c1 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 f6fe1c7aa6 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 c85c003b74 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 8648a90536 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
2020-03-16 17:34:32 +00:00
Nicolas Chevobbe 292c52c1d3 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
2020-03-16 17:38:09 +00:00
Alexandre Poirot 17bbc2e5a6 Bug 1620257 - Print the actorID when we receive a error in protocol.js Fronts. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D65525
2020-03-10 22:29:04 +00:00
Julian Descottes c22c426de6 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
2020-02-18 08:02:29 +00:00
Alexandre Poirot 35634f4f44 Bug 1614792 - Rename DebuggerClient to DevToolsClient. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D62495
2020-02-17 13:39:25 +00:00
Julian Descottes 150349d1c5 Bug 1596686 - Use absolute paths for require calls r=gl
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D58243
2019-12-27 12:23:47 +00:00
Razvan Maries 0f5ce38e4c 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 3fa1b45876 Bug 1596686 - Use absolute paths for require calls r=gl
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D58243
2019-12-27 09:09:51 +00:00
Julian Descottes cdf779c751 Bug 1525966 - Reject Error object instead of string in DevTools Front:onPacket r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D55829
2019-12-11 17:31:39 +00:00
Mihai Alexandru Michis 14a27b4910 Backed out 2 changesets (bug 1525966) for causing devtools failures.
Backed out changeset 06ca873edb4c (bug 1525966)
Backed out changeset 8ff967efc6d6 (bug 1525966)

CLOSED TREE
2019-12-09 16:22:08 +02:00
Julian Descottes 32a7b38d6a Bug 1525966 - Reject Error object instead of string in DevTools Front:onPacket r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D55829
2019-12-09 13:05:31 +00:00
Alexandre Poirot 6f07ebeae6 Bug 1590401 - Refactor Front.onFront+onFrontDestroyed into Front.watchFronts. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D53881
2019-11-20 17:13:01 +00:00
Alexandre Poirot 1990b13ca9 Bug 1589315 - Expose an API to watch for front destruction. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D49568
2019-10-23 09:12:40 +00:00
Alexandre Poirot 64872253f4 Bug 1471754 - Allow to unregister Front.onFront listeners. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D49567
2019-10-23 09:11:58 +00:00
Alexandre Poirot 72525d0ad9 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
2019-10-15 15:56:18 +00:00
Nicolas Chevobbe 3a9722597e 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
2019-10-01 09:41:24 +00:00
Gabriel Luong 712d5539c3 Bug 1500142 - Remove inspector bindings from toolbox. r=yulia,ochameau
Differential Revision: https://phabricator.services.mozilla.com/D40320
2019-09-16 17:39:42 +00:00
Brindusan Cristian 9b2c584a7a 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 6f66f3e485 Bug 1500142 - Remove inspector bindings from toolbox. r=ochameau,yulia
Differential Revision: https://phabricator.services.mozilla.com/D40320
2019-09-06 18:18:04 +00:00
Gabriel Luong d0d27b984e 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
2019-08-14 04:51:20 +00:00
Gabriel Luong bcb63dffc6 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
2019-07-26 21:40:12 +00:00
Noemi Erli a85b2530e5 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 721438955c 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
2019-07-25 20:44:09 +00:00