v8/test/inspector/debugger/side-effect-free-debug-evaluate-expected.txt
Aleksei Koziatinskii 43c775f24b inspector: debug-evaluate: allow setters on temporary Date object
Eager evaluation in DevTools console relies on the builtins side
effect attribution.

Setters on Date object should be marked as no side effects if called
on the temporary object.

This bug was uncovered after considering screenshot from a tweet [1].

[1] https://twitter.com/shuding_/status/1362132984376160256

Change-Id: Iedc0e29e2bdab719304e2f0a0435845f24eaaadc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2703459
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72835}
2021-02-18 08:21:18 +00:00

23 lines
550 B
Plaintext

Tests side-effect-free evaluation
Running test: basicTest
Paused on "debugger;"
f() returns 1
g() returns 2
f() returns 1
g() throws EvalError
Running test: testDate
someGlobalDate.setDate(10) : throws
new Date().setDate(10) : ok
someGlobalDate.setFullYear(1991) : throws
new Date().setFullYear(1991) : ok
someGlobalDate.setHours(0) : throws
new Date().setHours(0) : ok
someGlobalDate.getDate() : ok
new Date().getDate() : ok
someGlobalDate.getFullYear() : ok
new Date().getFullYear() : ok
someGlobalDate.getHours() : ok
new Date().getHours() : ok