This CL adds the APIs required for attaching a sourcemap to a resource via Extension APIs.
This CL considers that the External Developer will subscribe to some of
the existing Devtools Extension API (chrome.runtime.onConnect,
port.OnMessage & inspectedWindow.onResourceAdded)
This “subscribed“ extension, will be notified every time a resource is
loaded. This includes images and any other resources
This CL introduces:
- APIs shape and implementation (attachSourceMapURL)
- ExtensionServer implementation
- ExtensionServer tests
Full spec can be found here (Implementation):
https://docs.google.com/document/d/1x9_MTMVr213ApruMK6ryc4JpPHahvOBlExP6sHkMv8Y/edit?pli=1
Bug: 364508694
Change-Id: I35a53b58fae1ba41b733bc4bcb8ed6b8022dad54
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6166854
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
This is implemented by passing a reference to the externref value through the extension (type ForeignObject in the extension API).
A tricky point is that one can only pass numeric values through LLDB, so we pack this reference into a 64-bit integer.
Fixed: 334965862
Change-Id: I6b4644d51ff59eee2c66f034017bc7a924d5febe
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5458414
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
Previously there was a mismatch between what DevTools front-end
expected and what the DWARF C/C++ extension would return on
`getFunctionInfo`. The front-end only expected either `frames`
or `missingSymbolFiles` to be sent, but the extension would
return both. Combined with a recent change, this led to unwanted
warning messages on missing symbol files, although no symbol files
were actually missing.
This CL changes the LanguageExtensionPlugin API such that
`getFunctionInfo` may also return both.
Bug: 342316962
Change-Id: I312fd6783052d948ff76c3285a52b3a7c0052763
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5557983
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
We recently introduced a new API for extensions to access wasm state and
evaluate code and variables. This change makes object highlighting in
the LMI work with that API, which requires extensions to also report
object sizes in addition to addresses, which was previously missing.
Bug: 1336568, 1299832
Change-Id: I63ad2db35237a0944e09e0b9e62ccc2569d39dca
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3904643
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
This CL implements an API that provides extensions with access to the
current wasm state (i.e., wasm linear memory, locals, globals, and
operand stack values). For safety, access is guarded by a per-callframe
instance stop id to make sure extensions don't try to access stale
state.
Bug: 1299832
Change-Id: I335ebb5236f10fe31d64feb7f8cbc808f96c304f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3667644
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
For wasm debugging it's possible that debug info is incomplete on a per-callframe granularity. When debug info is incomplete we currently show a warning banner in the call stack sidebar pane and a little warning icon next to the affected callframes. It's too easy to overlook this. With this CL we're introducing a prominently red error infobar directly in the editor when an incomplete callframe is selected.
Bug: 1331281
Screenshot: See crbug.
Change-Id: Id804e087a0f04d8daa9169a77e0e78eb8556e6c9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3610169
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Peter Müller <petermueller@chromium.org>
We recently changed the behavior of DevTools such that it doesn't reload
when the theme changes. However, during instantiation an extension
receives the current theme name under chrome.devtools.panels.themeName.
Given the above, when the theme changes, the themeName value is stale,
and the extension has no way of knowing that the theme has changed.
This CL introduces a new hook for extensions, setThemeChangeHandler,
which follows the same pattern as setOpenResourceHandler. This allows an
extension developer to register a callback for when the theme changes.
The chrome.devtools.panels.themeName is automatically updated, and the
callback also receives the theme name as its parameter.
Bug: 1285420
Change-Id: I52aa813d7d7b327ad6bfe8ca99fa9d578662b417
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3380591
Reviewed-by: Tim Van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
chrome.devtools.panels.openResource is an extension API that causes a
page resource to be opened in the sources panel at a given line. For
wasm, though, line numbers are meaningless. Across DevTools, wasm module
offsets are encoded as column numbers. This CL adds a column number to
the openResource API.
Fixed: 1234438
Change-Id: I141ea0cdb10e211d9cdb8bbab0fc994597ddb5a6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3063505
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>