With this CL we can check in language-plugin mapped source files which
lines are actually mappable akin to sourcemaps. With this, we prevent
setting breakpoints on un-mapped lines and avoid lots of unpredictable
breakpoint sliding.
Fixed: chromium:1156075
Change-Id: I8b21b998727a0d4f964430949b7c6ddcd0896d57
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2581549
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
This is a (temporary) measure to gain a better understanding of the
timing of the various language plugin methods, and how these affect the
overall experience. By adding this to the frontend itself (the log
messages will only show up in DevTools on DevTools), we also gain the
ability to ask partners / other developers to look at them in case of
performance issues.
Bug: chromium:1083146
Change-Id: I444c48f20be72c0f2b57f7dc821a772e97c5e86f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2579919
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
This adds a new method `unregisterLanguageExtensionPlugin()` to the
`LanguageServicesAPI` exposed to DevTools extensions, which allows the
developer to unregister a previously registred language extension
plugin. This is useful for example when the configuration for an
extension changes and the front-end should reload the source mappings.
Drive-by-fix: Also make the registerLanguageExtensionPlugin and the
unregisterLanguageExtensionPlugin methods return promises, so that
the extensions can properly await / chain them.
Fixed: chromium:1151285
Bug: chromium:1151280, chromium:1041362, chromium:1083146
Change-Id: Ib62b70c717754d70cf827ba1a97fb5c3e358ee1f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2552506
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
For the formatter API, we introduce two new language plugin API methods
for querying the structure and the value of variables seperately. To
display a variable, the getTypeInfo method is first used to retrieve
structural information. The structure is used initially to display a
variable in the scope view, watch window, or console. If a node in the
structure tree cannot (or shouldn't be) further expanded, the second
method, getFormatter, is used to fetch a piece of JavaScript code from
the plugin that when passed to evaluateOnCallFrame produces a variable
value to be shown.
Bug: chromium:1127915, chromium:1137754, chromium:1137509
Change-Id: Id0a77ccdababe686e78003bcfac33200817dc8fa
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2453737
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
This adds an `icon()` method to `ScopeChainEntry`, and extends the
`ScopeChainSideparPane` with an optional `<img>` element that shows
this icon. This implements the recommended UX improvements to make
it easier to differentiate between the scopes themself and the items
listed in the scopes.
It is implemented via a new method `getScopeInfo()` method in the
language plugin extension API that returns the scope type, a user
visible type name, and the optional icon.
Before: https://imgur.com/a/xIvhdM4
After: https://imgur.com/a/6WHoceO
Bug: chromium:1136484
Change-Id: I5927e1502bc88b0d802aca5dcbc220df8d7c7f5d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2461769
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Peter Müller <petermueller@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
This reverts commit c9e3d3e3a7.
Reason for revert: The change causes issues with extensions not implementing the new API yet.
Original change's description:
> Implement support for the JavaScript formatter API
>
> For the formatter API, we introduce two new language plugin API methods
> for querying the structure and the value of variables seperately. To
> display a variable, the getTypeInfo method is first used to retrieve
> structural information. The structure is used initially to display a
> variable in the scope view, watch window, or console. If a node in the
> structure tree cannot (or shouldn't be) further expanded, the second
> method, getFormatter, is used to fetch a piece of JavaScript code from
> the plugin that when passed to evaluateOnCallFrame produces a variable
> value to be shown.
>
> Bug: chromium:1128416
> Change-Id: I46d6e59d24769178931fe6e46de030317670423e
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2422958
> Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
TBR=bmeurer@chromium.org,pfaffe@chromium.org,kimanh@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
No-presubmit: true
Bug: chromium:1128416
Change-Id: I9711f129dc8df88d8a181663dc2b231699da8da0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2453729
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
For the formatter API, we introduce two new language plugin API methods
for querying the structure and the value of variables seperately. To
display a variable, the getTypeInfo method is first used to retrieve
structural information. The structure is used initially to display a
variable in the scope view, watch window, or console. If a node in the
structure tree cannot (or shouldn't be) further expanded, the second
method, getFormatter, is used to fetch a piece of JavaScript code from
the plugin that when passed to evaluateOnCallFrame produces a variable
value to be shown.
Bug: chromium:1128416
Change-Id: I46d6e59d24769178931fe6e46de030317670423e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2422958
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
This CL extends the existing extension API to support debugger language
plugins hosted inside chrome extensions. The patch adds a new
experimental interface to allow extensions to egister a language plugin,
which then gets called by the debugger to provide debug information.
Drive-By: Drop the experimental out-of-process language plugin made
obsolete by the language extensions.
Bug: chromium:1083146
Change-Id: Icbf755e5761f6b7a5df6406a725e38eba965683e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2245146
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
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
The new compiler caught a lot of pre-existing issues in the codebase.
Sadly, the old compiler version was not smart enough to understand the
new changes. Therefore, the changes have be included in the same CL as
the compiler update.
Most of the changes are related to better handling of prototype and
class inheritance, as well as handling of null/undefined tracking.
Change-Id: I3941a3a240a4d09c4945e1e20d2521090ef837c9
Bug: 991710
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1762081
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@google.com>
Auto-Submit: Tim van der Lippe <tvanderlippe@google.com>
Cr-Original-Commit-Position: refs/heads/master@{#696761}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: ca93474213278e32e36d6ace1474c56884030757
This is a reland of c7f781ee6291b6b4b49943cdb99f2ef4e799cf06
third_party/blink/web_tests/http/tests/devtools/extensions/extensions-panel.js
has been fixed
Original change's description:
> Fix eslint and Closure compiler warnings
>
> Some functions that were globally scoped were not properly type-checked.
> Adding these to the `externs.js` makes sure that these are now
> type-checked (just like `ls` has been up to this point).
>
> This is in preparation of an upcoming change to run `eslint` and Closure
> compiler in `module`-mode rather than script mode.
>
> Change-Id: Ic2d9dba24c7aae3c6024c3caeea2b042f401b3c5
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1748895
> Commit-Queue: Tim van der Lippe <tvanderlippe@google.com>
> Commit-Queue: Erik Luo <luoe@chromium.org>
> Reviewed-by: Erik Luo <luoe@chromium.org>
> Auto-Submit: Tim van der Lippe <tvanderlippe@google.com>
> Cr-Commit-Position: refs/heads/master@{#686839}
Change-Id: I26df62e5a315992d1b32e19671bee6f608550385
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1755904
Auto-Submit: Tim van der Lippe <tvanderlippe@google.com>
Commit-Queue: Erik Luo <luoe@chromium.org>
Reviewed-by: Erik Luo <luoe@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#687253}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 04c820842de5cff07a4c00a8194fd6b6f933a9bb
This reverts commit c7f781ee6291b6b4b49943cdb99f2ef4e799cf06.
Reason for revert: it is breaking third_party/blink/web_tests/http/tests/devtools/extensions/extensions-panel.js which relies on extensionOrigin.
Original change's description:
> Fix eslint and Closure compiler warnings
>
> Some functions that were globally scoped were not properly type-checked.
> Adding these to the `externs.js` makes sure that these are now
> type-checked (just like `ls` has been up to this point).
>
> This is in preparation of an upcoming change to run `eslint` and Closure
> compiler in `module`-mode rather than script mode.
>
> Change-Id: Ic2d9dba24c7aae3c6024c3caeea2b042f401b3c5
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1748895
> Commit-Queue: Tim van der Lippe <tvanderlippe@google.com>
> Commit-Queue: Erik Luo <luoe@chromium.org>
> Reviewed-by: Erik Luo <luoe@chromium.org>
> Auto-Submit: Tim van der Lippe <tvanderlippe@google.com>
> Cr-Commit-Position: refs/heads/master@{#686839}
TBR=luoe@chromium.org,tvanderlippe@google.com
Change-Id: I1099fe2fbac1519dbcbb9a6cd4bc5de3cabd5713
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1754274
Reviewed-by: Mounir Lamouri <mlamouri@chromium.org>
Commit-Queue: Mounir Lamouri <mlamouri@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#687026}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c5fa68ebd8ad63e8ffebf63c570b8c2ae4e2601d
Some functions that were globally scoped were not properly type-checked.
Adding these to the `externs.js` makes sure that these are now
type-checked (just like `ls` has been up to this point).
This is in preparation of an upcoming change to run `eslint` and Closure
compiler in `module`-mode rather than script mode.
Change-Id: Ic2d9dba24c7aae3c6024c3caeea2b042f401b3c5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1748895
Commit-Queue: Tim van der Lippe <tvanderlippe@google.com>
Commit-Queue: Erik Luo <luoe@chromium.org>
Reviewed-by: Erik Luo <luoe@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@google.com>
Cr-Original-Commit-Position: refs/heads/master@{#686839}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c7f781ee6291b6b4b49943cdb99f2ef4e799cf06
Keypress events have a different keycode, so the wrong events were
being captured and sent to DevTools from extension panels. But keypress
is deprecated and we don't need these events anywhere in DevTools. So
we can just remove the event listener.
Bug: 882422
Change-Id: I9d286f581aa77ff208463a2edbb4eea093fa98ee
Reviewed-on: https://chromium-review.googlesource.com/1232853
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Joel Einbinder <einbinder@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#592637}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 10e9b59ba1acc764a058b8d152e3825ff7db50ba
This patch calls preventDefault on all events that we forward from
extension panels into devtools. This would cancel too many events,
so a list of devtools global keyboard shortcuts are passed into the
extension.
Bug: 682068
Change-Id: Ide557dafed759e20dfc6698d8cdc33f932acbe83
Reviewed-on: https://chromium-review.googlesource.com/1159467
Reviewed-by: Andrey Lushnikov <lushnikov@chromium.org>
Commit-Queue: Joel Einbinder <einbinder@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#580011}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 9714881871a256c98e5b12651aedd5210319ef36