Skip to content

Commit

Permalink
[1.8>1.9] [MERGE #4631 @digitalinfinity] OS 15681335: Fix inspection …
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
digitalinfinity committed Feb 1, 2018
2 parents 24928c5 + b47fa02 commit 8c0764e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/Runtime/Debug/DiagObjectModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3896,6 +3896,7 @@ namespace Js
break;
case JavascriptPromise::PromiseStatusCode_Unresolved:
pResolvedObject->obj = scriptContext->GetLibrary()->CreateStringFromCppLiteral(_u("pending"));
break;
case JavascriptPromise::PromiseStatusCode_HasResolution:
pResolvedObject->obj = scriptContext->GetLibrary()->CreateStringFromCppLiteral(_u("resolved"));
break;
Expand Down
2 changes: 1 addition & 1 deletion test/DebuggerCommon/promiseDisplay.js.dbg.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"someOtherProp": "string before",
"[Promise]": {
"[status]": "string resolved",
"[status]": "string pending",
"[value]": "string undefined"
}
}
Expand Down

0 comments on commit 8c0764e

Please sign in to comment.