Commit Graph
239 Commits
Author SHA1 Message Date
Julian Descottes 4af3e17578 Bug 1748112 - [devtools] Do not pass lineNumber = 0 to viewSource r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D165877
2023-01-05 09:25:58 +00:00
Alexandre Poirot d7a3f2cb45 Bug 1807898 - [devtools] Remove all callsites passing a now-useless telemetry sessionId. r=devtools-reviewers,nchevobbe
Note that there is still one leftover usage of sessionId related to performance markers,
which isn't related to telemetry... but a way to distinguish toolbox instances.

Differential Revision: https://phabricator.services.mozilla.com/D165936
2023-01-04 18:28:33 +00:00
Alexandre Poirot 44c4e9f6d7 Bug 1807898 - [devtools] Reuse toolbox's Telemetry instance from all panels. r=devtools-reviewers,nchevobbe
This was slightly more tricky in the debugger as the toolbox's telemetry should be provided to the telemetry module.

Differential Revision: https://phabricator.services.mozilla.com/D165934
2023-01-04 18:28:33 +00:00
Alexandre Poirot 9f7d5e8cf4 Bug 1806616 - [devtools] Rename Toolbox.parserService to parserWorker and merge it with debugger duplicated instance. r=jdescottes
The debugger was involving two distinct instances of parser worker.
One instance managed by the debugger "parserWorker" and another one
managed by the toolbox and also used by the console "evaluationsParser".

By reusing a shared instance we will increase the chance of parsing
files only once, simplify overall comprehension of the various workers
involved and may be speed up toolbox opening.

Differential Revision: https://phabricator.services.mozilla.com/D165136
2022-12-21 22:30:47 +00:00
Alexandre Poirot 54915478d2 Bug 1805378 - [devtools] Automatically start the worker on first WorkerDispatcher invoke/task call. r=bomsy,perftest-reviewers,kshampur
Because of this, we have to now pass the worker URL via WorkerDispatcher constructor.
Doing this should help then extend WorkerDispatcher instead of manually instantiating it.

About browser_jsterm_hide_when_devtools_chrome_enabled_false.js, as the SourceMapLoader
is now started lazily, the worker is no longer started during this test
and so we no longer have to wait for it.

And browser_jsterm_await_paused.js was failing because we resumed too quickly.
I added some code to better wait for awaitExpression full evaluation.

Differential Revision: https://phabricator.services.mozilla.com/D164547
2022-12-20 19:09:56 +00:00
Alexandre Poirot 8103a818db Bug 1805378 - [devtools] Reuse toolbox parser worker from the webconsole. r=bomsy
Note that we still have to instantiate a Webconsole dedicated one in case of Browser Console,
which won't have any toolbox offhand.

Differential Revision: https://phabricator.services.mozilla.com/D164545
2022-12-20 19:09:55 +00:00
Stanca Serban a07226cd80 Backed out 7 changesets (bug 1805378) for causing failures in source-map-loader.js. CLOSED TREE
Backed out changeset 4dd1ad435728 (bug 1805378)
Backed out changeset 5479ff3a475f (bug 1805378)
Backed out changeset bd89280bde1a (bug 1805378)
Backed out changeset 1bd4fec4b964 (bug 1805378)
Backed out changeset 975bd01106d7 (bug 1805378)
Backed out changeset 9a1e0541748a (bug 1805378)
Backed out changeset 926ce2f2d51f (bug 1805378)
2022-12-19 23:29:20 +02:00
Alexandre Poirot 9f8dbaf1d5 Bug 1805378 - [devtools] Automatically start the worker on first WorkerDispatcher invoke/task call. r=bomsy
Because of this, we have to now pass the worker URL via WorkerDispatcher constructor.
Doing this should help then extend WorkerDispatcher instead of manually instantiating it.

About browser_jsterm_hide_when_devtools_chrome_enabled_false.js, as the SourceMapLoader
is now started lazily, the worker is no longer started during this test
and so we no longer have to wait for it.

And browser_jsterm_await_paused.js was failing because we resumed too quickly.
I added some code to better wait for awaitExpression full evaluation.

Differential Revision: https://phabricator.services.mozilla.com/D164547
2022-12-19 17:00:36 +00:00
Alexandre Poirot 1468f8a899 Bug 1805378 - [devtools] Reuse toolbox parser worker from the webconsole. r=bomsy
Note that we still have to instantiate a Webconsole dedicated one in case of Browser Console,
which won't have any toolbox offhand.

Differential Revision: https://phabricator.services.mozilla.com/D164545
2022-12-19 17:00:36 +00:00
Alexandre Poirot 81c03b3484 Bug 1801695 - [devtools] Use ChromeWorker for devtools frontend workers. r=bomsy
This allows using a regular worker and no longer have to be related to any particular document.

Differential Revision: https://phabricator.services.mozilla.com/D162964
2022-12-12 13:15:51 +00:00
Alexandre Poirot 59fe57c052 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 465fac9684 Bug 1792847 - [devtools] Use absolute URLs to import modules in devtools/client/webconsole. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D158380
2022-09-30 15:17:40 +00:00
Alexandre Poirot 0f32f335e3 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
Alexandre Poirot 1d82613fbe Bug 1571708 - [devtools] Only expose the currently selected frame actor ID from the debugger to other panels. r=jdescottes
We only need the frame actor ID.
It might be helpful to expose the frame front instead,
but at the end of the day, the server expects the frame actor ID.

Differential Revision: https://phabricator.services.mozilla.com/D143041
2022-04-11 11:07:57 +00:00
wartmanm 4ac01f9a1a Bug 1658238 - Autocomplete source-mapped variable names r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D87117
2021-10-19 11:40:09 +00:00
Nicolas Chevobbe 51ae13fc7b Bug 1712739 - [devtools] Add a script command with an execute method. r=jdescottes.
This method is meant to replace the direct usage
of webconsoleFront.evaluateJSAsync.
The WebConsoleCommands file is removed, and all
client calls to evaluateJSAsync are migrated to
the new method. Callsites are simplified when
possible, and some test are refactored to switch
to spawned task to retrieve content page information.

Differential Revision: https://phabricator.services.mozilla.com/D116242
2021-06-02 13:15:06 +00:00
Alexandre Poirot c66a185fac Bug 1712686 - [devtools] Pull DevToolsClient from commands object instead of target fronts. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D115862
2021-05-26 08:23:34 +00:00
Alexandre Poirot f3b6620342 Bug 1701790 - Migrate ResourceWatcher to become ResourceCommand. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D113930
2021-05-04 09:29:47 +00:00
Brindusan Cristian d5be5fbb54 Backed out 5 changesets (bug 1701790) for bc failures in browser_ext_devtools_network_targetSwitch.js. CLOSED TREE
Backed out changeset 3fc4edd663d9 (bug 1701790)
Backed out changeset 2d3ea7c0d695 (bug 1701790)
Backed out changeset 6cb7502fc1a2 (bug 1701790)
Backed out changeset 8f4205a1a369 (bug 1701790)
Backed out changeset bd3c9b1482c7 (bug 1701790)
2021-05-03 22:21:59 +03:00
Alexandre Poirot 8479ca9cbb Bug 1701790 - Mass replace resourceWatcher with resourceCommand. r=nchevobbe
$ sed -i 's/resourceWatcher/resourceCommand/g' $(egrep -rl 'resourceWatcher' devtools/)

Differential Revision: https://phabricator.services.mozilla.com/D113933
2021-05-03 18:07:31 +00:00
Alexandre Poirot d43edf6ca5 Bug 1696374 - [devtools] Stop storing targetList on WebConsole hud. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D110382
2021-04-12 07:59:51 +00:00
Alexandre Poirot 39cae4d3eb Bug 1700337 - [devtools] Make the BrowserConsole code slightly less target centric. r=nchevobbe
- we don't need to override WebConsole.currentTarget as it should pull the current top target via targetList instead of toolbox
- BrowserConsole constructor then no longer need to receive the target as argument
- and finally, BrowserConsoleManager can pass around the descriptor instead of the first target.

Differential Revision: https://phabricator.services.mozilla.com/D109493
2021-03-25 16:02:31 +00:00
Alexandre Poirot d0cb4d3694 Bug 1693491 - [devtools] Migrate TargetList to be a command r=nchevobbe,rpl
This changeset is incomplete and focus on places where we instantiate TargetList constructor

Differential Revision: https://phabricator.services.mozilla.com/D105611
2021-03-11 12:53:18 +00:00
Alexandre Poirot ec5d85ae84 Bug 1691681 - [devtools] Introduce "commands" in order to ease calling global commands throught the Watcher. r=nchevobbe,bomsy,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D97575
2021-03-03 17:02:42 +00:00
Nicolas Chevobbe 54c26e4c68 Bug 1658724 - Don't start the parser worker if it's not needed when evaluating an expression in the console. r=jdescottes. DONTBUILD
In `getMappedExpression`, we check if the expression contains `await `, and in
such case, transform the input to handle top-level await expressions.

The catch is that we first check the existence of this.parserService, and the
getter for parserService will start the parser worker if it wasn't the case yet.
That means we were always spawning the parser worker, even if it wasn't going
to be used, consuming unnecessary resources.

This patch removes the conditions in the if, as `parserService` will always be truthy.

Differential Revision: https://phabricator.services.mozilla.com/D86826
2020-08-17 13:22:51 +00:00
Logan Smyth 4064b56e7e Bug 1643180 - Part 2: Update the Frame component to always pass generated position to view source. r=jlast
Differential Revision: https://phabricator.services.mozilla.com/D78381
2020-06-05 22:18:38 +00:00
Logan Smyth 9e0269ef37 Bug 1642371 - Part 4: Open style editor using exact front object where possible. r=jlast
Differential Revision: https://phabricator.services.mozilla.com/D77740
2020-06-03 22:38:11 +00:00
David Walsh 1dee07ef40 Bug 1625493 - Use destructuring in webconsole r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D68392
2020-03-30 07:57:41 +00:00
Alexandre Poirot be914a54df Bug 1620234 - Use the Resources API for console messages. r=jdescottes,nchevobbe
This demonstrates using the Resources API for the console messages,
using the existing actor methods. It helps proving that this will work against old runtimes.
But the plan is to followup in bug 1620243 so that we implement this code on the server side.
This will help getting rid of this LegacyImplementation code and have a simplier code on the server.

Differential Revision: https://phabricator.services.mozilla.com/D65526
2020-03-30 13:15:17 +00:00
Nicolas Chevobbe d098714dcc Bug 1616897 - Remove WebReplay-related functions/variables/css rules in devtools. r=jlast.
Differential Revision: https://phabricator.services.mozilla.com/D68514
2020-03-27 15:10:53 +00:00
Julian Descottes 7e4ee510bf Bug 1604539 - Rename shared/fronts to client/fronts in the devtools codebase r=nchevobbe
Depends on D67603
This patch is an automated string replace of shared/fronts/ to client/fronts/ in devtools.

Differential Revision: https://phabricator.services.mozilla.com/D67604
2020-03-20 13:58:56 +00:00
Bogdan Tara cc5d7d8232 Backed out 5 changesets (bug 1604539) for xpc failures complanining about test_encryption.js CLOSED TREE
Backed out changeset 8455e50002a9 (bug 1604539)
Backed out changeset fb410a1bf9aa (bug 1604539)
Backed out changeset da94f7d503a1 (bug 1604539)
Backed out changeset b4b54335ee2d (bug 1604539)
Backed out changeset 866d6794bbba (bug 1604539)
2020-03-20 15:53:23 +02:00
Julian Descottes 0cac844f0c Bug 1604539 - Rename shared/fronts to client/fronts in the devtools codebase r=nchevobbe
Depends on D67603
This patch is an automated string replace of shared/fronts/ to client/fronts/ in devtools.

Differential Revision: https://phabricator.services.mozilla.com/D67604
2020-03-20 12:57:58 +00:00
Jason Laster 804858d099 Bug 1616380 - Refactor frame helpers to use fronts. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D63253
2020-02-21 13:21:33 +00:00
Jason Laster 516a3e2ded Bug 1616654 - Browser crashes because highlightDomElement is not a function. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D63394
2020-02-21 08:01:28 +00:00
Alexandre Poirot b8f7894aa5 Bug 1605763 - Emit 'web-console-created' after the BrowserConsole is fully loaded. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D62719
2020-02-13 13:50:30 +00:00
Nicolas Chevobbe d29fe03498 Bug 1601688 - Use emitForTests when events are only used in tests. r=Honza.
Differential Revision: https://phabricator.services.mozilla.com/D57500
2020-01-09 16:07:42 +00:00
Arthur Iakab ab1e9d340e Backed out 2 changesets (bug 1601688) for causing node-devtools failures.
CLOSED TREE

Backed out changeset 27cec4c76272 (bug 1601688)
Backed out changeset 9aa05612f10f (bug 1601688)
2020-01-09 17:09:55 +02:00
Nicolas Chevobbe bce242e337 Bug 1601688 - Use emitForTests when events are only used in tests. r=Honza.
Differential Revision: https://phabricator.services.mozilla.com/D57500
2020-01-09 14:50:30 +00:00
Nicolas Chevobbe 78ac5b16fd Bug 1601630 - Remove WebConsoleUI evaluateJSAsync. r=jlast.
This method was directly using the main target console front
to evaluate something, which could cause issue in a fission
world.
The function is moved to the WebConsole class, and calls commands
evaluateJSAsync, in which we retrieve the appropriate front
given the given options object (e.g. if there's a selecteObjectActor,
we'll talk to the target that hold the actor).

Differential Revision: https://phabricator.services.mozilla.com/D55986
2019-12-06 08:29:20 +00:00
Alexandre Poirot d7502328e9 Bug 1592363 - Make the console use the TargetList. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D48860
2019-11-07 15:05:10 +00:00
Nicolas Chevobbe ce25c3f455 Bug 1519103 - Remove Scratchpad panel. r=bgrins.
Differential Revision: https://phabricator.services.mozilla.com/D50583
2019-10-27 09:05:58 +00:00
Nicolas Chevobbe f35b08e432 Bug 1577783 - Use inspectorFront's getNodeFrontFromNodeGrip function in WebConsole's openNodeInInspector. r=pbro,rcaliman.
We retrieve the right NodeFront from a given grip, which we
can then tell the inspector panel to select.

Differential Revision: https://phabricator.services.mozilla.com/D48810
2019-10-18 09:07:42 +00:00
jaril 0cf060d35e Bug 1587170 - Fix highlight of the replay marker when hovering on a console message r=jlast
Differential Revision: https://phabricator.services.mozilla.com/D48608
2019-10-08 21:18:21 +00:00
Jason Laster 3934a4c8a5 Bug 1582870 - Reduxify console actions. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D46674
2019-10-02 22:50:25 +00:00
Julian Descottes ec0561c247 Bug 1583444 - Stop using window.top in WebConsole codebase r=nchevobbe
This changesets removes some webconsole callsites that were relying on window.top, but didn't trigger any regression.

Differential Revision: https://phabricator.services.mozilla.com/D46957
2019-09-30 09:51:44 +00:00
Nicolas Chevobbe 13b46fdc43 Bug 1576841 - Enable multi-proxy WebConsole in Browser Toolbox when fission pref is true. r=ochameau.
We remove the multiple this.fissionSupport properties to only check
the permission in the couple place we need it.

Differential Revision: https://phabricator.services.mozilla.com/D43585
2019-08-27 17:41:29 +00:00
Alexandre Poirot 680b2ec9e1 Bug 1570242 - Rename target to currentTarget in WebConsole codebase. r=nchevobbe,yulia
Do that to better highlight that the target can change over time.

Differential Revision: https://phabricator.services.mozilla.com/D41798
2019-08-22 08:10:13 +00:00
Alexandre Poirot 79fa88db4f Bug 1570242 - Fetch toolbox from WebConsole class rather than gDevTools. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D41797
2019-08-22 08:10:06 +00:00
Alexandre Poirot c270ef4785 Bug 1570242 - Fetch target from toolbox instead of memoizing it on console classes. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D40017
2019-08-22 08:09:59 +00:00