Commit Graph
14 Commits
Author SHA1 Message Date
Mathias Bynens a0d60451e1 Remove custom setImmediate implementation
All of the existing callsites passed only a callback parameter, with
no additional `args` parameters, and so this functionality is
equivalent to the built-in queueMicrotask().

Note that there are some upstream tests that currently still use
setImmediate. These tests are ported in [1], which should be merged
before this patch can land.

[1]: https://chromium-review.googlesource.com/c/chromium/src/+/2563476

Bug: chromium:1050549
Change-Id: Iee3d286d38bcb17d9b78ca89f9897e8ca37b6d94
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2554560
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2020-11-30 14:20:29 +00:00
Yang Guo 4aabb1d829 [ts] type-check PlatformFleSystem.js
R=petermarshall@chromium.org

Bug: 1011811
Change-Id: I9677dbbb07555e30801ef8b78fe779588c4623da
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2470617
Auto-Submit: Yang Guo <yangguo@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2020-10-14 08:02:00 +00:00
Sigurd Schneider 7b92165625 Convert TextUtils.ContentProvider.DeferredContent to tagged union
This actually discovered a bug in the implementation of
JavaScriptBreakpointsSidebarPane where the error condition
wasn't checked.

Bug: chromium:1011811, chromium:1079233
Change-Id: Ic2f3c990a587aa7077edd26a2445789355ebe0a4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2194877
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
2020-05-19 13:16:36 +00:00
Tim van der Lippe e812fa900d Add missing return types for front_end files
These are required for the TypeScript 3.9.2 upgrade.

R=jacktfranklin@chromium.org

Bug: 1011811
Change-Id: I85f8f2bbfa1366743a365cdcade04adcb94e5c60
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2199123
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-05-13 14:26:01 +00:00
Tim van der Lippe ee97fa3e34 Add ts_library definitions and ts-nocheck for Karma tests
In https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2102717
we are updating the Karma configuration to use the Ninja output for
all unittests. This CL includes all existing unittests in relevant
ts_library definitions and adds the corresponding (previously missed)
dependencies as ts_library as well.

Since most of these dependencies are actually not compiling with
the TypeScript compiler (the original intent of the CL linked above),
we are adding the @ts-nocheck annotation for now. Of course, we should
remove these annotations as soon as possible, but that is a bit more
work, as the tests involved are primarily UI driven.

R=jacktfranklin@chromium.org

# Windows presubmit breaks with large CLs
No-Presubmit: true
Bug: 1061125
Change-Id: Ic67dbbc805642eaa618340a67ea0975eaacffc24
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2162850
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-04-23 16:33:00 +00:00
Tim van der Lippe 18f0489a60 Reland: Move ContentProvider.js and StaticContentProvider.js to text_utils.
They used to live under common.

This is to avoid the dependency from common to text_utils caused by
the method performSearchInContent.

Layout tests were disabled:
https://chromium-review.googlesource.com/c/chromium/src/+/2096995

CL to fix and re enable tests
https://chromium-review.googlesource.com/c/chromium/src/+/2096018/


Bug: 1011811
Change-Id: I76415076366d748ed0b4fe6ff32c73bae0db1312
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2097337
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-03-17 12:12:17 +00:00
Simon Zünd b4c9ea79e7 Revert "Move ContentProvider.js and StaticContentProvider.js to text_utils."
This reverts commit ba56abb36c.

Reason for revert: Breaks two layout tests:
https://ci.chromium.org/p/devtools-frontend/builders/ci/DevTools%20Linux/739

The Try bot also caught this for this CL but was green for some reason.

Original change's description:
> Move ContentProvider.js and StaticContentProvider.js to text_utils.
> They used to live under common.
> 
> This is to avoid the dependency from common to text_utils caused by the method performSearchInContent
> 
> Bug: 1011811
> Change-Id: Ic6ccb32d8c18abda7b259ca14bafca4c7c2003ab
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2090785
> Commit-Queue: Jose Leal <joselea@microsoft.com>
> Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>

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

Change-Id: Ie8c99b77123e916d9f0cde73339f9cac22fff3ef
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1011811
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2095308
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2020-03-10 06:29:38 +00:00
Jose Leal Chapa ba56abb36c Move ContentProvider.js and StaticContentProvider.js to text_utils.
They used to live under common.

This is to avoid the dependency from common to text_utils caused by the method performSearchInContent

Bug: 1011811
Change-Id: Ic6ccb32d8c18abda7b259ca14bafca4c7c2003ab
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2090785
Commit-Queue: Jose Leal <joselea@microsoft.com>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-03-10 00:33:29 +00:00
Tim van der Lippe 00d4ce380f Fix usages for Common.DeferredContent typedef
This typedef could not live in `common.js`, as it was referenced in
files in common/ itself.

Bug: 1006759
Change-Id: If058bde3ab0d0ad2b2474ae522391c4f61cdfc71
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2056482
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-02-14 15:21:06 +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 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
Rob Paveza 2eb8c14505 DevTools: Display error when source file can't load
The source editor, when it cannot load a particular file, will simply
display a blank file instead. At the bottom, this is because the APIs
used to load the files do not have a way to propagate an error up to
the call site. Rather, the callback either is never called, or is
called with just an empty string.

This refactor changes the way the project system loads file contents
by replacing the callback model with a Promise-based model. However,
in this version, rather than propagating an error (handled via
catch), the error is exposed as a property on the object passed via
the the load functions. Although it might be preferable to use
async throw/catch, because there are ~4-5 layers of redirection
through the project system, the added complexity seems to not really
justify that work. I'm open to reconsidering this design, though.

Attempting to load a file via file:// which does not exist previously
produced no error because the DevToolsUIBindings handler would just
always resolve with no content and HTTP status 200. I had previously
addressed that bug in this changeset, but I've split it out to
https://chromium-review.googlesource.com/c/chromium/src/+/1847833 .

Sample "after" screenshot: https://imgur.com/a/tlm90sg

Bug: 961940
Bug: 941035

Change-Id: If121611090e9c35eeb1de162b59f8a9f72f696d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1817677
Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
Reviewed-by: Jeff Fisher <jeffish@microsoft.com>
Commit-Queue: Lorne Mitchell <lomitch@microsoft.com>
Cr-Original-Commit-Position: refs/heads/master@{#705438}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 61ec2a233d9a7bf4bb4b3e610de6fc233ae0d46e
2019-10-13 18:02:38 +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
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