resource ids are channel ids and should be incrementally generated. The current id is actually an actor id, meaning it is a string which will lead to incorrect comparisons (eg "Actor10" will be considered "lower" than "Actor2") and also fully depends on the order in which we create the actors.
On some platform / configurations we get identical timestamps for batches of requests, so the fallback mechanism should be reliable
Differential Revision: https://phabricator.services.mozilla.com/D169361
To do this, we need to only have a single SourceMapGenerator instance for all
the inline scripts of an HTML file, for which we add mappings with offsets based
on where the inline script is in the HTML file.
To support that, we add a new prettyPrintInlineScript task, which takes a taskId
so we can have one SourceMapGenerator for a given taskId, that we then pass
to prettyFast.
A test is added to ensure different cases of inline scripts are pretty printed
as expected, that resulting console messages location are updated and that the
event tooltip in the inspector shows the pretty file as well.
`findColumnBreakpoint` helper was fixed to look into the correct location for
original file (which pretty-printed file are)
`assertLineIsBreakable` is modified to show the text of the line so it's easier
to debug failures.
Differential Revision: https://phabricator.services.mozilla.com/D170751
I spotted this setTimeout call while reviewing another patch, and
thought that it might be the cause for some of our intermittents.
It looks like that for some years now, we have this handy
waitForTabClosing function, that we can use instead.
Differential Revision: https://phabricator.services.mozilla.com/D173024
We are currently showing stacks for Error-like objects but not for DOMExceptions.
console.log("foo", new Error("bar")) would print bar's stacktraces, while we wouldn't for: console.log("foo", new DOMException("bar")).
Should we merge DOMException and Error previewers?
DOMException is only having code and result attributes which Error objects don't have.
Differential Revision: https://phabricator.services.mozilla.com/D172707
This patch makes the SearchInput a connected component, This allows us cleanup
all the seperate actions and reducer logic and makes it easier to add new SearchInput
with modifers functionality.
Differential Revision: https://phabricator.services.mozilla.com/D171034
Highlights for this patch
- Support for the script overrides feature
- Overrides for html files are not supported
- Add styling to indicate overrides
- Add mochitests
Depends on D163600
Differential Revision: https://phabricator.services.mozilla.com/D163610
Now that this Map is only used internaly to sources reducer and selectors
and that we never return its raw reference, we can make it mutable.
Differential Revision: https://phabricator.services.mozilla.com/D172176
As these objects are immutable, we can store them in tabs reducer instead
of doing many lookup based on the IDs.
This should ultimately help make the sources Map become mutable.
Differential Revision: https://phabricator.services.mozilla.com/D172174
This should help speed up a few critical selectors by no longer running them
anytime any source is being added/removed. In addition to removing now useless lookups in this map.
breakpointsSources could be simplified as we never had to sort the visible breakpoints as
we end up sorting by source filename.
Differential Revision: https://phabricator.services.mozilla.com/D172151
This fixes two issues:
- the transferred size was missing from cached responseStarted events
- the fromCache flag needs to be read on the initial network event payload from devtools, because relying on the isFromCache logic used to build the addResponseStart payload does not properly detect all cached responses (eg for a cached 301)
Differential Revision: https://phabricator.services.mozilla.com/D171508
Make use of the new changes in the cssparser that allows 'none' keywords
in color components where allowed. We store the none values as 0.0 (as
per the spec) and mark the components with the flags. This way we don't
have to check anything on the components before doing calculations.
As this is the last part intended to be released for the new [color-4]
changes, I've also enabled the changes on nightly.
Differential Revision: https://phabricator.services.mozilla.com/D170208
In a setup with:
<hbox>
<something flex="1"/>
<something-else/>
</hbox>
Before bug 1822131 <something flex="1"> ended up with flex-basis: auto,
but was the only thing able to shrink, so <something-else> stayed the
same size.
After that bug however <something-else> is able to shrink too, so both
elements shrink. This wouldn't happen if flex="1" actually worked like
flex: 1 does.
However flex: 1 causes stuff like explicit main sizes to be
(effectively) ignored, so we need to fix up a few cases where now we'd
start flexing too much. For that, add a debug assert to
nsFlexContainerFrame to catch the would-be behavior changes here.
For the most part they're actually no-op since they're setting tiny
sizes, but preferences and devtools needed a couple real fixes.
The profile selection spacer is useless (zero-size).
Hopefully the last xul.css change I need to do :')
Differential Revision: https://phabricator.services.mozilla.com/D172704
Make use of the new changes in the cssparser that allows 'none' keywords
in color components where allowed. We store the none values as 0.0 (as
per the spec) and mark the components with the flags. This way we don't
have to check anything on the components before doing calculations.
As this is the last part intended to be released for the new [color-4]
changes, I've also enabled the changes on nightly.
Differential Revision: https://phabricator.services.mozilla.com/D170208
This new method can be used to check if the nsIOutputStream has been
closed without having data available to write. It should avoid blocking
to discover this information.
Differential Revision: https://phabricator.services.mozilla.com/D170696
Make use of the new changes in the cssparser that allows 'none' keywords
in color components where allowed. We store the none values as 0.0 (as
per the spec) and mark the components with the flags. This way we don't
have to check anything on the components before doing calculations.
As this is the last part intended to be released for the new [color-4]
changes, I've also enabled the changes on nightly.
Differential Revision: https://phabricator.services.mozilla.com/D170208
This may keep running async code whose source have been removed,
but this help remove various selectors lookups.
If we expect to check in async code if the source is still registered,
we should probably have an explicit API for this.
Differential Revision: https://phabricator.services.mozilla.com/D169331
Doing adds some complexity around SourceMapLoader as the location
genereated by this components doesn't known about debugger source objects.
To mitigate this I migrated all usages of SourceMapLoader.getGeneratedLocation/getOriginalLocation
to the source-maps utils module which will handle retrieving debugger objects.
Otherwise this patch will allow drastic simplification in the overall codebase
as we were mapping location's sourceId to source objects in lots of places.
This should also help followup on even more simplification in selectors.
Differential Revision: https://phabricator.services.mozilla.com/D168429
We were missing a few places around SourceMapLoader which creates location objects
without using debugger's createLocation helper. This doesn't help ensure all location are the same.
This will later be useful to assert that all location have source/sourceActor attributes.
Differential Revision: https://phabricator.services.mozilla.com/D170668
This will help then craft a location with `source` and `sourceActor` objects from selectSource.
I migrated the unique usage of this method passing a location to selectSpecificLocation
as selectSource is mostly meant to avoid having to think about/create a location object.
Differential Revision: https://phabricator.services.mozilla.com/D169330
This allows us to get accurate mappings for columns as well, which is
required for column breakpoints to work.
To mitigate the performance regression we'd get from adding many more mappings,
instead of using a SourceNode, then adding children to it, and at the end add
all the mapping in a SourceMapGenerator, we directly use the SourceMapGenerator
in the `write` function.
This means that we need to compute the pretty-printed code ourselves, but it's
easy to borrow the logic in `toStringWithSourceMap`.
We also only add mappings in the SourceMapGenerator for tokens (and not for
whitespaces), as it reduces the amount of elements we have to go through, while
still producing a valid source map in the end.
By doing that, we can also invert the mapping directly in `write`, so we don't
have to do it later in the worker code, and avoid having to re-sort the mappings
array.
A test is added to ensure column breakpoints work as expected after pretty-printing
Differential Revision: https://phabricator.services.mozilla.com/D168383
Also update the devtools CSS db (using ./mach devtools-css-db), and update a
DOM test `test_interfaces.js` to make it aware of newly-exposed (and
Nightly-specific for now) ContentVisibilityAutoStateChangeEvent.
Differential Revision: https://phabricator.services.mozilla.com/D171514
On the server side, this patch introduces:
* a new "tracer" Target Scope actor to start and stop tracing per target
* a new TRACING_STATE resource in order to report to the client when we start/stop tracing and with which log method.
On the frontend side, this patch introduces:
* a global tracer button, which will enable/disable tracing for all targets/threads
all at once.
* a global header, similar to pause, reporting if any target is tracing or not.
The header reuses the pause header and we may want to followup to better coordinate case
where we pause and trace at the same time. Only one of the two states is displayed.
We may want to followup here to be able to trace only one target and see the state per target.
Differential Revision: https://phabricator.services.mozilla.com/D163614