Kateryna Prokopenko
79f7e6c996
Remove casts to UrlString from SourceMapManager & StaticContentProvider
...
Bug: 1299773
Change-Id: I377daea5d94e73326e77e56bbd8b94bad2c86b58
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3468517
Reviewed-by: Simon Zünd <szuend@chromium.org >
Reviewed-by: Eric Leese <leese@chromium.org >
Commit-Queue: Kateryna Prokopenko <kprokopenko@chromium.org >
2022-02-22 16:35:37 +00:00
Tim van der Lippe
2d9a95ce7b
Suppress all existing promise races
...
To suppress the races, we mark these invocations with `void` per
the instructions of `no-floating-promises`. This explicitly marks
these statements as side-effect promises.
Engineers can later analyze these void statements and determine
whether the promise races are intentional or accidental.
R=jacktfranklin@chromium.org
Bug: 1239617
Change-Id: I6b7a24cf21029d6ff73b112b3e8255ebab8c60ec
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3366467
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org >
Auto-Submit: Tim Van der Lippe <tvanderlippe@chromium.org >
2022-01-04 16:08:08 +00:00
Benedikt Meurer
a992c9dfc6
Remove position adjustment for inline scripts with #sourceURL.
...
Following up on https://crrev.com/c/3069289 the back-end reports
positions (raw locations) for inline scripts with `//# sourceURL`
annotations relative to the start of the <script> tag content, rather
than relative to the surrounding document.
The DevTools front-end however was still trying to make up for the
wrong positions reported by the back-end, leading to negative line
numbers being reported and sometimes jumping to the wrong line when
using inline scripts with `//# sourceURL` annotations.
This change removes the hacks from the front-end and simply uses the
positions from the back-end, which are now correct.
Fixed: chromium:1270227
Bug: chromium:578269, chromium:1183990
Change-Id: I65a59f64f42230179f56218518e727116329ad5d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3291151
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org >
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org >
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org >
2021-11-22 07:01:30 +00:00
Tim van der Lippe
c1ab112d90
Port the sources panels to CM6
...
R=tvanderlippe@chromium.org
Bug: 1241848
Change-Id: Idfe1658c9c2948b5c79c2845b9fd9472746a62b9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3247435
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
2021-11-12 16:47:28 +00:00
Kateryna Prokopenko
799d1e2b59
Use type-safe events for WorkSpaceImpl
...
Bug: 1228674
Change-Id: Ib3a67154c3933df4f840a20a77f20d7f42bc046f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3090971
Commit-Queue: Kateryna Prokopenko <kprokopenko@google.com >
Reviewed-by: Sigurd Schneider <sigurds@chromium.org >
Reviewed-by: Simon Zünd <szuend@chromium.org >
2021-08-13 06:59:25 +00:00
Jan Scheffler
ad7a2ddd4c
[Underscore Migration] Migrate models/formatter
...
This patch is part of the underscore migration that adds the private
keyword to all properties that start with an underscore and removes the
underscore.
Bug:chromium:1207342
Change-Id: I386ec317f4a944135feba6d40b0d9849c7d4ccdc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3077893
Commit-Queue: Jan Scheffler <janscheffler@chromium.org >
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Auto-Submit: Jan Scheffler <janscheffler@chromium.org >
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
2021-08-06 16:04:06 +00:00
Tim van der Lippe
e19929dc74
Add tests for SourceFormatter
...
This requires us using the environment, as the SourceFormatter relies
on numerous singletons related to workspaces, projects and documents.
This CL gets us to about 50% code coverage. The missing coverage is
mostly in the two mapping classes at the end of the file, which are
more difficult to test. We will do that in a follow-up CL.
R=szuend@chromium.org
Bug: 1009443
Change-Id: I8412b5f6e8053d72cea5110a3b82458388fb9e95
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3056378
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Simon Zünd <szuend@chromium.org >
2021-07-29 10:49:19 +00:00
Tim van der Lippe
fb38e368e9
Add tests for ScriptFormatter
...
With these tests, we achieve 100% test coverage (barring the 2
missing branches from the initialization of the setting, which
we can't test in a unit test environment).
I also renamed the fields in the object that is returned, as they
make sense and almost all usages were renaming them anyways.
R=szuend@chromium.org
Bug: 1009443
Change-Id: I3ac6cdf3cca99baf312d0d4e4036e7f95e9ef06d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3056375
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Simon Zünd <szuend@chromium.org >
2021-07-27 16:33:09 +00:00
Tim van der Lippe
6df5ce7fbd
Return promise instead of using callbacks
...
This should improve the testability of these functions. Hopefully,
a follow-up CL can introduce some tests for this API.
R=szuend@chromium.org
Bug: none
Change-Id: If0d1884e5abed05520cbc9cfe42c99052550d9ba
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3055240
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Simon Zünd <szuend@chromium.org >
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Simon Zünd <szuend@chromium.org >
2021-07-27 11:29:59 +00:00
Tim van der Lippe
3c3cd80fc6
Remove FormatterInterface
...
This class was a remnant of the code structure during the Closure
Compiler era. In ES modules, we no longer need a special class
and instead can explicitly export the relevant functions and
remove the interim class.
R=szuend@chromium.org
Bug: none
Change-Id: Ib6a2bcaef9a1dad462f02a3411b9bef1ee989a34
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3053747
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Simon Zünd <szuend@chromium.org >
2021-07-27 09:53:09 +00:00
Tim van der Lippe
c2cbf32af8
Remove no-unused-vars suppressions
...
We don't use this rule any longer. Therefore, any supression of
the rule is considered a no-op. (We use the typescript-eslint
version instead).
R=jacktfranklin@chromium.org
Bug: none
Change-Id: I13595fffc980db423ee8ad5d133fd187d0dbdbbb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3053746
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Paul Lewis <aerotwist@chromium.org >
Reviewed-by: Paul Lewis <aerotwist@chromium.org >
2021-07-27 09:48:39 +00:00
Jack Franklin
a75ae7cbb3
Enforce import type when importing TS types.
...
Bug: none
Change-Id: I02ef1182143b7fe091ce92d59f04ac2188903e0d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2886925
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org >
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org >
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Mathias Bynens <mathias@chromium.org >
2021-05-11 14:00:22 +00:00
Tim van der Lippe
a9ae810860
Move formatter to models/formatter
...
R=aerotwist@chromium.org
Bug: 1187573
Change-Id: Idc2b0f88665e276f692515afe667517a4e5ed245
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2831975
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Paul Lewis <aerotwist@chromium.org >
2021-04-19 14:18:33 +00:00