Skip to content

Commit 8c0764e

Browse files
[1.8>1.9] [MERGE #4631 @digitalinfinity] OS 15681335: Fix inspection of Promise state in debugger
Merge pull request #4631 from digitalinfinity:os_15681335_1.8 RecyclablePromiseObjectWalker::Get had a missing break when inspecting the state of a promise, causing an unresolved promise to show up as resolved in F12. Fixed the logic here.
2 parents 24928c5 + b47fa02 commit 8c0764e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/Runtime/Debug/DiagObjectModel.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3896,6 +3896,7 @@ namespace Js
38963896
break;
38973897
case JavascriptPromise::PromiseStatusCode_Unresolved:
38983898
pResolvedObject->obj = scriptContext->GetLibrary()->CreateStringFromCppLiteral(_u("pending"));
3899+
break;
38993900
case JavascriptPromise::PromiseStatusCode_HasResolution:
39003901
pResolvedObject->obj = scriptContext->GetLibrary()->CreateStringFromCppLiteral(_u("resolved"));
39013902
break;

test/DebuggerCommon/promiseDisplay.js.dbg.baseline

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
},
1212
"someOtherProp": "string before",
1313
"[Promise]": {
14-
"[status]": "string resolved",
14+
"[status]": "string pending",
1515
"[value]": "string undefined"
1616
}
1717
}

0 commit comments

Comments
 (0)