Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(swingset): gcAndFinalize needs two post-GC setImmediates on V8
When testing the upcoming #3482 fix, we observed that a vat method which simply delegates to a second vat, like this: ```js getInvitationTarget: () => E(zoe).getInvitationZoe(), ``` would not always drop the "invitation" Presence returned by both methods, when run under Node.js. It dropped the Presence correctly perhaps 20% of the time, and the other 80% it failed to drop it. Under XS it dropped it all of the time. Node.js started working correctly all of the time (N=8 or so) when we changed `gcAndFinalize` to do *two* `setImmediate`s after the `gc()`, instead of just one. I'd like to add a unit test that fails with a similar probability, but I haven't been able to come up with one. Either they fail to collect the object all of the time, or none of the time. refs #3240 Hopefully it fixes that, but I won't be sure until I run more load-generator tests and look for growth in the object counts over time. And I'd like to add that test before closing the issue.
- Loading branch information