Because we are currently using an ignore list, we may miss any type not correctly ignored.
Let's instead use an accept list and be exaustive in which type the worker targets support.
Differential Revision: https://phabricator.services.mozilla.com/D167261
remote=true wasn't quite the right check here.
This workaround here is rather around chrome <=> content boundaries.
When we load a URL that loads in the parent process (like about:devtools-toolbox),
this ignores remote=true and loads in parent, but type="content"
is still enforced and still prevent it from being listed in BrowsingContext.children.
Because of this the about:devtools-toolbox wasn't visible in the storage panel.
Differential Revision: https://phabricator.services.mozilla.com/D166659
This makes the console behave like the other React panels.
We can also get rid of the specific bits for mocha in devtools-node-test-runner.js
Differential Revision: https://phabricator.services.mozilla.com/D167233
Depends on D167164
I was hoping to remove this noop watcher thanks to the previous patch, but we have to keep it.
Updated the comment to highlight the main reason why the watchResources call is needed here.
Alternatively, instead of a no-op here, we could either
- cache the stylesheet resources in the inspector front and remove getResourceById on resourceCommand
- or automatically watch stylesheets
Differential Revision: https://phabricator.services.mozilla.com/D167165
Depends on D167098
This is normally not triggered by any scenario with the current DevTools but there is no reason actors should not be allowed to use the stylesheet-manager
unless a client has started it.
Differential Revision: https://phabricator.services.mozilla.com/D167164
This is a very old and legacy attribute which always had a fuzzy definition.
As of today it was a somewhat alias of "not debugging a local/remote tab".
Differential Revision: https://phabricator.services.mozilla.com/D166904
Ideally, the debugging context should rather be defined by the descriptor
rather than the top target.
On top of that isAddon is only an alias for isWebExtension.
So drop most usages of isAddon and otherwise use isWebExtension.
Differential Revision: https://phabricator.services.mozilla.com/D166903
This event was only used in this test.
Unfortunately, I wasn't able to keep the same logic in the test while keeping it reliable.
I prefer to remove this test-only event and simplify the test to only ensure
we safely ignore subsequent calls to toggle.
What is hard to know from the test, when calling toggle in some following event loops
is if this will be ignored -or- close/open a toolbox...
Differential Revision: https://phabricator.services.mozilla.com/D165715
This toolbox-unload was only fired for ToolboxHostManager own usage.
On top of that, ToolBoxHostManager was delaying its destruction by an additional
event loop. It indicates that this toolbox-unload event was too early.
So it rather makes sense to use the latest event in the destruction codepath.
i.e. toolbox's "destroyed" event.
I kept the event loop tick as toolbox-destroyed is still slightly too early.
The debugger is still going through pending async work in browser_dbg-breakpoints-in-evaled-sources.js.
This relates to the promise middleware which delay each promise action
by an event loop tick using setTimeout. setTimeout throws once we remove the host iframe.
I first tried to remove this event loop tick.
It highlighted two possible intermittents in two tests involving viewSourceInDebugger.
These tests weren't waiting for the full processing of opened sources by the Debugger frontend.
Using debugger shared-head helpers ensure waiting for full source selection.
Differential Revision: https://phabricator.services.mozilla.com/D165714
This is a very old and legacy attribute which always had a fuzzy definition.
As of today it was a somewhat alias of "not debugging a local/remote tab".
Differential Revision: https://phabricator.services.mozilla.com/D166904
Ideally, the debugging context should rather be defined by the descriptor
rather than the top target.
On top of that isAddon is only an alias for isWebExtension.
So drop most usages of isAddon and otherwise use isWebExtension.
Differential Revision: https://phabricator.services.mozilla.com/D166903
The legacy listener was explicitely avoiding emitting this event for non top-level targets.
It seems like all frontend code listening to will-navigate ignore the event is targetFront.isTopLevel is false,
so it looks like no code would expect these event.
So let's try to avoid emitting them if they aren't used by anyone.
(and can be confusing/buggy in the context of the browser toolbox)
Differential Revision: https://phabricator.services.mozilla.com/D166769
Depends on D166139
This is one of the easiest actors to unplug, and it has very little connections to the rest, so doing it early in the stack
Differential Revision: https://phabricator.services.mozilla.com/D166141
The legacy listener was explicitely avoiding emitting this event for non top-level targets.
It seems like all frontend code listening to will-navigate ignore the event is targetFront.isTopLevel is false,
so it looks like no code would expect these event.
So let's try to avoid emitting them if they aren't used by anyone.
(and can be confusing/buggy in the context of the browser toolbox)
Differential Revision: https://phabricator.services.mozilla.com/D166769
This is a very old and legacy attribute which always had a fuzzy definition.
As of today it was a somewhat alias of "not debugging a local/remote tab".
Differential Revision: https://phabricator.services.mozilla.com/D166904
Ideally, the debugging context should rather be defined by the descriptor
rather than the top target.
On top of that isAddon is only an alias for isWebExtension.
So drop most usages of isAddon and otherwise use isWebExtension.
Differential Revision: https://phabricator.services.mozilla.com/D166903
The legacy listener was explicitely avoiding emitting this event for non top-level targets.
It seems like all frontend code listening to will-navigate ignore the event is targetFront.isTopLevel is false,
so it looks like no code would expect these event.
So let's try to avoid emitting them if they aren't used by anyone.
(and can be confusing/buggy in the context of the browser toolbox)
Differential Revision: https://phabricator.services.mozilla.com/D166769
The modification made to Loader isn't necessary as the sandboxName
isn't relevant/used. The global will be the one crafted by C++
and be named "Devtools global".
But in case something change, this may catch yet another unexpected behavior.
Differential Revision: https://phabricator.services.mozilla.com/D166122
The legacy listener was explicitely avoiding emitting this event for non top-level targets.
It seems like all frontend code listening to will-navigate ignore the event is targetFront.isTopLevel is false,
so it looks like no code would expect these event.
So let's try to avoid emitting them if they aren't used by anyone.
(and can be confusing/buggy in the context of the browser toolbox)
Differential Revision: https://phabricator.services.mozilla.com/D166769
This makes symbolication work on macOS 13+ for system libraries for which the Mozilla symbol server has no symbols,
for example for system libraries from macOS Beta versions.
It also makes the /asm/v1 endpoint work for system libraries on macOS 13+.
The dyld shared cache moved to a new location in that version.
This fix matches the fix for samply in da71321c59 .
Depends on D166227
Differential Revision: https://phabricator.services.mozilla.com/D166228
As usual, the changes to profiler_get_symbols.js were auto-generated by wasm-bindgen
and do not need to be reviewed carefully.
This update comes with the following fixes and improvements:
- For ELF files without a build ID, the fallback debug ID is now computed correctly. (fixes bug 1805915)
- If no symbol information is available, and we fall back to a stripped binary,
the fallback symbols are less misleading. We now show fun_1b3d4f symbols for
functions with missing symbols, instead of taking the name of the closest
"exported" symbol. This fixes another long-standing annoyance.
- Symbols now have a "function_size" attribute, which is needed for the
upcoming assembly view in order to know how many bytes to disassemble.
- A new API path has been added: /asm/v1. This is a first implementation
of an assembly endpoint, to be used in the upcoming assembly view in the
profiler.
We need to implement one new method in the helper: getCandidatePathsForBinary.
This method is used to find the file which we can get the assembly code bytes from.
However, we end up listing almost the same paths in it as in getCandidatePathsForDebugFile;
the only difference is that we don't list the path to the Windows PDB file,
by not adding an entry for the lib's debugPath.
Differential Revision: https://phabricator.services.mozilla.com/D166227
They have been disabled since bug 1688695. There's a variety of
table-caption bugs that would be easier to fix if we didn't have to
account for side-captions.
Differential Revision: https://phabricator.services.mozilla.com/D165690
* Use FormatterError exception to factorize the code to log formatter errors and ignore them
* Use one seperate function to process a single formatter to simplify the loop comprehension
* Use early return in both function to reduce the nesting of functions,
and also process error first. This helps processFormatterForHeader process all errors first.
Differential Revision: https://phabricator.services.mozilla.com/D166285
I suspect we are using getAllTargetsInSelectedTargetTree which could theoritically
return destroyed targets as it is async.
If we are using getAllTargets, this is less clear. It shouldn't return destroyed target.
Differential Revision: https://phabricator.services.mozilla.com/D166308
Use new "commands" thunk argument.
We were passing connector as argument whereas we could have fetched it from thunk arguments.
This will help slowly convert Connector/NetMonitorAPI to a command.
Differential Revision: https://phabricator.services.mozilla.com/D166055
This will help use commands directly and restrict Connector to non-RDP work.
There is a few minor methods related to toolbox integration.
Differential Revision: https://phabricator.services.mozilla.com/D166054
This help reduce the usages of toolbox, which is very limited in the connector
and help see that it could become mostly a command itself.
Differential Revision: https://phabricator.services.mozilla.com/D166052
As the since the object that is used to consolidate the query for the url
has its prototype chain, adding a parameter with name `__proto__` tries to lookup the
prototype chain and blows up.
Lets amke it a simple dictionary by removing the prototype chain.
Differential Revision: https://phabricator.services.mozilla.com/D164420
They have been disabled since bug 1688695. There's a variety of
table-caption bugs that would be easier to fix if we didn't have to
account for side-captions.
Differential Revision: https://phabricator.services.mozilla.com/D165690
Even if the code was trying to not get duplicated messages (from the cache and from the listener),
there were still cases where this could happen (e.g. CSP warnings on navigation).
To prevent this, we store the latest message microSecondTimeStamp so we can filter
out any message older than this in the listener.
An existing CSP warning test is modified to ensure we get single messages in the
console output.
Differential Revision: https://phabricator.services.mozilla.com/D166183
They have been disabled since bug 1688695. There's a variety of
table-caption bugs that would be easier to fix if we didn't have to
account for side-captions.
Differential Revision: https://phabricator.services.mozilla.com/D165690