Skip to content
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

fix spawn_local #1169

Merged
merged 2 commits into from
Jan 14, 2019
Merged

fix spawn_local #1169

merged 2 commits into from
Jan 14, 2019

Conversation

lcnr
Copy link
Contributor

@lcnr lcnr commented Jan 12, 2019

spawn_local caused uncaught exception: undefined on firefox when supplied with an error variant. This should now be fixed.

Examples

spawn_local(future::err::<(), ()>(()));

I don't know if and how I should write a test for this.

@richard-uk1
Copy link
Contributor

Oops my bad.

If you were to add a test (good to make sure this doesn't happen again), the place to do it is after this test, or possibly inside it.

@lcnr
Copy link
Contributor Author

lcnr commented Jan 13, 2019

I might require some help with testing this. While I do get the following warning when testing

(node:14013) UnhandledPromiseRejectionWarning: undefined
(node:14013) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:14013) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js processwith a non-zero exit code.

the tests are successful and I don't know how to add an eventlistener for unhandledrejection in Node.js, as the window object does not exist.

@alexcrichton
Copy link
Contributor

@lcnr hm I'm not entirely sure what those warnings are, but want to commit the test here and we can help through CI logs?

@lcnr
Copy link
Contributor Author

lcnr commented Jan 14, 2019

@alexcrichton I did commit the test without reverting the fix, so it runs successfully without this warning.

@alexcrichton alexcrichton merged commit 666c1e4 into rustwasm:master Jan 14, 2019
@alexcrichton
Copy link
Contributor

Thanks!

I think it's ok for us to manually inspect output for now to make sure this doesn't regress

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants