Commit Graph
29 Commits
Author SHA1 Message Date
Tim van der Lippe d7cfd14814 Fix no-implicit-coercion errors in front_end/
R=jacktfranklin@chromium.org

No-Presubmit: True
Bug: 1082789
Change-Id: Ic77884bf7e9b5dc74053915b3b10699368841b66
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2595268
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-01-07 12:40:16 +00:00
Christy Chen ae8efc5c4e [Loc] Migrate persistence to localization V2
Migrate persistence
Tested with en-XL: https://imgur.com/a/nreUeRP


Bug: 1136655
Change-Id: I8eaf5d830a411d75182b5a7f642ad5ca559c781a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2591893
Commit-Queue: Christy Chen <chrche@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2020-12-15 17:02:38 +00:00
Tim van der Lippe 2e38eeaf9f Remove all comments with only the unrestricted annotation
The unrestricted annotation is Closure-specific and can be removed.
This patch removes all comments with only the unrestricted annotation
in them.

R=szuend@chromium.org

No-Presubmit: True
Bug: 1011811
Change-Id: Iba0723644f53f5307c3077d341271af86becc32a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2569758
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
2020-12-02 15:25:32 +00:00
Yang Guo 6c88021d50 [ts] Typecheck IsolatedFileSystemManager.js
R=aerotwist@chromium.org

Bug: 1011811
Change-Id: I5928cf7884d10bb4e005c835e8e11f19e8a0cddb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2512237
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
2020-11-02 13:09:40 +00:00
Jan Scheffler 98cd900373 Migrate front_end/persistence to devtools_entrypoint
R=aerotwist@chromium.org, jacktfranklin@chromium.org

Bug: 1101738
Change-Id: I837f9e570bb1e2e0ab13892b6bec4510ffa4f2a3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2323628
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
Auto-Submit: Jan Scheffler <janscheffler@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-07-28 20:14:52 +00:00
Patrick Brosset e65aaac861 Enable the no-return-assign ESLint rule
This rule disallows assigning a value in a return statement.
It also works in one-liner arrow functions.

For instance, a => a = 2 will trigger a warning.
This is to avoid cases where you actually meant to compare a to 2, not
assign the value 2 (maybe you wanted to return a boolean in a filter
callback).
These sorts of issues can easily pass review and cause weird problems
that are hard to track down later.

The rule is enabled in this CL, and all warnings are fixed with this CL.

More info about the rule: https://eslint.org/docs/rules/no-return-assign

Bug: 1093379
Change-Id: I38b98ea59ecaedc83a7f69073b17980808f9a3bf
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2242761
Reviewed-by: Patrick Brosset <patrick.brosset@microsoft.com>
Reviewed-by: Jose Leal <joselea@microsoft.com>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Patrick Brosset <patrick.brosset@microsoft.com>
2020-06-22 08:34:42 +00:00
Paul Lewis 8a1e6c0652 [global] Remaps self.Persistence.IsolatedFileSystemManager
Moves self.Persistence.IsolatedFileSystemManager to an instance()
method.

Bug: 1058320
Change-Id: I99f9caea638aa12d2bf4ffe2f9b6a24824c11d65
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2107625
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-03-19 14:10:53 +00:00
Paul Lewis 2d7d65c5e8 [global] Remaps self.Common.settings
This CL changes references to self.Common.settings (the global
instance of SDK.Common.Settings) over to
Common.Settings.Settings.instance(). To keep both TypeScript and
Closure happy we must make a method on the Settings class itself,
since it only allows private constructors to be accessed by static
methods on the class.

Bug: 1058320
Change-Id: I04afc8caf64acf29cdda13ef03ad05cfff4786a1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2091450
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-03-16 22:04:07 +00:00
Peter Marshall c899036d79 [workspaces] Don't show a console error when file select is cancelled
The backend will pass through a different value for when the selection
was cancelled, instead of a failed selection.

We used to pop out the console for this, which was confusing. Now we do
nothing in the UI when the selection is cancelled.

Chrome side change:
https://chromium-review.googlesource.com/c/chromium/src/+/2089837/

Bug: chromium:787728
Change-Id: I30f282530461ad168d5291d1eb88fdc02f2ac9cf
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2089898
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
2020-03-06 10:01:33 +00:00
Paul Lewis a83ea61dac [global] Remaps self.Common.console
This CL changes references to self.Common.console (the global instance
of Common.Console) over to Common.Console.Console.instance(). To keep
both TypeScript and Closure happy we must make a method on the Console
class itself, since it only allows private constructors to be accessed
by static methods on the class.

Bug: 1058320
Change-Id: Icd4ac8aea76383588a5664a96643179d91812698
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2087757
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-03-04 13:20:05 +00:00
Tim van der Lippe 37a35fff86 Reland "Typecheck Object.js"
This reverts commit f996a1c537.

Reason for revert: Fixed incorrect refactoring in this CL.

Original change's description:
> Revert "Typecheck Object.js"
>
> This reverts commit 258665aca5.
>
> Reason for revert: Suspected of breaking the roll (https://crrev.com/c/2083712)
> Bot failure: https://ci.chromium.org/p/chromium/builders/try/linux-rel/322462?
>
> Original change's description:
> > Typecheck Object.js
> >
> > To typecheck the file Object.js with Typescript I had to fix the type errors from all other classes
> > that were using addEventListener or removeEventListener incinsistently.
> >
> >
> >
> > Bug: 1011811
> > Change-Id: I2fccbbd07ef3d9a581baa34233580bc6a9dbbfc3
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2079794
> > Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
> > Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
> > Commit-Queue: Jose Leal <joselea@microsoft.com>
>
> TBR=szuend@chromium.org,joselea@microsoft.com,tvanderlippe@chromium.org,jacktfranklin@chromium.org
>
> Change-Id: I30e3d75eee463362107d6e6ad25df2b7d50f9d54
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 1011811
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2081824
> Reviewed-by: Simon Zünd <szuend@chromium.org>
> Commit-Queue: Simon Zünd <szuend@chromium.org>

Bug: 1011811
Change-Id: I19ebbe0345a5c7380ed69d1ba2921adf0385228e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2084580
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-03-03 14:09:44 +00:00
Simon Zünd f996a1c537 Revert "Typecheck Object.js"
This reverts commit 258665aca5.

Reason for revert: Suspected of breaking the roll (https://crrev.com/c/2083712)
Bot failure: https://ci.chromium.org/p/chromium/builders/try/linux-rel/322462?

Original change's description:
> Typecheck Object.js
> 
> To typecheck the file Object.js with Typescript I had to fix the type errors from all other classes
> that were using addEventListener or removeEventListener incinsistently.
> 
> 
> 
> Bug: 1011811
> Change-Id: I2fccbbd07ef3d9a581baa34233580bc6a9dbbfc3
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2079794
> Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
> Commit-Queue: Jose Leal <joselea@microsoft.com>

TBR=szuend@chromium.org,joselea@microsoft.com,tvanderlippe@chromium.org,jacktfranklin@chromium.org

Change-Id: I30e3d75eee463362107d6e6ad25df2b7d50f9d54
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1011811
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2081824
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2020-03-03 05:59:28 +00:00
Jose Leal Chapa 258665aca5 Typecheck Object.js
To typecheck the file Object.js with Typescript I had to fix the type errors from all other classes
that were using addEventListener or removeEventListener incinsistently.



Bug: 1011811
Change-Id: I2fccbbd07ef3d9a581baa34233580bc6a9dbbfc3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2079794
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Jose Leal <joselea@microsoft.com>
2020-03-02 18:15:06 +00:00
Jack Franklin 22b26bddbd Typecheck EventTarget.js
Bug: 1011811
Change-Id: Icb024e170829bed95f433bf6b02d632ccfc5f06e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2078856
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Jose Leal <joselea@microsoft.com>
2020-02-28 11:41:29 +00:00
Tim van der Lippe 8ef250cfe1 Remove typedefs from {perf_ui,persistence,protocol}-legacy.js
Bug: 1006759
Change-Id: I577e754f3e49f20d44d2028a4872fac0dce05782
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2060290
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-02-20 17:09:06 +00:00
Tim van der Lippe c02a97ca2c Fix imports for Common.Event typedef
All references now use the fully qualified
"Common.EventTarget.EventTargetEvent". It renames it to
"EventTargetEvent" to prevent a name-clash with the native "Event" type.

Bug: 1006759
Change-Id: I13fcdfd613041da146d741a0d1f785bfc905a7a8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2056481
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-02-14 15:21:06 +00:00
Simon Zünd a0d40624e1 [utilities] Replace {valuesArray} with {values} and/or spread operator
For {Set}s we omit the call to Set#values, since spreading a set
{foo} "[...foo]" is equivalent to "[...foo.values()]".

Drive-by: Remove the now unused Map#valuesArray and Set#valuesArray.

Bug: chromium:1050549
Change-Id: Ic9b51f957d895265a79a7fa3471ecb6cb734a1f0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2050770
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-02-12 16:45:22 +00:00
Tim van der Lippe f18c6a245e Migrate persistence/ to import cross-module
Bug: 1006759
Change-Id: I3ce19d116a250b975b809fdb59f4be1674ac2892
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2019545
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-01-24 15:09:25 +00:00
Paul Lewis 6bcdb18044 [Global] Update refs to Common.settings
Bug: 1006759
Change-Id: Ie1943b50ba8ba23fae4f52f958ae6f8c7b6a7d3f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2016744
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-01-23 11:29:11 +00:00
Paul Lewis 04ccecc2d7 [Global] Updates references to Common.console
Bug: 1006759
Change-Id: I5c854000a3de456a7cca34ca270c07dc0d53e0e7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2014924
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-01-22 17:59:05 +00:00
Paul Lewis 6196e75c80 Migrates persistence/ to ESM internally
Bug: 1006759
Change-Id: I3f6351fe6b9f97ca88b528369168bba2fe00f76b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1994978
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-01-13 15:48:34 +00:00
Tim van der Lippe c96ccd99f0 Remove unused globals
By using the script in crrev.com/c/devtools/devtools-frontend/+/1942289
we can prune all globals that are not actually global. Most of these are
internal private variables that are now module-scoped. Some variables
were also completely unused, which ESLint nicely reported.

Change-Id: I43689ac7544ad1239acc7d0eeec4dcd563d7fea9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1942290
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2019-11-29 16:38:40 +00:00
Tim van der Lippe daf16278b1 Migrate persistence/ to ESM
- Rename Persistence.js to PersistenceImpl to avoid a name clash with
the namespace

Bug: 1006759
Change-Id: I330bd680c8a92984c4a75a0614efa78b4f1e1ea2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1845715
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#704200}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c68c13c0d5c1a780340192be5d722dc7715b4bbc
2019-10-09 15:43:43 +00:00
Tim van der Lippe e3595942b0 Migrate platform/ to ESM
- Change Multimap to Platform.Multimap
- Importscripts in workers. This means that the file does not export any
utilities, but we will need to clean that up later.

Bug: 1006759
Change-Id: I91d45febebfc597f0d0b5c6a017c26f6b12b84b4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1832218
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#702111}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d704d799ac695e03ef367102c2a870e4a5f239e9
2019-10-02 18:15:32 +00:00
Tim van der Lippe 50cfa9b19d Migrate host/ to ESM
Bug: 1006759
Change-Id: Ib72e0acbb20c4579e708cd79a67ffd0bc2073b70
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1829102
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#701509}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b2641f7a9893b50ab7f74d8bc5b7ca7743b0a530
2019-10-01 10:40:58 +00:00
Tim van der Lippe 1d6e57a0e3 Always add braces to single-line if-statements
The Chromium/Google style guides does not enforce curly braces for
single-line if-statements, but does strongly recommend doing so. Adding
braces will improve code readability, by visually separating code
blocks. This will also prevent issues where accidental additions are
pushed to the "else"-clause instead of in the if-block.

This CL also updates the presubmit `eslint` to run the fix with the
correct configuration. It will now fix all issues it can fix.

Change-Id: I4b616f21a99393f168dec743c0bcbdc7f5db04a9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1821526
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jeff Fisher <jeffish@microsoft.com>
Cr-Original-Commit-Position: refs/heads/master@{#701070}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7e0bdbe2d7f9fc2386bfaefda3cc29c66ccc18f9
2019-09-30 11:55:34 +00:00
Tim van der Lippe 7b190160cd Move InspectorFrontendHostAPI to externs
This was an interface that was already treated as an extern, but was not
explicitly in the externs.js file.

Bug: 1006759
Change-Id: I95301c059cc1213931498788cff553f955abb646
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1829098
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#700724}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c6c1bf57acb1c9ed7304674e7d5df51122cb22b1
2019-09-27 15:10:44 +00:00
Alexey Kozyatinskiy 3a2eb28446 [DevTools] replace snippets mapping with snippet FileSystem
New snippets use file system instead of own mappings.

R=lushnikov@chromium.org

Bug: none
Change-Id: I7c8e9c1f88f3a555ba98ba613658dbde39c3f0a0
Reviewed-on: https://chromium-review.googlesource.com/1173751
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Andrey Lushnikov <lushnikov@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#584771}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 54feed0d242111c0fd08db4315bffccdcfdad749
2018-08-21 16:22:02 +00:00
Blink Reformat 4c46d0969f The Great Blink mv for source files, part 2.
Move and rename files.

NOAUTOREVERT=true
NOPRESUBMIT=true
NOTREECHECKS=true
Bug: 768828
TBR=darin@chromium.org
NOTRY=true

Change-Id: I66d3b155808bc5bdbf237b80208e1e552bcf7f28
Reviewed-on: https://chromium-review.googlesource.com/1001153
Reviewed-by: Blink Reformat <blink-reformat@chromium.org>
Commit-Queue: Blink Reformat <blink-reformat@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#549061}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 0aee4434a4dba42a42abaea9bfbc0cd196a63bc1
2018-04-07 15:32:37 +00:00