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

Make m.request work with async/await correctly. #2428

merged 2 commits into from Jun 10, 2019


Copy link

@dead-claudia dead-claudia commented Jun 10, 2019


A very small, subtle workaround with a lot of code explaining why it's necessary. The test was by far harder to get right than the fix itself, and it required a bit of spec reading and careful coding.

Motivation and Context

Fixes #2426

How Has This Been Tested?

Added a new test, after quite a bit of study on the subject matter. Conveniently, Node also uses V8, so I could easily verify the test there. It shouldn't affect others like Firefox, since they should be "working" already.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation change


  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have updated docs/

`m.xhr` was a relic of the rewrite days prior to the release of v1.0.0,
before it was renamed `m.request` to align with v0.2.x. This just strips
some of that legacy naming.
@project-bot project-bot bot added this to Needs triage in Triage/bugs Jun 10, 2019
It looked like a V8 bug, but read the two big code comments and follow
their links. It's a bit more subtle than it looks, and V8's in the right
@dead-claudia dead-claudia marked this pull request as ready for review June 10, 2019 10:38
Copy link
Member Author

Posted a long post-mortem/explainer, targeted towards the less technical, on Twitter, in case any of you all are curious.

@dead-claudia dead-claudia merged commit 0a1a33a into MithrilJS:next Jun 10, 2019
Triage/bugs automation moved this from Needs triage to Closed Jun 10, 2019
@dead-claudia dead-claudia deleted the fix-request branch June 29, 2019 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

m.request not redrawing automatically in Chrome
1 participant