This CL removes a race that may happen if PersistenceImpl tries to
move a breakpoint from one UISourceCode to another UISourceCode by
explicitly awaiting the calls to remove/setBreakpoint in
PersistenceImpl.
The race happens in the following case (affecting snippets):
* A snippet is created, and the user sets a breakpoint and reloads
the page.
* PersistenceImpl.ts will try to move the breakpoint via
1. removing the breakpoint from the old UISourceCode, and
2. re-setting the breakpoint on the new UISourceCode.
* Simultaneously, the BreakpointManager tries to set a breakpoint
on the new UISourceCode
* For snippets, the url stays the same after reloading, and in some
cases the `setBreakpointByURL` of the PersistenceImpl and the
BreakpointManager will be sent to v8 one after another, such that
v8 returns a ServerError, as it has already set the breakpoint
previously
This race causes the breakpoint to completely disappear, since
DevTools front-end removes the breakpoint if it sees a ServerError.
Drive-by: Added additional clean up step to tests.
Bug: 1280621
Change-Id: I7c9cd94c02d80661100cc5c5141e7d0dbb027f6d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3629862
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
Add a toggle that enables / disables large blob support for WebAuthn
virtual authenticators. This feature has been long supported by the
devtools protocol but we hadn't surfaced it on the front-end.
Large blobs are only available for resident-key enabled authenticators,
so we disable the checkbox if that option is not selected. Also, large
blobs require CTAP 2.1.
Fixed: 1321803
Change-Id: Ic1654276ba5a39ddd8943cd8689978117546e70e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3625237
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Nina Satragno <nsatragno@chromium.org>
Auto-Submit: Nina Satragno <nsatragno@chromium.org>
This fixes the character encoding of the UrlString returned by
`urlsFromParentUrlAndName()`, which is called by `WorkspaceImpl`'s
`renameUISourceCode()`, to match the encoding of filenames as they are
received via `fileSystemFilesChangedAddedRemoved()` from the backend.
Without a matching encoding, the UISourceCode will not be found when
looking it up by URL, which in turn leads to the creation of an
additional duplicate UISourceCode.
Fixed: 1320717
Change-Id: I39a6bda366da3ee681a77f28bb1ad3bcccc86fa5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3613869
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Eric Leese <leese@chromium.org>
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
Instead of trying to set inspectedURL for child targets (which might
confuse extension server), we just lookup the containing frame's url
locally in the source map manager whenever we need it for resolving
relative paths.
This might flush race problems (because inspectedURL is set
asynchronously after receiving getResourceTree response), but such
problems were there before. They are not easy to fix without
redesigning how we index source maps in source map manager's
internal data structures (and they are even harder to repro
and test).
Bug: chromium:1305475
Change-Id: I9e9b67ca1353b4707542f3931db0aef821c00f41
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3613885
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Use fallback cases when showing the script location in
`buildDetailsTextForTraceEvent`.
Currently, we use the UILocation if existent (which is only
the case, if we have already parsed the `scriptId` of the Timeline
Event. If this has not been the case, it fell back to using
either the top frame, or nothing).
This CL changes this code to always use the fallback, instead
of trying to resolve the location:
1. This is both flaky on the tests (if crbug.com/1318635 is fixed
with https://crrev.com/c/3613395), and can be observed by the
developer as it is time dependent.
2. As is, there has been a backend bug (crbug.com/1318635) which
never sent the correct `scriptId` (int instead of string) for
stack traces anyway, so we used the fallback for that case, and
that is reflected on many layout tests as well.
3. Normally we try to use the live location using the script, but this
particular code produces not a link but a text, and is only used
for WebSocketDestroy events and the layout test infrastructure.
4. Setting it to default to the information we have, is deterministic.
Bug: 1318635
Change-Id: I5078d18d92d8b60d8c8d4253efe07f7527bb3c19
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3613875
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
At long last, we can remove the old unused fields now that no
deprecation messages are untranslated.
This CL is part of a series:
(1) Remove legacy info
(2) Translate issue title
(3) Translate demo Issue {CHROMIUM}
(4) Translate demo Issue {DEVTOOLS}
(5) Document new deprecation process
(6) Add milestone and status links
(7) Document milestone and status links
(8) Migrate DeprecationInfo::WithDetails {CHROMIUM}
(9) Roll deps
(10) Migrate DeprecationInfo::WithDetails {DEVTOOLS}
(11) Document changes in development process
(12) Migrate DeprecationInfo::* {CHROMIUM}
(13) Roll deps
(14) Migrate DeprecationInfo::* {DEVTOOLS}
(15) Cleanup Deprecations {CHROMIUM}
(16) Cleanup Deprecations {DEVTOOLS}
(17) Final documentation tweaks
DISABLE_THIRD_PARTY_CHECK=Fields are being removed, so we have to touch non-gen code
Bug: 1264960
Change-Id: If5a286a50cafc073ff99f5e0d8f3d38d5e8ba83a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3613607
Auto-Submit: Ari Chivukula <arichiv@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Commit-Queue: Ari Chivukula <arichiv@chromium.org>
When DevTools is intercepting and overriding the response to a request,
this response should have a response status of 200 (and not the response
status of the original response).
If body, headers and a redirect response code are sent to the backend
via `Fetch.fulfillRequest`, the response code will take precedence and
the response will be redirected instead of overridden.
Fixed: 1320400
Change-Id: Ib306369c67471f871425d2a1bbafe80cbb881d1f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3610172
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
This CL changes the heurestics for how we filter treeoutlines with the
following changes:
1. if a tree nodes ends up with no children after filtering, we ignore
the filter and show the hidden leaf nodes.
2. if a tree node is already expanded, it cannot afterwards be flattened
away.
Bug: 1311583
Change-Id: Ia4bcb6aa83948f0f6409a015ab2f0ec76f3431ce
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3607829
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Johan Bay <jobay@chromium.org>
This CL ports the new issues into the translated deprecation flow! We
finally have non-example translations ready to go :-)
For the source of the strings see:
https://chromium-review.googlesource.com/c/chromium/src/+/3597476
This CL is part of a series:
(1) Remove legacy info
(2) Translate issue title
(3) Translate demo Issue {CHROMIUM}
(4) Translate demo Issue {DEVTOOLS}
(5) Document new deprecation process
(6) Add milestone and status links
(7) Document milestone and status links
(8) Migrate DeprecationInfo::WithDetails {CHROMIUM}
(9) Roll deps
(10) Migrate DeprecationInfo::WithDetails {DEVTOOLS}
(11) Document changes in development process
(12) Translate more Issues ...
DISABLE_THIRD_PARTY_CHECK=This will be removed when not stacked
Bug: 1264960
Change-Id: Id5853ac2e48d3300fac4b4224abf76f7d33c7117
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3600576
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Ari Chivukula <arichiv@chromium.org>
Auto-Submit: Ari Chivukula <arichiv@chromium.org>
./scripts/deps/roll_deps.py ~/chromium/src ~/devtools/devtools-frontend
npm run generate-protocol-resources
I also fixed compile issues due to the removal of constants from
AttributionReportingIssue which is why non-gen files were touched.
This CL is part of a series:
(1) Remove legacy info
(2) Translate issue title
(3) Translate demo Issue {CHROMIUM}
(4) Translate demo Issue {DEVTOOLS}
(5) Document new deprecation process
(6) Add milestone and status links
(7) Document milestone and status links
(8) Migrate DeprecationInfo::WithDetails {CHROMIUM}
(9) Roll deps
(10) Migrate DeprecationInfo::WithDetails {DEVTOOLS}
(11) Document changes in development process
(12) Translate more Issues ...
DISABLE_THIRD_PARTY_CHECK=Fixes to AttributionReportingIssue
Bug: 1264960
Change-Id: I9b73f60d2cd56bced19e908a761b3d90ad940c46
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3600575
Auto-Submit: Ari Chivukula <arichiv@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
This CL fixes local overrides for URLs which contain special characters.
When a resource is saved for overrides, a local path and filename are
generated from the resource's URL. Because not all characters are
allowed to be used in filenames, these characters need to be escaped
(via URL-encoding). The most common cases are '?', which is used for URL
query params and ':', which is used for the port number. Both '?' and
':' are not allowed within file names on Windows OSes.
Previously, DevTools was hiding this complexity of encoded file names
from the user by decoding the file names for user-facing strings. This
could lead to unexpected behaviour, e.g. when renaming files for which
the actual filename does not match the user-facing filename. With this
CL the actual (encoded) filename is shown to the user.
Bug: 1308257
Change-Id: I0303af33502e4e5768e0ccdb44d495b6a2b62190
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3579160
Reviewed-by: Kateryna Prokopenko <kprokopenko@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
This is a reland of commit 1b596f3b4b.
Changes:
1. Gated behind an experiment
2. Removed changes that are currently not used since it's gated
(i.e. test changes)
Original change's description:
> Enable synchronization on instrumentation breakpoints
>
> This CL introduces the synchronization point for setting
> breakpoints on new scripts using instrumentation breakpoints.
>
> Instrumentation breakpoints will trigger at the first statement
> of a newly run script. Afterwards we wait for all resources
> that we need to set a breakpoint (if one is cached for that
> particular script), set it, and resume.
>
> Note: this will not correctly synchronize the case where we
> just opened DevTools or just created a new target, as at this
> point some scripts might have started running. For this, we
> need to synchronize the Debugger.enable call, which is something
> that is left to take care of.
>
> Bug: chromium:1229541, chromium:1133307, chromium:1300509
> Change-Id: I44e9b053a7cf64cc1f477a68ce9389cd92a1d05d
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3470237
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
Bug: chromium:1229541, chromium:1133307, chromium:1300509
Change-Id: I19553ddac9530fa3ccac6b245a3dd89da88c6d51
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3542248
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
This change re-implements some removed code from this CL: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3395675
Issue:
- Formatting code was removed to remove dependencies on CodeMirror5
- Caused regression in formatting regarding workspace syncing (pictures in linked issue)
Changes:
- Add new cssStreamParser method onto CodeMirror6 which retrieves a legacy CSS stream parser
- Re-add CodeMirrorUtils.ts to provide createCssTokenizer function
- Re-add code deleted from regressing CL for CSSProperty.ts
We initially removed the dependency on CodeMirror5 here to improve launch times. This change should not regress that as CodeMirror6 should already be imported before any code here can execute. Additionally, the extra import of the CSSStreamParser should be minor enough to ignore.
Change-Id: I642da3de1c1788d5258b12d069534179efa2fd65
Bug: 1309588
Change-Id: I642da3de1c1788d5258b12d069534179efa2fd65
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3551896
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Michael Liao <michael.liao@microsoft.com>
In some situations, webpack generates two sources: one is the actual
input file, the latter is some intermediate code. However, both could
have the same URL (the ./ is stripped off).
This fix makes Chrome DevTools match the behavior in other browsers.
Signed-off-by: Victor Porof <victorporof@chromium.org>
Bug: 1304217
Change-Id: I42dffbc2cedffc4fba1fd3efc0a2df093389cdea
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3575933
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Some labels of the checkboxes in the console settings didn't have titles
that explained the setting with a tooltip. This CL adds them for those
that were lacking.
Took the opportunity to introduce a helper function to extract and
remove redundant code.
Fixed: 1246785
Change-Id: Ic64234f580d137e739d80988a924533991fbe1b1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3568993
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Andres Olivares <andoli@chromium.org>
The migrated e2e test was not really checking a user story but a
specific behavior of the IssuesView: Does the view record an UMA
event when an issue is expanded. We can test this behavior less
flakily with a unit test.
Drive-by: Share metrics assertion helper.
R=dsv@chromium.org
Bug: None
Change-Id: I576847113592cc33b83d651d06cf5baac8f01db1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3565362
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
This CL adds support for translated issues in devtools_frontend.
The next step is to document (5) and start translating issues (6).
This CL is part of a series:
(1) Remove legacy info
(2) Translate issue title
(3) Translate demo Issue {CHROMIUM}
(4) Translate demo Issue {DEVTOOLS}
(5) Document new deprecation process
(6) Translate more Issues ...
Bug: 1264960
Change-Id: I5813a3b6ff5649dc78144a0f92f20480fa069634
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3561186
Commit-Queue: Ari Chivukula <arichiv@chromium.org>
Auto-Submit: Ari Chivukula <arichiv@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
When passing a URL as href to `ParsedURL.completeURL()`, we'd take it
apart to normalize the path and strip off user and password parts. But
in those cases where the URL contained the optional user part, we didn't
do the math correctly for reconstructing the query and fragment part,
and instead ended up duplicating the tail of the original href. This CL
addresses the issues and guarantees that we always reconstruct a valid
URL.
Note: The stripping of the optional user part is consistent with Firefox
DevTools. So 'webpack://@scope/...' turns into 'webpack://scope/...' in
both DevTools consistently.
Fixed: chromium:1309854
Bug: chromium:1284737
Change-Id: I45224265e7d6cc83f836fafc516e71434e9ba402
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3560422
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Brandon Walderman <brwalder@microsoft.com>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>