v8/test/inspector/runtime/await-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

132 lines
3.0 KiB
Plaintext

Tests that Runtime.awaitPromise works.
Running test: testResolvedPromise
{
id : <messageId>
result : {
result : {
description : 239
type : number
value : 239
}
}
}
Running test: testRejectedPromise
{
id : <messageId>
result : {
exceptionDetails : {
columnNumber : 0
exception : {
type : object
value : {
a : 1
}
}
exceptionId : <exceptionId>
lineNumber : 0
stackTrace : {
callFrames : [
]
parent : {
callFrames : [
[0] : {
columnNumber : 8
functionName :
lineNumber : 0
scriptId : <scriptId>
url :
}
]
description : Promise.reject
}
}
text : Uncaught (in promise)
}
result : {
type : object
value : {
a : 1
}
}
}
}
Running test: testRejectedPromiseWithStack
{
id : <messageId>
result : {
exceptionDetails : {
columnNumber : 0
exception : {
description : 239
type : number
value : 239
}
exceptionId : <exceptionId>
lineNumber : 0
stackTrace : {
callFrames : [
]
parent : {
callFrames : [
[0] : {
columnNumber : 4
functionName : rejectPromise
lineNumber : 17
scriptId : <scriptId>
url : test.js
}
[1] : {
columnNumber : 0
functionName :
lineNumber : 0
scriptId : <scriptId>
url :
}
]
description : Promise.reject
}
}
text : Uncaught (in promise)
}
result : {
description : 239
type : number
value : 239
}
}
}
Running test: testPendingPromise
{
id : <messageId>
result : {
result : {
description : 239
type : number
value : 239
}
}
}
Running test: testResolvedWithoutArgsPromise
{
id : <messageId>
result : {
result : {
type : undefined
}
}
}
Running test: testGarbageCollectedPromise
{
error : {
code : -32000
message : Promise was collected
}
id : <messageId>
}