commit | a71f5186b8cf120f2c7d9868aee266a5c2f0fe1d | [log] [tgz] |
---|---|---|
author | Adam Rice <ricea@chromium.org> | Sat Mar 16 10:36:44 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Sat Mar 16 10:36:44 2019 |
tree | aaad67049b7ceea0dfe9be9b10b9a678579c3a06 | |
parent | 0a7e34d2bb1e5ee86c19832cd2080d50482b9402 [diff] |
Add functionality to StreamThenPromise() ReadableStreamNative needs some extra functionality from StreamThenPromise(): * Support the single argument form of Then(). The |on_rejected| argument is now optional. * Behave as Catch() by setting the |on_fulfilled| argument to nullptr. * Return the return value from Then() instead of void. Only a Promise resolving to undefined can be created due to the StreamScriptFunction API having no provision for a return value, but this is sufficient to implement ReadableStream. BUG=902633 Change-Id: I44f0ba0109568c8fd09882e2f1f05ba50816364a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1523214 Reviewed-by: Yutaka Hirano <yhirano@chromium.org> Commit-Queue: Adam Rice <ricea@chromium.org> Cr-Commit-Position: refs/heads/master@{#641440}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .