Previously we only supported auto-completion for properties when the
expression was "name." or "name[". This change adds support to also
cover the new "name?." syntax.
Drive-by-fix: Also add tests for auto-completion with regular dot
notitation as well as bracket notation.
Bug: chromium:1066415
Change-Id: If9767d5c4009715576e2afd4d14328eefd2c82b8
Fixed: chromium:1017086
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2203440
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
This CL changes references to self.SDK.targetManager (the global
instance of SDK.SDKModel.TargetManager) over to
SDK.SDKModel.TargetManager.instance(). To keep both TypeScript and
Closure happy we must make a method on the TargetManager class itself,
since it only allows private constructors to be accessed by static
methods on the class.
Bug: 1058320
Change-Id: I6ca35024c21cf24254fd6273138a1ab3e163ee00
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2088092
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@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
We have two version of a lot of methods: method and methodPromise.
It makes searching of methods usages in codebase a little harder, this
CL replaces all callback based methods with promisified one.
R=luoe@chromium.org
Bug: none
Change-Id: If30da32e1b062734d7db54b9c5a87ece73ef1d39
Reviewed-on: https://chromium-review.googlesource.com/1235212
Reviewed-by: Erik Luo <luoe@chromium.org>
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#593291}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6abe7663589214aa561a1a674c20a570effdeff1
This was attempted before, but the ExecutionContextChanged event is
actually for when the name of an execution context changes, not for
when a new one is selected by the user (or the page is reloaded).
Also added a safety clear on DebuggerResumed
Change-Id: I4c9360139fe90beee2fa3d8a82317fc3aed1e6ae
Reviewed-on: https://chromium-review.googlesource.com/1040906
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Joel Einbinder <einbinder@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#555627}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: ae75af0b961edbac04cd8db77e9efaf77e962436
Previously properties were shown from every prototype of the object,
regardless of whether or not they were overridden by a higher properity
prototype. This could be confusing with for example '[].leng' which
showed length twice.
Change-Id: I7cee5b18a62d542bbf4562510c4c461afc59da60
Reviewed-on: https://chromium-review.googlesource.com/1026698
Commit-Queue: Joel Einbinder <einbinder@chromium.org>
Reviewed-by: Erik Luo <luoe@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#554270}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 82a54db3b748052649a2c156b5c5e1e125b5ee0e