Closed kfarnung closed 6 years ago
Thanks for keeping the docs updated!
Comments on documentation
JsGetPromiseResult
when promise is pending (JsErrorInvalidArgument
currently) and rejected (error object). At least the pending behavior isn't very obvious.I hope it's not too late for comments on those APIs themselves
JsPromiseStatePending
.JsGetPromiseResult
returning JsErrorInvalidArgument
from pending promises. Intuitively, I only expect this if you throw in something other than promise. You can have a valid argument (a promise) but just catch it in a bad state. I'd suggest returning JS_INVALID_REFERENCE
if you consider this a valid and successful operation or a new error code like JsErrorPendingPromise
for a failed op.@liminzhu I made the documentation changes to resolve your feedback, but it's pending another change to ChakraCore before this can land.
@liminzhu @MSLaguana Any other concerns with this documentation?
LGTM, thx!
Needs to wait for https://github.com/Microsoft/ChakraCore/pull/5131 to land.Needs to wait for https://github.com/Microsoft/ChakraCore/pull/5138 to land.