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 ever-growing call stacks #115

Merged
merged 1 commit into from
Nov 27, 2024
Merged

Conversation

jcheng5
Copy link
Member

@jcheng5 jcheng5 commented Nov 27, 2024

Fixes #114, helps but doesn't totally fix https://github.com/jcheng5/shinychat/issues/16

  • Re-entering domains was happening additively, instead of replacing the active domain as it should've been doing.
  • Wrapping for re-entering wasn't happening if the domain at the time of binding was NULL. This was incorrect! If the domain was NULL at binding time, and non-NULL at the time of resolution, then the domain needs to be set back to NULL before the handler is invoked!
  • Fixed the cpp test that had the wrong value all along
  • Added more tests to catch regressions in this area

- Re-entering domains was happening additively, instead of
  replacing the active domain as it should've been doing.
- Wrapping for re-entering wasn't happening if the domain
  at the time of binding was NULL. This was incorrect! If
  the domain was NULL at binding time, and non-NULL at
  the time of resolution, then the domain needs to be set
  back to NULL before the handler is invoked!
- Fixed the cpp test that had the wrong value all along
- Added more tests to catch regressions in this area
@jcheng5 jcheng5 force-pushed the bugfix/promise-domain-stack-overflow branch from d064234 to bd03f8b Compare November 27, 2024 10:07
@jcheng5 jcheng5 marked this pull request as ready for review November 27, 2024 10:07
@jcheng5 jcheng5 merged commit 51f4f48 into main Nov 27, 2024
31 checks passed
@jcheng5 jcheng5 deleted the bugfix/promise-domain-stack-overflow branch November 27, 2024 23:04
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.

Domains being reentered too many times Pathological streaming slowdown with promises 1.3.1
2 participants