1. 11 Mar, 2021 1 commit
    • Benedikt Meurer's avatar
      [inspector] Properly filter by column number for inline scripts. · 81b91591
      Benedikt Meurer authored
      Previously `setBreakpointByUrl` and friends would only filter based on
      line number to find matching scripts. But that didn't work when there
      were multiple scripts in the same line (i.e. minified HTML), and we'd
      end up setting multiple breakpoints in different inline scripts, looking
      for the next possible break location in each of them individually.
      
      Fixed: chromium:1183664
      Also-By: pfaffe@chromium.org, kimanh@chromium.org
      Change-Id: I957811d30aa71609a38da75f33a24c0f720116f6
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2749155
      Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
      Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
      Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
      Reviewed-by: 's avatarKim-Anh Tran <kimanh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#73332}
      81b91591
  2. 08 Mar, 2021 1 commit
  3. 05 Mar, 2021 2 commits
  4. 02 Mar, 2021 1 commit
  5. 25 Feb, 2021 1 commit
  6. 16 Feb, 2021 1 commit
  7. 15 Feb, 2021 1 commit
    • Benedikt Meurer's avatar
      [inspector] Send type as description for WasmValueObject. · 987a7f4a
      Benedikt Meurer authored
      Also block sending "type" as part of the ObjectPreview, but only send
      the "value" property. The front-end will be updated to display
      WasmValueObject's similar to what we do for wrapper objects (i.e.
      StringWrapper and the like). The matching front-end change is still
      pending.
      
      Also refactor the WasmValueObject to have dedicated constructors for
      the individual types (i32, i64, f32, f64, externref and v128). This
      way we can just reuse the existing logic in descriptionForObject()
      and we also don't need to store the "type" on the object itself (not
      really performance sensitive, but fewer moving parts / things that
      can go wrong).
      
      This also addresses the crash in https://crbug.com/1166077#c16 since
      the WasmValueObject instances now have a proper JSFunction in their
      maps' constructor_or_backpointer slot and are thus able to locate
      their creation context. Note that this doesn't generally address
      https://crbug.com/1166077 itself, but only the WasmValueObject case.
      
      Screenshot: https://imgur.com/kbd3bix.png
      Bug: chromium:1170282, chromium:1071432
      Bug: chromium:1159402, chromium:1166077
      Change-Id: Iae649cad155efd774cfb1f4eea8cf406e413c03a
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2692574Reviewed-by: 's avatarPhilip Pfaffe <pfaffe@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#72736}
      987a7f4a
  8. 09 Feb, 2021 1 commit
  9. 26 Jan, 2021 1 commit
  10. 20 Jan, 2021 1 commit
    • Simon Zünd's avatar
      Forward exceptions while using DebugPropertyIterator · af7e6893
      Simon Zünd authored
      The V8 inspector is using the DebugPropertyIterator (a debug only
      interface) while building RemoteObjects. The DebugPropertyIterator
      uses the `KeyAccumulator::GetKeys` for this, which can potentially
      throw, but the DebugPropertyIterator ignores exceptions and keeps
      iterating. If multiple iteration steps throw an exception
      (e.g. due to a pending stack overflow), we run into a CHECK in
      Isolate::Throw, as we can't throw exceptions while another
      exception is still pending.
      
      This CL fixes the CHECK crash by properly propagating exceptions
      after the iterator is created or advanced and returning early
      in the inspector if an exception happens.
      
      Please note that the regression test that showcases this behavior
      is still disabled, as fixing the crash causes currently an
      endless loop. While the exception in `ValueMirror::getProperties`
      is handled by early returing, we still need to forward it as
      the result of the `Runtime::evaluate` all the way up the stack.
      
      R=bmeurer@chromium.org, yangguo@chromium.org
      
      Bug: chromium:1080638
      Change-Id: I1d55e0d70490a06a6bc1b0a3525236411da7f64b
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2639954Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Commit-Queue: Simon Zünd <szuend@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#72203}
      af7e6893
  11. 19 Jan, 2021 1 commit
  12. 14 Jan, 2021 1 commit
  13. 13 Jan, 2021 1 commit
  14. 11 Jan, 2021 1 commit
  15. 08 Jan, 2021 1 commit
    • Benedikt Meurer's avatar
      [inspector] Remove special wasm RemoteObject type. · cde7a77e
      Benedikt Meurer authored
      Previously we had introduced a special `v8::internal::WasmValue` type
      which we used to expose Wasm values to the Scope view in Chromium
      DevTools. The problem however is that these values cannot be exposed to
      JavaScript (and in particular not to Debug Evaluate), which means that
      particularly for v128 and i64 we have inconsistent representations
      across the various parts of DevTools.
      
      This change removes the `wasm` type from the RemoteObject and all the
      adjacent logic, and paves the way for a uniform representation of Wasm
      values throughout DevTools. For i64 we will simply use BigInt
      consistently everywhere, and for i32, f32 and f64 we'll just use Number.
      For externref we will represent the values as-is directly. For v128
      values we currently use a Uint8Array, but will introduce a dedicated
      WasmSimd128 class in a follow-up CL.
      
      Bug: chromium:1071432
      Fixed: chromium:1159402
      Change-Id: I0671e5736c9c27d7ca376e23ed74f16d36e03c80
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2614428Reviewed-by: 's avatarZhi An Ng <zhin@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Commit-Queue: Zhi An Ng <zhin@chromium.org>
      Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#71962}
      cde7a77e
  16. 05 Jan, 2021 1 commit
  17. 29 Dec, 2020 1 commit
    • Benedikt Meurer's avatar
      [debug] Make JSArrayBuffer (pre)views into internal properties. · 2cab7ae9
      Benedikt Meurer authored
      For JSArrayBuffer instances (which map to both v8::ArrayBuffer and
      v8::SharedArrayBuffer), we add a couple of synthetic views to its
      ValueMirror to make it easy for developers to peak into the contents of
      the JSArrayBuffer. These were previously real properties, but that's
      just wrong (both intuitively and semantically), and they should instead
      be internal properties.
      
      Drive-by-fix: The [[IsDetached]] internal property should only be shown
      on actually detached JSArrayBuffer's to reduce visual clutter. And for
      detached JSArrayBuffers creating views on them throws TypeErrors per
      specification, so we shouldn't attempt to display views on them.
      
      Bug: v8:9308, chromium:1162229
      Change-Id: Ia006de7873ca4b27aae7d00d46e1b69d2e326449
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2606047
      Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
      Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#71892}
      2cab7ae9
  18. 28 Dec, 2020 1 commit
    • Benedikt Meurer's avatar
      [inspector][wasm] Remove obsolete Debugger.executeWasmEvaluator(). · 39645430
      Benedikt Meurer authored
      With https://crrev.com/c/2087396 we introduced a new CDP method
      `Debugger.executeWasmEvaluator()`, which we originally intended
      to use as the foundation for Debug-Evaluate on Wasm frames.
      
      However in the process of prototyping we learned that it is too
      costly and too inefficient to use WebAssembly modules here, and
      we switched to regular Debug-Evaluate with JavaScript instead
      (with a special debug proxy exposed that allows JavaScript to
      peak into the Wasm frame), since JavaScript is better suited
      for short-lived / short-running snippets and we don't need
      clang and wasm-ld then to generate these snippets.
      
      The JavaScript exposed debug proxy (as described in [1]) not
      only enables more powerful and flexible Debug-Evaluate for the
      DWARF C/C++ extension, but also serves as the basis for various
      aspects of the Basic Wasm Developer Experience.
      
      In order to pay down technical debt and to keep the maintenance
      overhead low, we should remove the initial prototype now, also
      to ensure that we don't accidentally attract other users of CDP
      to rely on this unsupported API (despite it being marked as
      "experimental").
      
      [1]: https://docs.google.com/document/d/1VZOJrU2VsqOZe3IUzbwQWQQSZwgGySsm5119Ust1gUA
      
      Fixed: chromium:1162062
      Bug: chromium:1020120, chromium:1068571, chromium:1127914
      Change-Id: I6dba8c906a8675ce6c29a52e3c32bb6626a27247
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2605186
      Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
      Commit-Queue: Yang Guo <yangguo@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#71882}
      39645430
  19. 24 Dec, 2020 1 commit
  20. 23 Dec, 2020 1 commit
  21. 22 Dec, 2020 1 commit
  22. 15 Dec, 2020 1 commit
  23. 07 Dec, 2020 1 commit
    • Benedikt Meurer's avatar
      [wasm] Use WebAssembly.Memory objects in the scope chain. · 058299a8
      Benedikt Meurer authored
      Previously V8 would wrap the WebAssembly.Memory backing stores into
      Uint8Arrays and report that as memories, but that's confusing to the
      developer, since that's not what's really being used. The way that
      DevTools presents the backing stores of memories, it's still perfectly
      possible to get hold of an Uint8Array if that's what the developer is
      looking for.
      
      To make it possible to easily identify the WebAssembly.Memory objects
      in the DevTools front-end (in particular for the memory inspector) we
      add a 'webassemblymemory' subtype to the Chrome DevTools Protocol. We
      also improve the description for the memories to include the number
      of active pages.
      
      Fixed: chromium:1155566
      Screenshot: https://imgur.com/8enx57u.png
      Change-Id: I63dbabe0e372e9ad6dcc8e6642cdb743147a620c
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2574699Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
      Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#71641}
      058299a8
  24. 30 Nov, 2020 1 commit
  25. 28 Nov, 2020 1 commit
  26. 26 Nov, 2020 1 commit
  27. 24 Nov, 2020 1 commit
  28. 19 Nov, 2020 1 commit
    • Dominik Inführ's avatar
      Reland "[heap] Introduce LocalIsolate for main thread" · dc45361e
      Dominik Inführ authored
      This is a reland of e95e1b62
      
      After landing https://crrev.com/c/2546682, this CL can be relanded
      without changes.
      
      Original change's description:
      > [heap] Introduce LocalIsolate for main thread
      >
      > Add a LocalIsolate for the main thread to Isolate. This LocalIsolate is
      > kept alive during the whole lifetime of the Isolate. The main thread
      > LocalIsolate starts in the Running state in contrast to the background
      > thread LocalIsolates (those start in Parked).
      >
      > Code paths in Turbofan that used to create a LocalIsolate on the main
      > thread can now simply use the main thread LocalIsolate.
      >
      > LocalIsolate for the main thread will help in reducing differences
      > between the main and background threads. The goal is that the main
      > thread behaves more like a background thread.
      >
      > The main thread LocalIsolate should also make it simpler to share code
      > between main thread and background threads by using LocalIsolate for
      > both.
      >
      > Bug: v8:10315
      > Change-Id: I7fd61d305a6fd7079e2319d75c291c1021e70018
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2509593
      > Reviewed-by: Simon Zünd <szuend@chromium.org>
      > Reviewed-by: Yang Guo <yangguo@chromium.org>
      > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
      > Reviewed-by: Leszek Swirski <leszeks@chromium.org>
      > Reviewed-by: Georg Neis <neis@chromium.org>
      > Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#71226}
      
      Bug: v8:10315
      Change-Id: I418b1217aeac4f3c44a0aa514dea9864f8a58656
      TBR: szuend@chromium.org, yangguo@chromium.org, ulan@chromium.org, leszeks@chromium.org, neis@chromium.org
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2543399Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
      Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#71274}
      dc45361e
  29. 18 Nov, 2020 1 commit
  30. 17 Nov, 2020 2 commits
    • Michael Achenbach's avatar
      Revert "[heap] Introduce LocalIsolate for main thread" · 9235f258
      Michael Achenbach authored
      This reverts commit e95e1b62.
      
      Reason for revert:
      https://ci.chromium.org/p/v8/builders/ci/V8%20Linux%20-%20arm%20-%20sim%20-%20debug/23064
      
      Original change's description:
      > [heap] Introduce LocalIsolate for main thread
      >
      > Add a LocalIsolate for the main thread to Isolate. This LocalIsolate is
      > kept alive during the whole lifetime of the Isolate. The main thread
      > LocalIsolate starts in the Running state in contrast to the background
      > thread LocalIsolates (those start in Parked).
      >
      > Code paths in Turbofan that used to create a LocalIsolate on the main
      > thread can now simply use the main thread LocalIsolate.
      >
      > LocalIsolate for the main thread will help in reducing differences
      > between the main and background threads. The goal is that the main
      > thread behaves more like a background thread.
      >
      > The main thread LocalIsolate should also make it simpler to share code
      > between main thread and background threads by using LocalIsolate for
      > both.
      >
      > Bug: v8:10315
      > Change-Id: I7fd61d305a6fd7079e2319d75c291c1021e70018
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2509593
      > Reviewed-by: Simon Zünd <szuend@chromium.org>
      > Reviewed-by: Yang Guo <yangguo@chromium.org>
      > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
      > Reviewed-by: Leszek Swirski <leszeks@chromium.org>
      > Reviewed-by: Georg Neis <neis@chromium.org>
      > Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#71226}
      
      TBR=ulan@chromium.org,yangguo@chromium.org,neis@chromium.org,leszeks@chromium.org,szuend@chromium.org,dinfuehr@chromium.org
      
      Change-Id: Ia70b4bfe3b8fa26bf8d6a7dc612a310b0ed54073
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:10315
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2543937Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
      Commit-Queue: Michael Achenbach <machenbach@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#71228}
      9235f258
    • Dominik Inführ's avatar
      [heap] Introduce LocalIsolate for main thread · e95e1b62
      Dominik Inführ authored
      Add a LocalIsolate for the main thread to Isolate. This LocalIsolate is
      kept alive during the whole lifetime of the Isolate. The main thread
      LocalIsolate starts in the Running state in contrast to the background
      thread LocalIsolates (those start in Parked).
      
      Code paths in Turbofan that used to create a LocalIsolate on the main
      thread can now simply use the main thread LocalIsolate.
      
      LocalIsolate for the main thread will help in reducing differences
      between the main and background threads. The goal is that the main
      thread behaves more like a background thread.
      
      The main thread LocalIsolate should also make it simpler to share code
      between main thread and background threads by using LocalIsolate for
      both.
      
      Bug: v8:10315
      Change-Id: I7fd61d305a6fd7079e2319d75c291c1021e70018
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2509593Reviewed-by: 's avatarSimon Zünd <szuend@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#71226}
      e95e1b62
  31. 13 Nov, 2020 2 commits
  32. 03 Nov, 2020 1 commit
    • Simon Zünd's avatar
      Remove dead code in the CommandlineAPI destructor · 4a26b54d
      Simon Zünd authored
      The CommandlineAPI destructor retrieves the property descriptors for
      every function it installed on the global object, but it doesn't do
      anything with the descriptor directly, just verifies that it could
      retrieve them.
      
      As there are cases where 'getOwnPropertyDescriptor' can actually fail,
      such as stack overflow or termination exceptions, we remove the check.
      
      R=yangguo@chromium.org
      
      Bug: chromium:914286
      Change-Id: I01147195bdf107131de602789f448abe0afa6b0e
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2516470
      Commit-Queue: Simon Zünd <szuend@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#70939}
      4a26b54d
  33. 30 Oct, 2020 1 commit
    • Martin Bidlingmaier's avatar
      [regexp] Add 'l' flag to force experimental engine · 5720d205
      Martin Bidlingmaier authored
      This commit adds the 'l' (linear) RegExp flag (as in e.g. /asdf|123/l)
      that forces execution in linear time.  These regexps are handled by the
      experimental engine.  If the experimental engine cannot handle the
      pattern, an exception is thrown on creation of the regexp.
      
      The commit also adds a new global V8 flag and changes an existing one:
      * --enable-experimental-engine, which turns on recognition of the RegExp
        'l' flag.  Previously this flag also caused all supported regexps to
        be executed by the experimental engine; this is not the case anymore.
      * --default-to-experimental-regexp-engine takes over the previous
        semantics of --enable-experimental-regexp-engine:  We execute all
        supported regexps with the experimental engine.
      
      Cq-Include-Trybots: luci.v8.try:v8_linux64_fyi_rel_ng
      Bug: v8:10765
      Change-Id: I5622a89b19404105e8be280d454e9fdd63c003b3
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2461244Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Reviewed-by: 's avatarSimon Zünd <szuend@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Commit-Queue: Martin Bidlingmaier <mbid@google.com>
      Cr-Commit-Position: refs/heads/master@{#70892}
      5720d205
  34. 29 Oct, 2020 1 commit
  35. 27 Oct, 2020 1 commit
  36. 22 Oct, 2020 1 commit
  37. 20 Oct, 2020 1 commit