43c775f24b
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}
23 lines
550 B
Plaintext
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
|