1. 14 May, 2022 1 commit
    • Simon Zünd's avatar
      Reland "[inspector] Re-enable Debugger#restartFrame" · 9ca7491b
      Simon Zünd authored
      This is a reland of commit 8278cb50
      
      The reland adds the RestartFrameTrampoline to the list of
      builtins that the deoptimizer is allowed to return from for
      control flow integrity.
      
      Original change's description:
      > [inspector] Re-enable Debugger#restartFrame
      >
      > Doc: https://bit.ly/revive-restart-frame
      >
      > This CL "undeprecates" Debugger#restartFrame and adds a new optional
      > "mode" parameter for back-wards compatibility. Moreover, the return
      > values are all deprecated. They were never actually used in the
      > DevTools frontend and the same information is available from the
      > Debugger#paused event that fires once execution stops at the
      > beginning of the restarted function.
      >
      > The CL also re-baselines all the restart-frame inspector tests that
      > now run successfully.
      >
      > R=bmeurer@chromium.org, kimanh@chromium.org
      >
      > Bug: chromium:1303521
      > Change-Id: I34bddeb1f2f4ff3dee58dd82e779c111495566f3
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3616505
      > Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
      > Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
      > Commit-Queue: Simon Zünd <szuend@chromium.org>
      > Cr-Commit-Position: refs/heads/main@{#80491}
      
      Bug: chromium:1303521
      Change-Id: I13e2f8b5011795a38e541310622b8333a3d08049
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644624Reviewed-by: 's avatarNico Hartmann <nicohartmann@chromium.org>
      Commit-Queue: Simon Zünd <szuend@chromium.org>
      Reviewed-by: 's avatarKim-Anh Tran <kimanh@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#80534}
      9ca7491b
  2. 12 May, 2022 2 commits
  3. 20 Apr, 2022 1 commit
    • Simon Zünd's avatar
      [inspector] Add 'canBeRestarted' flag to CallFrames when debugger pauses · ec41a70e
      Simon Zünd authored
      Doc: https://bit.ly/revive-restart-frame
      Context: https://crrev.com/c/3582395 (whole feature)
      
      This CL adds a new optional flag `canBeRestarted` to every call frame
      in Debugger.paused events. As the name suggests, the flag indicates
      whether we can restart a particular frame through Debugger.restartFrame
      once implemented.
      
      We are not able to safely restart all frames:
        * We don't support WASM frames
        * We don't support frames where resumable functions (async fns,
          generators) and embedder C++ frames are between the top-most
          frame and the to-be-restarted frame.
      
      Note that from a CDP perspective the flag doesn't actually guarantee
      a successful restart. CDP clients can issue
      CDP commands between the Debugger.paused event and before a user
      decides to restart a frame, which can potentially mess
      with the stack.
      
      The `canBeRestarted` flag tests are folded into the
      Debugger.restartFrame tests. As the feature is not yet fully
      implemented we short-circuit most of the tests for now and only
      run them up until the first Debugger.restartFrame call fails
      (except "fails-for-resumables.js").
      This means the tests exercise the `canBeRestarted` flag, but not
      the restarting functionality itself.
      
      R=bmeurer@chromium.org, kimanh@chromium.org
      
      Bug: chromium:1303521
      Change-Id: I01ab46dc3557ab8383960969fbe03e00604cc5e2
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3596160Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
      Reviewed-by: 's avatarKim-Anh Tran <kimanh@chromium.org>
      Commit-Queue: Simon Zünd <szuend@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#80046}
      ec41a70e
  4. 19 Apr, 2022 1 commit
  5. 29 Apr, 2021 1 commit
    • Benedikt Meurer's avatar
      [debugger] Remove "Restart frame" feature. · 93f85699
      Benedikt Meurer authored
      The "Restart frame" feature was implemented as part of LiveEdit and
      primarily used to support LiveEdit of active functions, but that was
      previously disabled as part of https://crrev.com/c/2846892 because it's
      too brittle and causes crashes when using seemingly unrelated features.
      The "Restart frame" feature was also available as a context menu item
      separately in the DevTools front-end, but that was also already removed
      as part of https://crrev.com/c/2854681 earlier. So all uses are gone
      now.
      
      This change works by marking Debugger.restartFrame as deprecated and
      having it respond with a ServerError all the time. It thus allows us to
      remove a whole bunch of machinery that was essentially just put in
      various places to support the restart_fp_ magic. In particular the
      debugger no longer needs any machine specific builtins now.
      
      Bug: chromium:1195927
      Change-Id: I1153ba6b00e979620af57dd9f58aa1c035ec4484
      Fixed: chromium:1203606
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2854750Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#74276}
      93f85699
  6. 01 Jul, 2019 1 commit