v8/test/inspector/debugger/async-stack-for-promise-expected.txt
kozyatinskiy 754736d26c [inspector] async stacks for Promise.then calls...
... which were done after the promise has been resolved.

Goal of this CL - change promise instrumentation to support better callbacks, chained after promise resolution and prepare instrumentation for adding new asyncTaskCreated instrumentation.

Instrumentation changes:
- asyncTaskScheduled(recurring) when promise is fulfilled or rejected,
- asyncTaskCancelled when promise is collected (since [1] we can be sure that promise will survive scheduled microtasks).

Minor changes:
- async task type in inspector <-> debugger API transferred by enum instead of string,
- Debug manages async task ids based on promise objects.

More details: https://docs.google.com/document/d/1u19N45f1gSF7M39mGsycJEK3IPyJgIXCBnWyiPeuJFE

[1] https://codereview.chromium.org/2581503003/

BUG=chromium:632829,v8:5738
R=dgozman@chromium.org,yangguo@chromium.org,gsathya@chromium.org

Review-Url: https://codereview.chromium.org/2578923002
Cr-Commit-Position: refs/heads/master@{#42178}
2017-01-10 12:54:12 +00:00

156 lines
3.5 KiB
Plaintext

Checks that async chains for promises are correct.
Running test: testPromise
foo1 (test.js:9:2)
-- Promise.resolve --
promise (test.js:20:2)
(anonymous) (testPromise.js:0:0)
Running test: testPromiseResolvedBySetTimeout
foo1 (test.js:9:2)
-- setTimeout --
promiseResolvedBySetTimeout (test.js:28:2)
(anonymous) (testPromiseResolvedBySetTimeout.js:0:0)
Running test: testPromiseAll
foo1 (test.js:9:2)
-- Promise.resolve --
promiseAll (test.js:39:2)
(anonymous) (testPromiseAll.js:0:0)
Running test: testPromiseAllReverseOrder
foo1 (test.js:9:2)
-- Promise.resolve --
promiseAllReverseOrder (test.js:50:2)
(anonymous) (testPromiseAllReverseOrder.js:0:0)
Running test: testPromiseRace
foo1 (test.js:9:2)
-- Promise.resolve --
promiseRace (test.js:60:2)
(anonymous) (testPromiseRace.js:0:0)
Running test: testTwoChainedCallbacks
foo1 (test.js:9:2)
-- Promise.resolve --
twoChainedCallbacks (test.js:69:2)
(anonymous) (testTwoChainedCallbacks.js:0:0)
foo2 (test.js:13:2)
-- Promise.resolve --
twoChainedCallbacks (test.js:69:2)
(anonymous) (testTwoChainedCallbacks.js:0:0)
Running test: testPromiseResolve
foo1 (test.js:9:2)
-- Promise.resolve --
promiseResolve (test.js:74:17)
(anonymous) (testPromiseResolve.js:0:0)
foo2 (test.js:13:2)
-- Promise.resolve --
promiseResolve (test.js:74:17)
(anonymous) (testPromiseResolve.js:0:0)
Running test: testThenableJobResolvedInSetTimeout
foo1 (test.js:9:2)
-- setTimeout --
thenableJob (test.js:81:4)
p1.then (test.js:86:25)
-- Promise.resolve --
thenableJobResolvedInSetTimeout (test.js:87:2)
(anonymous) (testThenableJobResolvedInSetTimeout.js:0:0)
Running test: testThenableJobResolvedInSetTimeoutWithStack
foo1 (test.js:9:2)
-- Promise.resolve --
inner (test.js:94:6)
-- setTimeout --
thenableJob (test.js:99:4)
p1.then (test.js:104:25)
-- Promise.resolve --
thenableJobResolvedInSetTimeoutWithStack (test.js:105:2)
(anonymous) (testThenableJobResolvedInSetTimeoutWithStack.js:0:0)
Running test: testThenableJobResolvedByPromise
foo1 (test.js:9:2)
-- Promise.resolve --
thenableJob (test.js:113:12)
p1.then (test.js:118:25)
-- Promise.resolve --
thenableJobResolvedByPromise (test.js:119:2)
(anonymous) (testThenableJobResolvedByPromise.js:0:0)
Running test: testThenableJobResolvedByPromiseWithStack
foo1 (test.js:9:2)
-- Promise.resolve --
inner (test.js:126:6)
-- Promise.resolve --
thenableJob (test.js:131:12)
p1.then (test.js:136:25)
-- Promise.resolve --
thenableJobResolvedByPromiseWithStack (test.js:137:2)
(anonymous) (testThenableJobResolvedByPromiseWithStack.js:0:0)
Running test: testLateThenCallback
foo1 (test.js:9:2)
-- Promise.resolve --
lateThenCallback (test.js:144:2)
(anonymous) (testLateThenCallback.js:0:0)
Running test: testComplex
inner1 (test.js:154:6)
foo1 (test.js:156:4)
-- Promise.resolve --
inner2 (test.js:162:6)
-- Promise.resolve --
foo2 (test.js:165:12)
-- Promise.resolve --
inner3 (test.js:172:6)
-- setTimeout --
foo3 (test.js:175:4)
-- Promise.resolve --
foo5 (test.js:187:52)
-- Promise.resolve --
foo6 (test.js:192:34)
-- Promise.resolve --
complex (test.js:196:18)
(anonymous) (testComplex.js:0:0)
p.then (test.js:207:8)
-- Promise.resolve --
inner2 (test.js:162:6)
-- Promise.resolve --
foo2 (test.js:165:12)
-- Promise.resolve --
inner3 (test.js:172:6)
-- setTimeout --
foo3 (test.js:175:4)
-- Promise.resolve --
foo5 (test.js:187:52)
-- Promise.resolve --
foo6 (test.js:192:34)
-- Promise.resolve --
complex (test.js:196:18)
(anonymous) (testComplex.js:0:0)
Running test: testReject
foo1 (test.js:9:2)
-- Promise.reject --
reject (test.js:217:17)
(anonymous) (testReject.js:0:0)