Mark all streams-created promises with isSettled flag
Wrap v8.createPromise() in a createPromise() function which always sets the isSettled flag to false. Make resolvePromise() and rejectPromise() ignore promises that don't have the isSettled flag present. Replace Promise_resolve() and Promise_reject() with createResolvedPromise() and createRejectedPromise() functions that also set the isSettled flag. Strictly speaking, the createR*Promise() functions only need to be used when a promise is stored and might be resolved or rejected later. But to avoid confusion about where they are needed, always use them in place of Promise_resolve() and Promise_reject(). BUG=931640 Change-Id: I5472cb4a78f7b970ab256084b819ae28ffda6a33 Reviewed-on: https://chromium-review.googlesource.com/c/1481178Reviewed-by:Yutaka Hirano <yhirano@chromium.org> Commit-Queue: Adam Rice <ricea@chromium.org> Cr-Commit-Position: refs/heads/master@{#635449}
Showing
Please register or sign in to comment