Commit Graph
19 Commits
Author SHA1 Message Date
Mark Banner 862b27101a Bug 2010005 - Clean up references to .jsm in devtools code. r=devtools-reviewers,profiler-reviewers,nchevobbe,canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D278776
2026-01-14 15:38:46 +00:00
Gijs Kruitbosch 88916cf7fb Bug 1967204 - remove superfluous eslint-env frame/process/page script annotations from the tree, r=frontend-codestyle-reviewers,mossop
Differential Revision: https://phabricator.services.mozilla.com/D266834
2025-09-30 15:30:31 +00:00
Alexandre Poirot dee9dd3df9 Bug 1866814 - [devtools] Rename WatcherRegistry to ParentProcessWatcherRegistry. r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D204872
2024-04-02 08:54:51 +00:00
Cristian Tuns db7b2a330c Backed out 3 changesets (bug 1866814) for causing bc failures browser_ext_devtools_inspectedWindow_targetSwitch.js CLOSED TREE
Backed out changeset 5d59dd808307 (bug 1866814)
Backed out changeset f503f5d02d1e (bug 1866814)
Backed out changeset d27f783be149 (bug 1866814)
2024-03-28 08:37:11 -04:00
Alexandre Poirot 34273f8219 Bug 1866814 - [devtools] Rename WatcherRegistry to ParentProcessWatcherRegistry. r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D204872
2024-03-28 10:47:17 +00:00
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
Alexandre Poirot a9112c06e4 Bug 1648499 - [devtools] Use JS Process actors to debug content process via DevTools. r=devtools-reviewers,nchevobbe
We were using process script and process message managers to interact with content processes.
This patch migrates the whole logic to JS Process Actor.

Note that we may still use old API in process descriptor, but that's a different story.

This helps align frame, process and worker targets all around JS Actors,
making it easier to align all three target types to the same logic.

Also fix passing `isModeSwitching` for content process targets
so that console is correctly cleared when switching between modes.

With this and the ongoing Service Worker equivalent work, we should be able to factorize some code.

Differential Revision: https://phabricator.services.mozilla.com/D167965
2024-02-21 20:45:15 +00:00
Alexandre Poirot d647366308 Bug 1861943 - [devtools] Introduce a server side method to set all data entry values in one call. r=devtools-reviewers,nchevobbe
This will help bug 1569775 and bug 1651522 to update the whole entries of a given data type.

As there is little difference between adding new entries and replacing all entries,
I'm tuning the existing addSessionDataEntry methods to support both behaviors.

Differential Revision: https://phabricator.services.mozilla.com/D192243
2023-11-06 12:37:24 +00:00
Alexandre Poirot 059764322b Bug 1789595 - [devtools] Convert devtools/server JSM to ES Modules. r=nchevobbe
This is the result of:
$ ./mach esmify devtools/server/

Differential Revision: https://phabricator.services.mozilla.com/D156826
2022-09-09 10:13:15 +00:00
Nicolas Chevobbe 97f04b57b0 Bug 1781726 - [devtools] Pass an isModeSwitching property to onTargetDestroyed callback param when switching modes. r=jdescottes,devtools-backward-compat-reviewers.
We pass `isModeSwitching` to `unwatchTargets` from the target command when the
pref is changed.
On the server, we then pass it to the various places which might call `notifyTargetDestroyed`,
so we can pass the flag in the `target-destroyed-form` event, which we can then
pass to TargetCommand#onDestroyed callbacks.`

Differential Revision: https://phabricator.services.mozilla.com/D152758
2022-07-29 14:30:07 +00:00
Tooru Fujisawa 40e52cea83 Bug 1780543 - Part 3: Add mozilla/process-script environment as alias to frame-script. r=Standard8,perftest-reviewers,webcompat-reviewers,necko-reviewers,twisniewski,sparky,dragana
Differential Revision: https://phabricator.services.mozilla.com/D152428
2022-07-26 02:46:29 +00:00
Tooru Fujisawa 48c568867c Bug 1667455 - Part 5: Stop importing Services.jsm from chrome-priv JS code, top-level single-line cases. r=kmag,webdriver-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,extension-reviewers,application-update-reviewers,pip-reviewers,twisniewski,m_kato,jdescottes,mconley,AlexandruIonescu,mossop
Differential Revision: https://phabricator.services.mozilla.com/D150894
2022-07-11 12:41:50 +00:00
Nicolas Chevobbe ad88c78215 Bug 1766128 - [devtools] Don't define empty default values for sessionData in getSessionData. r=ochameau
A test is added to check that having a script with a debugger statement does
not lead to the thread pausing.

Differential Revision: https://phabricator.services.mozilla.com/D150356
2022-06-30 13:44:42 +00:00
Alexandre Poirot 2471540bb8 Bug 1737100 - [devtools] Pass down sessionContext to all target actors. r=nchevobbe
This helps better differentiates cases where we instantiate a target actor
with a watcher actor and possibly debug the whole browser and instantiate many targets.
Or when we instantiate only one target actor, like when we debug workers or xpcshell from about:debugging.
For now, in this case, there is no watcher actor involved and we manually instantiate the target from the descriptor.

Differential Revision: https://phabricator.services.mozilla.com/D146584
2022-05-18 12:40:53 +00:00
Alexandre Poirot 4a6e7b6c12 Bug 1730968 - [devtools] Fix typo preventing to remove data entries. r=bomsy
This probably had many side effects in the browser toolbox when debugging content processes.
But the main one was about not properly unregistering breakpoints when removing/disabling it.
This is only specific to content process targets, so this is only impacting the browser toolbox.

Differential Revision: https://phabricator.services.mozilla.com/D138325
2022-02-13 21:01:04 +00:00
Alexandre Poirot 9e4ca5c563 Bug 1731967 - [devtools] Renamed all "watcher data" to "session data". r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D128349
2021-10-13 16:35:06 +00:00
Alexandre Poirot 4419d79bfb Bug 1731967 - [devtools] Renamed all "watched data" to "session data". r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D128348
2021-10-13 16:35:05 +00:00
Alexandre Poirot e83109f86e Bug 1620248 - [devtools] Rename content-process.jsm init method to initContentProcessTarget. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D94373
2020-10-22 10:02:47 +00:00
Alexandre Poirot be526e6374 Bug 1620248 - [devtools] Create ContentProcessTarget from the server side via the Watcher Actor. r=nchevobbe,jdescottes
Before, targets were created on-demand, from the frontend, by calling ProcessDescriptor.getTarget
when the root actor informed the frontend of a creation of a content process via processListChanged event
and the notification of a new ProcessDescriptor.
This previous behavior was making so that the target actor was created very late and did not allow
recording for resources (console messages for ex), nor setting breakpoints very early during the process startup.

With this new implementation, the watcher actor allows knowing if the frontend cares about content process target or not.
We should only create these targets if the browser toolbox is opened, and typically not if we are only debugging a tab via a regular web toolbox.
We do that via WatcherActor.watchTarget and sharedData object.
content-process-script.js is loaded in all processes. Process script are loaded quite early during process startup.
Soonish after `sharedData` is passed to the content process.
So that it is hopefully executed before most privileged javascript runs.
Javascript code where we possibly want to debug/observe/set a breakpoint on.
This setup allows us to create the Content Process Target actor much earlier than the previous setup.
When created, the target actor immediately start listening for resources (console message and others) via its `addWatcherDataEntry` method.
In a near future, breakpoints will also be set via this method.

We should also followup to use something else than Process Script and sharedData
in order to create the target earlier, before any JS runs.

Differential Revision: https://phabricator.services.mozilla.com/D65529
2020-10-22 10:02:42 +00:00