Commit Graph
29 Commits
Author SHA1 Message Date
Philip Pfaffe ed0f3d9b9b TypeScriptify ResourceScriptMapping
Bug: chromium:1011811
Change-Id: Ia84471f96da8b203f09c12b524d64e054dcdc46c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2479129
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
2020-10-16 15:29:42 +00:00
Jack Franklin 2c1e944aad Migrate front_end/bindings to devtools_entrypoint
Bug: 1101738
Change-Id: I0d43818334425984a160fa9b79076f7413a6a52b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2306155
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2020-07-20 10:47:17 +00:00
Benedikt Meurer b358e5fae9 [wasm] Handle disassembly on the editor level
Simplify the handling of non-breakable lines in general, and make
both the line mapping as well as the non-breakable lines iteration
unittestable.

Drive-by-fix: Implement binary search for more efficient
Wasm bytecode reverse mapping.

Fixed: chromium:1056632
Bug: chromium:1071432, chromium:1043047
Change-Id: Ibb2c029a7011206f0676d630c0c94a33fc83d3d8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2220098
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
2020-06-02 13:17:10 +00:00
Benedikt Meurer d4131e6fbd Enable proper syntax highlighting for WebAssembly text format.
Previously we just used JavaScript syntax highlighting for WebAssembly
text format, which is obviously not ideal.

Bug: chromium:1042721
Change-Id: I57e98f0ccd1361822fef077e674d0a42371f9642
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2199132
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
2020-05-13 15:42:51 +00:00
Tim van der Lippe 86e3a6a5ad Add missing return types for function parameters in sdk/
These are required for the upcoming TypeScript 3.9.2 upgrade.

R=jacktfranklin@chromium.org

Bug: 1011811
Change-Id: I6e9d568ea8a9c7482d355a7d8bc084a579a0202e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2199120
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-05-13 11:31:01 +00:00
Z Duong Nguyen-Huu 4890aa6fee [wasm] Disallow setting breakpoints on unbreakable lines in WAT
Toggle non-breakable Wasm Disassembly lines to class of
'cm-non-breakable-line'.
Disallow to put breakpoint in non-breakable WAT as well.

Change-Id: Ib4fbb1cb7728a43790c719a9b12e248cab8bc163
Bug: chromium:1043033
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2160000
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Reviewed-by: Eric Leese <leese@chromium.org>
2020-05-07 17:05:49 +00:00
Philip Pfaffe ae8ec54beb Handle script language and code offset reported from the backend
Better identify handlable scripts in cxx dwarf language plugin

DISABLE_THIRD_PARTY_CHECK=Update JS Protocol

Bug: chromium:1057569
Change-Id: Ifbfd9d155483c609b1aed42f3264f1a30490af1d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2083142
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
2020-03-19 09:42:42 +00:00
Paul Lewis 59642a6ea9 [global] Remaps self.Bindings.breakpointManager
Moves self.Bindings.breakpointManager to an instance() method.

Bug: 1058320
Change-Id: If123cdb552e28dc7e85079aef0176a729cd5ff9f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2107535
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-03-18 15:26:18 +00:00
Simon Zünd 243abf7655 Prepare ResourceScriptMapping.js for asynchronous live locations
R=mathias@chromium.org

Bug: chromium:1032016
Change-Id: I18b3d30393af0cafe192883424637d16c0a5b562
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2071890
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2020-03-09 08:26:27 +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
Mathias Bynens f06e8c0758 Enable no-else-return lint rule with autofix
This rule matches the Chromium-wide coding style.

Bug: chromium:1057042

Change-Id: I21ad946227ca7344146abace1d2f6146b3a6c207
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2078924
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-02-28 14:17:07 +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
Eric Leese df2dbba832 Check for wasm disassembly before inline script
Wasm disassembly modules were being treated as inline scripts for
location mapping purposes. This change ensures they are treated
as wasm.

Bug: chromium:1045573
Change-Id: I83b4201b4c433f7c4b256e91f6fa737f3620530d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2028227
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Eric Leese <leese@chromium.org>
2020-01-30 09:03:17 +00:00
Tim van der Lippe 55cd4ef58c Migrate bindings/ to import cross-module
Bug: 1006759
Change-Id: If69c4e96c0042e60282bf0d6450518e456a12ad1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2017502
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-01-24 10:18:08 +00:00
Paul Lewis 2ddc6313de [Global] Updates refs for bindings globals
Bug: 1006759
Change-Id: Ib73c3ce4b014126da088851bfeccdff49d6ba0ea
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2016754
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-01-23 13:37:40 +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
Sigurd Schneider 5029dac177 Provide frameId getter on Script
Bug: chromium:1043120
Change-Id: I8625bd091b25d54ccf30780b6094c5ce6e7dc13b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2007498
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
2020-01-20 09:23:58 +00:00
Paul Lewis ef05f96d6d Migrates bindings/ to ESM internally
Bug: 1006759
Change-Id: I24fa605a4aa9dcc25cf7ff76609b8ae86cf09905
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1993350
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-01-10 11:37:56 +00:00
Simon Zünd 6a46fc9f34 Properly await {Breakpoint._refreshBreakpoint}
Breakpoint._refreshBreakpoint has one use-site left where the result is
not awaited. This CL fixes that.

Bug: chromium:1032016
Change-Id: Ib7979105d5ab7be9812b6cc3f01dea8effc36d09
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1991508
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2020-01-09 13:31:41 +00:00
Eric Leese 9307b14e07 Disassemble Wasm in front end
This change uses the WasmParser library to disassemble
Wasm modules in the dev tools frontend. This will allow us to remove
the disassembly from the backend.

Bug: chromium:1013527
Change-Id: Iee751fa3da6c3b3d4ccd48c96f801f898406f28f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1941748
Commit-Queue: Eric Leese <leese@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
2020-01-07 08:04:57 +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 20b29c2646 Enforce newlines at end of files
Trying to upload a CL with missing newlines at the end of files fails with the following warning:

These files should end in one (and only one) newline character:

Update the ESLint config to let the linter fix these errors.

Change-Id: Ia858b5864a1dc43144e0c6d81dedbf46376c2b8d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1897679
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
2019-11-04 15:02:44 +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 0723204a47 Migrate bindings/ to ESM
Bug: 1006759
Change-Id: Iaf9bc50583ed4936998f73c29c915d9c6f086195
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1847286
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#703749}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 476a2598349667b31c75170c3912dc75867883a9
2019-10-08 15:58:07 +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
Alexey Kozyatinskiy 0c7b1a30c0 [DevTools] simplify BreakpointManager interface
Removed couple public methods and simplified map of map of map.

R=lushnikov@chromium.org

Bug: none
Change-Id: Iac8b88478f9b7b7c4b722c2f65b723b7094559e4
Reviewed-on: https://chromium-review.googlesource.com/1176291
Reviewed-by: Andrey Lushnikov <lushnikov@chromium.org>
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#583404}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: a17f963eda6a5f5ac896d7456632b58f0753783b
2018-08-15 21:32:04 +00:00
Alexey Kozyatinskiy f337f57796 [DevTools] DebuggerWorkspaceBinding.uiLocationToRawLocations
Replaced existing uiLocationToRawLocation with method that returns all
raw locations.
This helps to resolve some debugger problems:
- ModelBreakpoint can find raw location within its debugger model,
- SourceMapNamesResolver can resolve expression within model for
  current call frame,
- possibleBreakpoints can get start and end location within one model.

DevTools frontend already has similar method for CSSWorkspaceBinding.
Proper behavior of ModelBreakpoint is critical for good breakpoint life
inside environment with a lot of targets, e.g. page with multiple workers,
node app with multiple processes.

R=lushnikov@chromium.org

Bug: none
Change-Id: I5e5c1782ed6b4c46d38cae9e95d642f47fca858a
Reviewed-on: https://chromium-review.googlesource.com/1163076
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Andrey Lushnikov <lushnikov@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#581096}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 01ce7c99c8be325099f795b0ae160b9c489ef61e
2018-08-07 02:14:56 +00:00
Alexey Kozyatinskiy 68bab06a07 [DevTools] remove separate event for FailedToParseScriptSource
Everywhere on the frontend side, we use both events and process them
in the same way.

R=lushnikov@chromium.org

Bug: none
Change-Id: I3ab9b196921ff9e7e8eac86e9217b0869f0c2313
Reviewed-on: https://chromium-review.googlesource.com/1163838
Commit-Queue: Andrey Lushnikov <lushnikov@chromium.org>
Reviewed-by: Andrey Lushnikov <lushnikov@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#580974}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c4c3cc18a3d51687dd25a9998a6f45e5a436ac9f
2018-08-06 20:33:01 +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