1. 22 Jul, 2022 1 commit
    • Jakob Kummerow's avatar
      [wasm][devtools] Fix reported function body offsets · d180d40d
      Jakob Kummerow authored
      The DevTools frontend doesn't want the Wasm module's understanding of
      function body offsets (i.e. including locals), but the ranges of
      offsets where breakpoints can be set (i.e. only where instructions are).
      This patch adjusts the reported offsets accordingly.
      A consequence is that we have to report full (start,end) pairs for each
      function, instead of being able to dedupe end1==start2 etc.
      
      Bug: v8:12917
      Change-Id: I0c7d2d96435cdac2c4553647b7bcc8783bc1798b
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3780526
      Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
      Reviewed-by: 's avatarPhilip Pfaffe <pfaffe@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#81887}
      d180d40d
  2. 19 Jul, 2022 1 commit
  3. 15 Jun, 2022 1 commit
    • Simon Zünd's avatar
      Reland "[inspector] Allow Debugger.setScriptSource to edit top-most function" · 21fe5e0f
      Simon Zünd authored
      This is a reland of commit dac61556
      
      This is a straight-up reland with no changes, because:
        1) The failure doesn't reproduce locally
        2) The failing flaky test that triggered the revert is not related
           to the code modified by this CL and should (in theory) not be
           impacted.
      
      Original change's description:
      > [inspector] Allow Debugger.setScriptSource to edit top-most function
      >
      > This CL adds a new boolean flag on the Debugger.setScriptSource CDP
      > method that gets piped all the way through to the live-edit mechanism.
      > The new flag enables live-editing of the top-most function while
      > paused.
      >
      > The CL adds a couple of tests that cover the new core use cases for
      > this flag.
      >
      > R=jarin@chromium.org
      >
      > Bug: chromium:1334484
      > Change-Id: I12fec591b2b6550d89748714620e629548e1b9c1
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3695354
      > Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
      > Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
      > Commit-Queue: Simon Zünd <szuend@chromium.org>
      > Cr-Commit-Position: refs/heads/main@{#81127}
      
      Bug: chromium:1334484
      Change-Id: I9a9bf7e03d81c86adb4819b9756dd9afcf6fa021
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3706398Reviewed-by: 's avatarKim-Anh Tran <kimanh@chromium.org>
      Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Commit-Queue: Simon Zünd <szuend@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#81171}
      21fe5e0f
  4. 14 Jun, 2022 2 commits
  5. 02 May, 2022 1 commit
    • Benedikt Meurer's avatar
      [inspector] Fix mapping between location and offset. · d821a6a3
      Benedikt Meurer authored
      We weren't really translating between location (line and column number)
      and source position (character offset) consistently, especially when it
      came to inline <script>s. There were also inconsistencies between what
      Debugger.getPossibleBreakpoints and Debugger.setBreakpointByUrl would
      do.
      
      With this CL, we are now consistently operating under the following
      assumptions:
      
      (1) For inline <scripts>s with a //@ sourceURL annotation, we assume
          that the line and column number that comes in via the protocol is
          in terms of the source text of the script.
      (2) For inline <script>s without said annotation, we assume that the
          line and column numbers are in terms of the surrounding document.
      
      This is finally aligned with how the DevTools front-end operates.
      
      Fixed: chromium:1319828
      Change-Id: I98c4ef04b34a97caf060ff4f32690b135edb6ee6
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3610622Reviewed-by: 's avatarKim-Anh Tran <kimanh@chromium.org>
      Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
      Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#80292}
      d821a6a3
  6. 04 Mar, 2022 1 commit
  7. 28 Feb, 2022 1 commit
  8. 11 Feb, 2022 1 commit
  9. 24 Aug, 2021 1 commit
    • Dan Elphick's avatar
      Reland "[include] Split out v8.h" · ec06bb6c
      Dan Elphick authored
      This is a reland of d1b27019
      
      Fixes include:
      Adding missing file to bazel build
      Forward-declaring classing before friend-classing them to fix win/gcc
      Add missing v8-isolate.h include for vtune builds
      
      Original change's description:
      > [include] Split out v8.h
      >
      > This moves every single class/function out of include/v8.h into a
      > separate header in include/, which v8.h then includes so that
      > externally nothing appears to have changed.
      >
      > Every include of v8.h from inside v8 has been changed to a more
      > fine-grained include.
      >
      > Previously inline functions defined at the bottom of v8.h would call
      > private non-inline functions in the V8 class. Since that class is now
      > in v8-initialization.h and is rarely included (as that would create
      > dependency cycles), this is not possible and so those methods have been
      > moved out of the V8 class into the namespace v8::api_internal.
      >
      > None of the previous files in include/ now #include v8.h, which means
      > if embedders were relying on this transitive dependency then it will
      > give compile failures.
      >
      > v8-inspector.h does depend on v8-scripts.h for the time being to ensure
      > that Chrome continue to compile but that change will be reverted once
      > those transitive #includes in chrome are changed to include it directly.
      >
      > Full design:
      > https://docs.google.com/document/d/1rTD--I8hCAr-Rho1WTumZzFKaDpEp0IJ8ejZtk4nJdA/edit?usp=sharing
      >
      > Bug: v8:11965
      > Change-Id: I53b84b29581632710edc80eb11f819c2097a2877
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097448
      > Reviewed-by: Yang Guo <yangguo@chromium.org>
      > Reviewed-by: Camillo Bruni <cbruni@chromium.org>
      > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
      > Reviewed-by: Leszek Swirski <leszeks@chromium.org>
      > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
      > Commit-Queue: Dan Elphick <delphick@chromium.org>
      > Cr-Commit-Position: refs/heads/main@{#76424}
      
      Cq-Include-Trybots: luci.v8.try:v8_linux_vtunejit
      Bug: v8:11965
      Change-Id: I99f5d3a73bf8fe25b650adfaf9567dc4e44a09e6
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3113629Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
      Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Reviewed-by: 's avatarSimon Zünd <szuend@chromium.org>
      Commit-Queue: Dan Elphick <delphick@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#76460}
      ec06bb6c
  10. 23 Aug, 2021 2 commits
    • Dan Elphick's avatar
      Revert "[include] Split out v8.h" · 44fe02ce
      Dan Elphick authored
      This reverts commit d1b27019.
      
      Reason for revert: Broke vtune build, tsan build and possibly others
      
      Original change's description:
      > [include] Split out v8.h
      >
      > This moves every single class/function out of include/v8.h into a
      > separate header in include/, which v8.h then includes so that
      > externally nothing appears to have changed.
      >
      > Every include of v8.h from inside v8 has been changed to a more
      > fine-grained include.
      >
      > Previously inline functions defined at the bottom of v8.h would call
      > private non-inline functions in the V8 class. Since that class is now
      > in v8-initialization.h and is rarely included (as that would create
      > dependency cycles), this is not possible and so those methods have been
      > moved out of the V8 class into the namespace v8::api_internal.
      >
      > None of the previous files in include/ now #include v8.h, which means
      > if embedders were relying on this transitive dependency then it will
      > give compile failures.
      >
      > v8-inspector.h does depend on v8-scripts.h for the time being to ensure
      > that Chrome continue to compile but that change will be reverted once
      > those transitive #includes in chrome are changed to include it directly.
      >
      > Full design:
      > https://docs.google.com/document/d/1rTD--I8hCAr-Rho1WTumZzFKaDpEp0IJ8ejZtk4nJdA/edit?usp=sharing
      >
      > Bug: v8:11965
      > Change-Id: I53b84b29581632710edc80eb11f819c2097a2877
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097448
      > Reviewed-by: Yang Guo <yangguo@chromium.org>
      > Reviewed-by: Camillo Bruni <cbruni@chromium.org>
      > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
      > Reviewed-by: Leszek Swirski <leszeks@chromium.org>
      > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
      > Commit-Queue: Dan Elphick <delphick@chromium.org>
      > Cr-Commit-Position: refs/heads/main@{#76424}
      
      Bug: v8:11965
      Change-Id: Id57313ae992e720c8b19abc975cd69729e1344aa
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3113627
      Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Owners-Override: Leszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#76428}
      44fe02ce
    • Dan Elphick's avatar
      [include] Split out v8.h · d1b27019
      Dan Elphick authored
      This moves every single class/function out of include/v8.h into a
      separate header in include/, which v8.h then includes so that
      externally nothing appears to have changed.
      
      Every include of v8.h from inside v8 has been changed to a more
      fine-grained include.
      
      Previously inline functions defined at the bottom of v8.h would call
      private non-inline functions in the V8 class. Since that class is now
      in v8-initialization.h and is rarely included (as that would create
      dependency cycles), this is not possible and so those methods have been
      moved out of the V8 class into the namespace v8::api_internal.
      
      None of the previous files in include/ now #include v8.h, which means
      if embedders were relying on this transitive dependency then it will
      give compile failures.
      
      v8-inspector.h does depend on v8-scripts.h for the time being to ensure
      that Chrome continue to compile but that change will be reverted once
      those transitive #includes in chrome are changed to include it directly.
      
      Full design:
      https://docs.google.com/document/d/1rTD--I8hCAr-Rho1WTumZzFKaDpEp0IJ8ejZtk4nJdA/edit?usp=sharing
      
      Bug: v8:11965
      Change-Id: I53b84b29581632710edc80eb11f819c2097a2877
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097448Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Commit-Queue: Dan Elphick <delphick@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#76424}
      d1b27019
  11. 02 Mar, 2021 1 commit
  12. 18 Nov, 2020 1 commit
  13. 27 Jul, 2020 1 commit
  14. 05 May, 2020 1 commit
  15. 17 Mar, 2020 1 commit
  16. 09 Jan, 2020 1 commit
  17. 18 Dec, 2019 1 commit
  18. 25 Sep, 2019 1 commit
    • Ingvar Stepanyan's avatar
      Add support for reporting raw Wasm scripts · c7848612
      Ingvar Stepanyan authored
      This addition will allow to experiment with parsing DWARF information from
      WebAssembly on the frontend side for improved debugging.
      
      The frontend must explicitly opt-in to this experiment by setting
      `supportsWasmDwarf: true` in `Debugger.enable` params.
      
      When this option is present, and Wasm appears to contain DWARF information
      (heuristic: `.debug_info` custom section is present), V8 will not try to
      disassemble and report each WebAssembly function as a separate fake script, but
      instead will report Wasm module as a whole.
      
      Note that V8 already does this when Wasm is associated with a source map.
      
      Additionally, this CL adds a dedicated `Debugger.getWasmBytecode` command that
      accepts scriptId and returns raw wire bytes of the chosen WebAssembly module.
      
      Change-Id: I7a6e80daf8d91ffaaba04fa15688f2ba9552870f
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1809375
      Commit-Queue: Ingvar Stepanyan <rreverser@google.com>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#63969}
      c7848612
  19. 13 Sep, 2019 1 commit
  20. 08 May, 2019 1 commit
  21. 16 Mar, 2019 1 commit
  22. 15 Mar, 2019 2 commits
  23. 14 Mar, 2019 2 commits
  24. 29 Aug, 2018 1 commit
    • Alexey Kozyatinskiy's avatar
      Reland "inspector: do not convert and store String16 for script source" · 3ca15cdd
      Alexey Kozyatinskiy authored
      This is a reland of e987606a
      
      Original change's description:
      > inspector: do not convert and store String16 for script source
      >
      > We need script source for:
      > - calculating hash to report as part of scriptParsed event,
      > - reporting it as response on getScriptSource request,
      > - searching inside as response on searchInContent request,
      > - breakpoints hints.
      >
      > In all cases there is no need to store source on inspector side.
      >
      > R=alph@chromium.org
      >
      > Bug: chromium:873865,v8:7731
      > Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;master.tryserver.blink:linux_trusty_blink_rel
      > Change-Id: Ice24ddc72cfff36fb9a2dff2d7c4543defe3f668
      > Reviewed-on: https://chromium-review.googlesource.com/1182603
      > Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
      > Reviewed-by: Alexei Filippov <alph@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#55286}
      
      TBR=alph@chromium.org
      
      Bug: chromium:873865, v8:7731
      Change-Id: I0a0e93cd9d7797e4b3c57b1ab4f1a20af27fea9c
      Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;master.tryserver.blink:linux_trusty_blink_rel
      Reviewed-on: https://chromium-review.googlesource.com/1195907Reviewed-by: 's avatarAleksey Kozyatinskiy <kozyatinskiy@chromium.org>
      Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#55509}
      3ca15cdd
  25. 22 Aug, 2018 1 commit
    • Maya Lekova's avatar
      Revert "inspector: do not convert and store String16 for script source" · 6b860b69
      Maya Lekova authored
      This reverts commit e987606a.
      
      Reason for revert: Speculatively reverting due to possible failure: https://ci.chromium.org/p/v8/builders/luci.v8.ci/Android%20Builder/8641
      
      Original change's description:
      > inspector: do not convert and store String16 for script source
      > 
      > We need script source for:
      > - calculating hash to report as part of scriptParsed event,
      > - reporting it as response on getScriptSource request,
      > - searching inside as response on searchInContent request,
      > - breakpoints hints.
      > 
      > In all cases there is no need to store source on inspector side.
      > 
      > R=​alph@chromium.org
      > 
      > Bug: chromium:873865,v8:7731
      > Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;master.tryserver.blink:linux_trusty_blink_rel
      > Change-Id: Ice24ddc72cfff36fb9a2dff2d7c4543defe3f668
      > Reviewed-on: https://chromium-review.googlesource.com/1182603
      > Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
      > Reviewed-by: Alexei Filippov <alph@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#55286}
      
      TBR=alph@chromium.org,kozyatinskiy@chromium.org
      
      Change-Id: I38d744dc811a5b747c1fcf27d88bdf770acf5c18
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: chromium:873865, v8:7731
      Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;master.tryserver.blink:linux_trusty_blink_rel
      Reviewed-on: https://chromium-review.googlesource.com/1184742Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
      Commit-Queue: Maya Lekova <mslekova@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#55290}
      6b860b69
  26. 21 Aug, 2018 1 commit
    • Alexey Kozyatinskiy's avatar
      inspector: do not convert and store String16 for script source · e987606a
      Alexey Kozyatinskiy authored
      We need script source for:
      - calculating hash to report as part of scriptParsed event,
      - reporting it as response on getScriptSource request,
      - searching inside as response on searchInContent request,
      - breakpoints hints.
      
      In all cases there is no need to store source on inspector side.
      
      R=alph@chromium.org
      
      Bug: chromium:873865,v8:7731
      Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;master.tryserver.blink:linux_trusty_blink_rel
      Change-Id: Ice24ddc72cfff36fb9a2dff2d7c4543defe3f668
      Reviewed-on: https://chromium-review.googlesource.com/1182603
      Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
      Reviewed-by: 's avatarAlexei Filippov <alph@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#55286}
      e987606a
  27. 09 Aug, 2018 1 commit
    • Alexey Kozyatinskiy's avatar
      [inspector] added V8InspectorClient::resourceNameToUrl · dbfcc487
      Alexey Kozyatinskiy authored
      Some clients (see Node.js) use platform path as ScriptOrigin.
      Reporting platform path in protocol makes using protocol much harder.
      This CL introduced V8InspectorClient::resourceNameToUrl method that
      is called for any reported using protocol url.
      V8Inspector uses url internally as well so protocol client may generate
      pattern for blackboxing with file urls only and does not need to build
      complicated regexp that covers files urls and platform paths on
      different platforms.
      
      R=lushnikov@chromium.org
      TBR=yangguo@chromium.org
      
      Bug: none
      Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
      Change-Id: Iff302e7441df922fa5d689fe510f5a9bfd470b9b
      Reviewed-on: https://chromium-review.googlesource.com/1164624
      Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
      Reviewed-by: 's avatarAlexei Filippov <alph@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#55029}
      dbfcc487
  28. 21 Jun, 2018 1 commit
  29. 09 Mar, 2018 1 commit
  30. 06 Mar, 2018 1 commit
  31. 02 Feb, 2018 1 commit
  32. 06 Oct, 2017 1 commit
  33. 02 Aug, 2017 1 commit
    • Alexey Kozyatinskiy's avatar
      [inspector] move breakpoint management to native · cd9e86a5
      Alexey Kozyatinskiy authored
      My goal was to move breakpoint API to native with minimal changes around, so on inspector side we use v8::debug::BreakpointId instead of String16, on v8::internal::Debug we use i::BreakPoint object instead of break point object created inside of debug.js.
      
      There are a lot of opportunities how we can improve breakpoints (at least we can avoid some of linear lookups to speedup implementation) but I think that as first step we need to remove mirrors/debug.js APIs.
      
      Drive by: debugger-script.js and usage of debugger context in inspector code base.
      
      R=yangguo@chromium.org,jgruber@chromium.org,clemensh@chromium.org
      
      Bug: v8:5510,chromium:652939
      Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_chromium_rel_ng
      Change-Id: I0b17972c39053dd4989bbe26db2bb0b88ca378f7
      Reviewed-on: https://chromium-review.googlesource.com/593156Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47091}
      cd9e86a5
  34. 28 Jul, 2017 1 commit
    • Alexey Kozyatinskiy's avatar
      [inspector] move SetScriptSource call to native · 6b0bf165
      Alexey Kozyatinskiy authored
      To avoid using debugging context and debugger-script.js on inspector side we can move SetScriptSource call to v8::internal::Debug. Theoretically we can move live edit implementation to native completely but since it will be reimplemented it looks redundant.
      
      R=yangguo@chromium.org,jgruber@chromium.org
      
      Bug: chromium:652939
      Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_chromium_rel_ng
      Change-Id: Id09492c2d2a93efbde429c9cc1bc181d5fdda19b
      Reviewed-on: https://chromium-review.googlesource.com/590736
      Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#46985}
      6b0bf165
  35. 06 Mar, 2017 1 commit
  36. 28 Feb, 2017 1 commit