This migrate gDevTools.showToolbox, but also the Toolbox now receives a commands right away,
and no longer need to create commands out of the descriptor front.
I'm removing browser_two_tabs as it is focusing on testing Tab Descriptors (RootFront.listTabs+getTab)
and Tab targets (TabDescriptor.getTarget).
Using getTarget on descriptor is legacy codepath for a while now.
We should now rather cover commands instead of these low level RDP methods.
Differential Revision: https://phabricator.services.mozilla.com/D157796
This migrate gDevTools.showToolbox, but also the Toolbox now receives a commands right away,
and no longer need to create commands out of the descriptor front.
I'm removing browser_two_tabs as it is focusing on testing Tab Descriptors (RootFront.listTabs+getTab)
and Tab targets (TabDescriptor.getTarget).
Using getTarget on descriptor is legacy codepath for a while now.
We should now rather cover commands instead of these low level RDP methods.
Differential Revision: https://phabricator.services.mozilla.com/D157796
This migrate gDevTools.showToolbox, but also the Toolbox now receives a commands right away,
and no longer need to create commands out of the descriptor front.
I'm removing browser_two_tabs as it is focusing on testing Tab Descriptors (RootFront.listTabs+getTab)
and Tab targets (TabDescriptor.getTarget).
Using getTarget on descriptor is legacy codepath for a while now.
We should now rather cover commands instead of these low level RDP methods.
Differential Revision: https://phabricator.services.mozilla.com/D157796
Use 'globalThis' instead of 'this' when trying to attach a debugger to the
current global to avoid subtle footguns with the varied definitions of 'this'.
The debugger interface needs a true GlobalObject so this is much clearer. In
particular, this is a problem in test_nativewrappers.js when the test runs in
strict mode since the 'this' in the test function is no long implicitly the
global.
Differential Revision: https://phabricator.services.mozilla.com/D157544
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
`WebConsoleConnectionProxy` is now only used for:
- listening to `lastPrivateContextExited`, which can be done from the top-level
console front instead
- setting `NetworkMonitor.saveRequestAndResponseBodies` for toolbox we don't have
network resource support for, which would be better done in `startWatchingNetworkResources`.
This means we don't need to keep a Map of additional proxies.
The only impact is on `clearMessagesCache`, where we now fetch all fronts with
`getAllFronts` instead of looping through the Map of additional proxies.
This change highlighted some race condition in tests, as it's now slightly slower.
So we add a new `clearMessagesCacheAsync` function, which is doing the same thing
as `clearMessagesCache`, except it's not `oneway`, so we can know when the cache
was indeed cleared, and we emit an event to indicate when the cache was cleared.
We can't simply remove `oneway` from `clearMessagesCache` as it causes backward
compatibility issues we can't avoid.
This also highlighted an issue with the cache not being cleared on `console.clear`
when it is batched, so we fix this (a test was failing without it).
The next patch in the queue will completely remove `WebConsoleConnectionProxy`.
Differential Revision: https://phabricator.services.mozilla.com/D150085
And pass a toolbox instead of only the toplevel target.
It helps identify the browser toolbox and easily enable/disable tools for it.
Differential Revision: https://phabricator.services.mozilla.com/D143628
This link has not been working for a while, switching to an MDN example page.
We should still come up with example pages hosted on a domain owned by devtools team if possible
(and not on the personal github account of a team member :) )
Depends on D137141
Differential Revision: https://phabricator.services.mozilla.com/D137282