-
-
Notifications
You must be signed in to change notification settings - Fork 411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow awaiting JsPromise
from Rust code
#3011
Conversation
Test262 conformance changes
|
Codecov Report
@@ Coverage Diff @@
## main #3011 +/- ##
==========================================
- Coverage 50.56% 50.50% -0.06%
==========================================
Files 446 446
Lines 45902 46008 +106
==========================================
+ Hits 23210 23236 +26
- Misses 22692 22772 +80
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice addition!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great! I added a couple of suggestions for two doc links. We might want to mention this in boa-dev/boa-dev.github.io#94
* Allow awaiting `JsPromise` from Rust code * Fix docs * Relink to docs.rs
Should be mostly useful for consumers of the
JobQueue::enqueue_future_job
API, since they can now await for certain promises insideasync
blocks and functions.Changes:
JsFuture
type that implementsFuture
.JsPromise::into_js_future
method.NativeFunction::from_async_fn
, since the old explanation was wrong.JsPromise::from_future
constructor.