v8/test/inspector/runtime/evaluate-repl-mode-broken-thenable-expected.txt
Simon Zünd ad884d036f [inspector] Don't use v8::Promise::Resolver for REPL mode
REPL mode always returns a promise since we basically turn the
evaluated script in an async function. More-over, we stash the result
as a property on a plain JS object. This prevents promise chains to
resolve too far if the result of the evaluation is a promise itself.

Long story short, we don't need to wrap REPL mode results in
`Promise.resolve`, but can add the then/catch handlers directly.

This fixes the DevTools console when working with broken promise
polyfills or broken thenables.

R=bmeurer@chromium.org

Fixed: chromium:1371072
Change-Id: I96aa8eaf5939fdf6231712b047b50fee734efc0b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3929037
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83578}
2022-10-07 19:38:13 +00:00

7 lines
133 B
Plaintext

Tests that REPL mode still works even with a broken Promise.prototype.then
{
description : 42
type : number
value : 42
}