-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Issue with JSFuture::from(promise) imported from local source js file #1637
Labels
Comments
CallumJHays
changed the title
Issue with JSFuture::From(promise) imported from local source js file
Issue with JSFuture::from(promise) imported from local source js file
Jul 1, 2019
alexcrichton
added a commit
to alexcrichton/wasm-bindgen
that referenced
this issue
Jul 8, 2019
JS engines guarantee that at least one of our `then` callbacks are invoked, so that means if we destroy them prematurely they're guaranteed to log an exception to the console! Instead to prevent exceptions from happening tweak how the completion callbacks for JS futures are managed and ensure that the closures stay alive until they're invoked later. Closes rustwasm#1637
Thanks for the report! THe exception here is actually benign, but it's a good one for us to fix and should be fixed in #1649 |
Awesome! That's good to hear, thanks |
alexcrichton
added a commit
to alexcrichton/wasm-bindgen
that referenced
this issue
Jul 9, 2019
JS engines guarantee that at least one of our `then` callbacks are invoked, so that means if we destroy them prematurely they're guaranteed to log an exception to the console! Instead to prevent exceptions from happening tweak how the completion callbacks for JS futures are managed and ensure that the closures stay alive until they're invoked later. Closes rustwasm#1637
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
WASM-bindgen-futures aint workin' for me
This repo exemplifies my issue.
Clone & Run it
The Code
src/lib.rs:
src/promise_true.js:
It all compiles fine.
Output
This is the runtime error I experience:
Help? 🐱
The text was updated successfully, but these errors were encountered: