Commit Graph
28 Commits
Author SHA1 Message Date
Tim van der Lippe e4d64e7ae0 Remove unrestricted from comments that include other annotations
For all comments that contained both the unrestricted annotation
and any other potential annotation, remove only the unrestricted
annotation.

R=szuend@chromium.org

No-Presubmit: True
Bug: 1011811
Change-Id: I27dd67f657cdb1a9233d768eea81cabe2591f5f7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2569759
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2020-12-02 15:31:52 +00:00
Benedikt Meurer 438cee3e08 [wasm] Hide gutter context menu options that don't work.
The following context menu options don't currently behave correctly with
WebAssembly or simply don't make sense, and are thus hidden from the UI
for now:

- 'Add condition breakpoint'
- 'Add logpoint'
- 'Edit breakpoint'
- 'Never pause here'
- 'Blackbox script'
- 'Continue to here'

Introduce a `DebuggerWorkspaceBinding.scripts()` method to iterate all
the scripts that are related to a given `UISourceCode`. We use that
method to check that every script related to the current `UISourceCode`
is JavaScript, and thus supports the full range of debugging
capabilities.

Bug: chromium:1136484
Change-Id: If6277b43b2fb2fb73e9f3aae53e09074b614f6ed
Fixed: chromium:1142275
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2498222
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
2020-10-26 12:17:25 +00:00
Tim van der Lippe b8ae5a73f8 Typecheck bindings/CompilerScriptMapping.js with TypeScript
R=szuend@chromium.org

Bug: 1011811
Change-Id: Ie16fe043f5d4aaef22f269281d63a80d03a756b1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2372388
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2020-08-25 15:52:31 +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
Sigurd Schneider 398ed8b4cb Remember frameId for DevTools-initiated loads
This is pre-work for future CLs where we want to know which frame
triggered a DevTools initiated load.

Bug: chromium:1069378
Change-Id: Ib1e98c80e089046551cf9c4e42af5141ef0d08f6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2249919
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2020-06-18 11:04:36 +00:00
Paul Lewis 0609f5a4e5 [global] Remaps self.Bindings.blackboxManager
Moves self.Bindings.blackboxManager to an instance() method.

Bug: 1058320
Change-Id: Idcd46ea17360cdadacc726d1bd520cc2d692efdd
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2107537
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-03-18 16:48:09 +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 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
Simon Zünd 4e52bbdf71 Prepare CompilerScriptMapping.js for asynchronous live locations
Not all of the {await}s are strictly necessary, as they are the last
action in an event handler. Putting them there makes it more explicit
that {updateLocations} is an async action though.

R=mathias@chromium.org

Bug: chromium:1032016
Change-Id: I8dc8b93ee0b1ef5aa4cf00525189367420409679
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2071883
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2020-02-26 06:48:48 +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
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
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
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
Ingvar Stepanyan a4797c8609 Enhance auto-stepping behaviour
Previously, auto-stepping experiment would only work when mapping is not
found at all, that is, there is no source file associated with a
particular byte offset.

This is not ideal in situations where a file exists, but underlying
JavaScript / Wasm instructions don't map 1:1 to the source language,
which is usually the case for compiled languages. In this case trying to
perform step-by-step debugging would lead to user visibly staying on the
same line and column in the source file, while V8 is stepping over
individual instructions / statements.

The reason for this is that SourceMap.findEntry doesn't look for an
exact match, but rather for a most suitable position in the source it
can map a byte offset to. This is what you usually want when stopping on
an exception, but not what you want when trying to step over some
statement in the source code.

This change enhances auto-stepping to detect such situations and
continue until a precise match is found.

Change-Id: I69ced14f0bdb219ec8f6b58864dbf23616a6230b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1855967
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Ingvar Stepanyan <rreverser@google.com>
Cr-Original-Commit-Position: refs/heads/master@{#705515}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6411844977f839675e37fb7d90a59e164aaa9432
2019-10-14 11:32:18 +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
Tim van der Lippe ffa7862d4e Update Closure compiler to v20190729
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
2019-09-16 12:07:12 +00:00
Erik Luo 91ef5e23fa [DevTools] fix(bindings): properly detach blackboxed sourcemaps
CompilerScriptMapping assumes that attaching sourcemaps get added to
`_contentScriptsBindings` or `_regularBindings`. Blackboxed sources
were skipped, for some reason, so detaching would throw an error.

In bad cases, navigations will detach sourcemaps, throw errors, and
prevent Console from clearing.

Bug: 888688
Change-Id: I2c460271a868eca9a6d67371d9097cc552f20b56
Reviewed-on: https://chromium-review.googlesource.com/c/1295310
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Commit-Queue: Erik Luo <luoe@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#601794}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 877430d2223351c42000a8fdef711514ca89e4df
2018-10-23 00:21:46 +00:00
Alexey Kozyatinskiy 1e07c7e5c0 [DevTools] migrate CallStackSidebarPane to live locations
New CallStackSidebarPane tries to finally split model and view by using
live locations more.
With new implementation each item maintains own state based on live
location updates and schedule updates of correspond list item.

drive-by: removed BlackboxManager.isRawLocationBlackboxed method.

R=lushnikov@chromium.org

Bug: none
Change-Id: I19adde997652754e5f90869ee41ab41899bf8ec4
Reviewed-on: https://chromium-review.googlesource.com/1168384
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Andrey Lushnikov <lushnikov@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#582044}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: bceaccd337d6198f92ccca0467752210480d3e86
2018-08-10 04:00:21 +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 94b0f5dd37 [DevTools] simplify script with source map blackboxing
Current logic produces one Debugger.setBlackboxedRanges call on each
scriptParsed event. It makes our frontend too much chatty.
This CL simplify blackbox manager. With new logic blackbox manager
sends Debugger.setBlackboxedRanges iff script has sourceMap and at
least one sourceURL from sourceMap is blackboxed.
When blackbox pattern changed frontend will send setBlackboxedRanges
iff ranges are affected by change.

R=lushnikov@chromium.org

Change-Id: I8b9511f9feba50127de4add98c8d191877103145
Reviewed-on: https://chromium-review.googlesource.com/1162308
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Andrey Lushnikov <lushnikov@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#580742}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2ba8a2397295a119aa848a1067ff1960ce2bb3f7
2018-08-04 04:44:54 +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